/* ============================================================
   nanamica & TNF Purple Label Lookbook Archive
   Minimal Japanese utilitarian aesthetic — off-white ground,
   deep navy, earth gray, khaki accent. Image-first, whitespace.
   ============================================================ */

:root {
  --bg: #faf9f5;
  --bg-card: #f3f1ea;
  --ink: #23262b;
  --ink-soft: #6f7278;
  --ink-faint: #a6a8ad;
  --navy: #1d3a5f;
  --khaki: #b3a37e;
  --line: #e6e3da;
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* page entrance — soft fade like apple.com product pages */
body { opacity: 0; animation: page-in .7s cubic-bezier(.28,.11,.32,1) .05s forwards; }
@keyframes page-in { to { opacity: 1; } }

/* scroll reveal — fade + gentle rise, staggered via --d */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s cubic-bezier(.28,.11,.32,1),
              transform .9s cubic-bezier(.28,.11,.32,1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  body { opacity: 1; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, -apple-system,
    BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 26px 0 22px;
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--navy);
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: 28px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-nav a { padding-bottom: 3px; border-bottom: 1px solid transparent; transition: color .25s, border-color .25s; }
.site-nav a:hover, .site-nav a.active { color: var(--navy); border-color: var(--navy); }

/* ---------- breadcrumb ---------- */

.crumbs {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 22px;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--navy); }
.crumbs .sep { margin: 0 10px; color: var(--line); }

/* ---------- page titles ---------- */

.page-head { padding: 56px 0 40px; }
.page-head .eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--khaki);
  margin-bottom: 14px;
}
.page-head h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.page-head .sub {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

/* home header: enlarged eyebrow + official brand logos */

.page-head.home .eyebrow {
  font-size: 14px;
  letter-spacing: 0.32em;
  margin-bottom: 26px;
}
.brand-logos {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 20px;
}
.brand-logos img { display: block; width: auto; }
.brand-logos .logo-nanamica { height: 52px; }
.brand-logos .logo-tnf {
  height: 50px;
  border-radius: 3px;
  transition: box-shadow .4s cubic-bezier(.22,.61,.36,1);
}
.brand-logos .logo-link {
  display: block;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), opacity .4s;
}
.brand-logos .logo-link:hover { transform: translateY(-2px); }
.brand-logos .logo-link:hover .logo-nanamica { opacity: .72; }
.brand-logos .logo-link:hover .logo-tnf { box-shadow: 0 10px 26px rgba(94, 51, 135, .30); }
.brand-logos .logo-divider {
  width: 1px;
  height: 46px;
  background: var(--line);
}

/* ---------- home: brand cards ---------- */

.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 32px);
  padding: 8px 0 88px;
}
.brand-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.brand-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .6s cubic-bezier(.22,.61,.36,1), opacity .6s;
}
.brand-card:hover img { transform: scale(1.02); opacity: .92; }
.brand-card .label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 24px;
  background: linear-gradient(to top, rgba(250,249,245,.96), rgba(250,249,245,0));
}
.brand-card .label .name {
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
}
.brand-card .label .meta {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.brand-card, .season-card {
  transition: box-shadow .5s cubic-bezier(.22,.61,.36,1), transform .5s cubic-bezier(.22,.61,.36,1);
}
.brand-card:hover, .season-card:hover {
  box-shadow: 0 18px 50px rgba(29, 58, 95, .12);
  transform: translateY(-3px);
}

/* ---------- brand page: year timeline ---------- */

.timeline { padding: 8px 0 88px; }
.year-row { border-top: 1px solid var(--line); }
.year-row:last-child { border-bottom: 1px solid var(--line); }
.year-toggle {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 26px 4px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.year-toggle .y {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink);
  transition: color .25s;
}
.year-toggle:hover .y { color: var(--navy); }
.year-toggle .count {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.year-toggle .chev {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-faint);
  transition: transform .3s;
}
.year-row.open .chev { transform: rotate(90deg); }
.year-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s cubic-bezier(.22,.61,.36,1);
}
.year-row.open .year-body { max-height: 400px; }
.season-links {
  display: flex;
  gap: 14px;
  padding: 2px 4px 30px;
}
.season-chip {
  flex: 1;
  max-width: 260px;
  border: 1px solid var(--line);
  padding: 18px 20px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color .25s, color .25s, background .25s;
}
.season-chip:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: #fff;
}
.season-chip .n { display: block; margin-top: 6px; font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); }

/* ---------- year page: season cards ---------- */

.season-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 32px);
  padding: 8px 0 88px;
}
.season-card {
  display: block;
  background: var(--bg-card);
  overflow: hidden;
}
.season-card .thumb { aspect-ratio: 3 / 2; overflow: hidden; }
.season-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.61,.36,1), opacity .6s;
}
.season-card:hover img { transform: scale(1.02); opacity: .92; }
.season-card .label { padding: 18px 20px 20px; }
.season-card .label .name {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
}
.season-card .label .meta {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ---------- lookbook grid (masonry) ---------- */

.lookbook { padding: 8px 0 88px; }
.masonry { columns: 3 300px; column-gap: clamp(14px, 2vw, 28px); }
.masonry figure {
  break-inside: avoid;
  margin: 0 0 clamp(14px, 2vw, 28px);
  background: var(--bg-card);
  cursor: zoom-in;
  position: relative;
}
.masonry img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity .5s, transform .5s cubic-bezier(.22,.61,.36,1);
}
.masonry img.loaded { opacity: 1; }
.masonry figure:hover img { transform: scale(1.01); }
.masonry figcaption {
  position: absolute;
  right: 10px; bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(35,38,43,.45);
  background: rgba(250,249,245,.75);
  padding: 2px 7px;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(250, 249, 245, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s cubic-bezier(.28,.11,.32,1), visibility 0s linear .4s;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
  transition: opacity .4s cubic-bezier(.28,.11,.32,1);
}
.lightbox .lb-stage {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  transition: opacity .28s ease, transform .42s cubic-bezier(.22,.61,.36,1);
}
.lightbox.open .lb-stage { animation: lb-zoom .5s cubic-bezier(.22,.61,.36,1); }
@keyframes lb-zoom {
  from { opacity: 0; transform: scale(.965); }
  to   { opacity: 1; transform: scale(1); }
}
/* swap transitions: slide+fade, direction via --slide */
.lightbox.swap-out .lb-stage {
  opacity: 0;
  transform: translateX(var(--slide, 26px)) scale(.99);
  transition-duration: .16s, .16s;
}
.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  box-shadow: 0 24px 80px rgba(29, 58, 95, .18);
}
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--navy);
  font-size: 18px;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.lb-btn:hover { background: var(--navy); color: #fff; }
.lb-prev { left: clamp(8px, 3vw, 40px); }
.lb-next { right: clamp(8px, 3vw, 40px); }
.lb-close {
  position: absolute;
  top: 22px; right: 26px;
  width: 44px; height: 44px;
  transform: none;
  font-size: 16px;
}
.lb-counter {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 34px;
  padding-bottom: 44px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .masonry { columns: 2 220px; }
}
@media (max-width: 640px) {
  .brand-grid, .season-grid { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .season-links { flex-direction: column; }
  .season-chip { max-width: none; }
  .site-header .wrap { flex-direction: column; gap: 10px; }
}
@media (min-width: 1500px) {
  .masonry { columns: 4 320px; }
}
