/* ===========================================
   CLOTHABLES — styles
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;1,9..144,400;1,9..144,500&family=Manrope:wght@400;500;600&display=swap');

:root {
  --bg:           #fbfaf7;
  --ink:          #1a1a1a;
  --ink-soft:     #6b6b6b;
  --ink-faint:    #b5b3ad;
  --line:         #e8e6e0;
  --line-strong:  #d8d6d0;
  --accent:       #ff4b5a;
  --accent-rgb:   255, 75, 90;
  --surface:      #ffffff;
  --field:        #f0efea;
  --shadow:       0 10px 30px rgba(0,0,0,0.08);
  --paper:        #fdfcf8;
}

:root[data-theme="dark"] {
  --bg:           #0e0e0f;
  --ink:          #f2f2f0;
  --ink-soft:     #9a9a98;
  --ink-faint:    #4a4a48;
  --line:         #222225;
  --line-strong:  #2e2e32;
  --accent:       #ff4b5a;
  --accent-rgb:   255, 75, 90;
  --surface:      #15151a;
  --field:        #1b1b20;
  --shadow:       0 10px 30px rgba(0,0,0,0.45);
  --paper:        #1c1c20;
}

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

/* Unified theme-transition group — prevents flicker */
html, body,
.site-nav,
.nav-rule,
.meta-line,
.hero-caption,
.hero-mission,
.auth,
.dropdown,
.search input,
.kbd-hint,
.marquee,
.hero-frame .frame-inner,
.toast,
.scroll-top,
.mobile-drawer,
.drawer-backdrop,
.drawer-search,
.drawer-section,
.drawer-foot,
.placeholder-section,
.section-divider,
.site-footer,
.footer-rule,
.footer-col,
.footer-bottom,
.footer-logo,
.auth-card,
.auth-tabs,
.auth-field input,
.auth-submit,
.auth-social-btn,
.auth-foot-line,
.nf-body,
.nf-polaroid,
.nf-polaroid.front .nf-polaroid-inside {
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease,
    color 0.4s ease;
}

html {
  scrollbar-color: var(--accent) transparent;
  scrollbar-width: thin;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; color: inherit; font: inherit; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
  border: 2px solid var(--bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { border-width: 1px; }
::-webkit-scrollbar-corner { background: transparent; }


/* ===========================================
   NAVBAR
   =========================================== */
.site-nav {
  background: var(--bg);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  transform: translateY(0);
  border-bottom: 1px solid transparent;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.35s ease;
  will-change: transform;
}

.site-nav.nav-hidden { transform: translateY(-100%); }

.site-nav.nav-scrolled {
  background: var(--surface);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

:root[data-theme="dark"] .site-nav.nav-scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

body { padding-top: 80px; }

.nav-rule {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; padding: 6px 32px;
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 11px; letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.nav-rule-sep { color: var(--ink-faint); }
.nav-rule-date { color: var(--accent); }

.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 32px; height: 56px;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 28px;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: -8px;
}

/* Make sure burger is only ever visible on mobile */
@media (min-width: 901px) {
  .nav-burger { display: none !important; }
}

.nav-burger span {
  width: 22px; height: 2px;
  background: var(--ink);
  transition: background-color 0.25s ease, transform 0.3s ease;
}

.nav-left { display: flex; align-items: center; gap: 18px; }

.brand { display: inline-flex; align-items: center; height: 56px; }

.brand-logo {
  height: 30px; width: auto; display: block;
  transition: transform 0.3s ease;
}

.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.08); }

.separator {
  color: var(--ink-faint);
  font-weight: 300; user-select: none; font-size: 18px;
}

.nav-categories { display: flex; align-items: center; gap: 32px; }
.nav-item { position: relative; }

.nav-link {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); padding: 18px 4px;
  display: inline-block; position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: ''; position: absolute; bottom: 12px; left: 50%;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-item:hover .nav-link { color: var(--accent); }
.nav-item:hover .nav-link::after { width: 100%; left: 0; }

.dropdown {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 200px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 12px 0; opacity: 0; visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s,
              background-color 0.4s ease, border-color 0.4s ease;
  display: flex; flex-direction: column;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  padding: 10px 24px; font-size: 13px; color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.2s, padding-left 0.25s;
}

.dropdown a:hover { color: var(--accent); padding-left: 30px; }

/* SEARCH */
.nav-search { display: flex; justify-content: center; padding: 0 12px; }
.search { position: relative; width: 100%; max-width: 440px; display: flex; align-items: center; }

.search-icon {
  position: absolute; left: 14px; width: 16px; height: 16px;
  color: var(--ink-soft); pointer-events: none; transition: color 0.25s ease;
}

.search input {
  width: 100%; height: 38px;
  padding: 0 42px 0 40px;
  font-family: inherit; font-size: 13px;
  color: var(--ink); background: var(--field);
  border: 1px solid transparent; border-radius: 999px; outline: none;
  transition: background-color 0.4s ease, border-color 0.25s ease,
              box-shadow 0.25s ease, color 0.4s ease;
}

.search input::placeholder { color: var(--ink-soft); font-style: italic; }

.search:hover input {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}

.search:hover .search-icon { color: var(--accent); }

.search input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.15);
}

.search:focus-within .search-icon { color: var(--accent); }

.kbd-hint {
  position: absolute; right: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 11px; font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px; padding: 2px 6px;
  pointer-events: none;
  transition: opacity 0.2s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.search:focus-within .kbd-hint { opacity: 0; }

/* RIGHT side */
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }

.nav-search-trigger { display: none; }

/* Only show mobile search button on mobile */
@media (min-width: 901px) {
  .nav-search-trigger { display: none !important; }
}

/* ---- Language picker ---- */
.lang-picker {
  position: relative;
}

.lang-trigger {
  width: auto;
  gap: 6px;
  padding: 0 10px;
}

.lang-current {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: inherit;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s,
              background-color 0.4s ease, border-color 0.4s ease;
  z-index: 1000;
}

.lang-picker.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown-label {
  padding: 6px 18px 10px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 11px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: left;
  transition: color 0.2s, background-color 0.2s, padding-left 0.25s;
}

.lang-option:hover {
  color: var(--accent);
  padding-left: 24px;
}

.lang-option.active {
  color: var(--ink);
  background: rgba(var(--accent-rgb), 0.05);
}

.lang-option.active::before {
  content: '';
  position: absolute;
  left: 10px;
  width: 3px;
  height: 14px;
  background: var(--accent);
}

.lang-code {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  min-width: 22px;
}

.lang-option.active .lang-code {
  color: var(--accent);
}

.lang-name {
  font-size: 13px;
}

.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); border-radius: 50%;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.icon-btn svg { width: 18px; height: 18px; }

.icon-btn:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; font-weight: 600; line-height: 16px;
  text-align: center; color: #fff;
  background: var(--accent);
  border-radius: 999px;
  border: 2px solid var(--bg);
  transition: transform 0.2s ease, background-color 0.4s ease, border-color 0.4s ease;
  font-family: 'Manrope', sans-serif;
}

.cart-count[data-count="0"] { display: none; }
.cart-btn:hover .cart-count { transform: scale(1.1); }

.theme-icon { position: relative; width: 18px; height: 18px; display: inline-block; }
.theme-icon svg {
  position: absolute; inset: 0; width: 18px; height: 18px;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.35s ease;
}

.sun  { transform: rotate(0deg) scale(1);    opacity: 1; }
.moon { transform: rotate(-90deg) scale(0);  opacity: 0; }
:root[data-theme="dark"] .sun  { transform: rotate(90deg) scale(0); opacity: 0; }
:root[data-theme="dark"] .moon { transform: rotate(0deg) scale(1);  opacity: 1; }

.auth {
  display: flex; align-items: center; gap: 10px;
  margin-left: 8px; padding-left: 14px;
  border-left: 1px solid var(--line);
  height: 22px;
}

.auth-link {
  font-size: 13px; font-weight: 500;
  color: var(--ink); position: relative; padding: 4px 0;
  transition: color 0.25s ease;
  cursor: pointer;
}

.auth-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.3s ease, left 0.3s ease;
}

.auth-link:hover { color: var(--accent); }
.auth-link:hover::after { width: 100%; left: 0; }

.divider { color: var(--ink-faint); font-weight: 300; user-select: none; }


/* ===========================================
   MOBILE DRAWER
   =========================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(360px, 85%);
  background: var(--surface);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.4s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-drawer.open { transform: translateX(0); }

.drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 24px 24px;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  transition: border-color 0.4s ease;
}

.drawer-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
}

.drawer-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  border-radius: 50%;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.drawer-close svg { width: 20px; height: 20px; }

.drawer-close:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.drawer-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--field);
  border-radius: 999px;
  padding: 0 14px;
  height: 40px;
  margin-bottom: 24px;
}

.drawer-search svg {
  width: 16px; height: 16px;
  color: var(--ink-soft);
  margin-right: 10px;
}

.drawer-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}

.drawer-search input::placeholder {
  color: var(--ink-soft);
  font-style: italic;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-family: 'Fraunces', serif;
  font-style: italic;
}

.drawer-section a {
  padding: 10px 0;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color 0.25s ease, padding-left 0.25s ease, border-color 0.4s ease;
}

.drawer-section a:hover {
  color: var(--accent);
  padding-left: 8px;
}

.drawer-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-soft);
}


/* ===========================================
   HERO
   =========================================== */
.hero {
  position: relative;
  padding: 70px 72px 50px;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-edge {
  position: absolute;
  left: 28px; top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  display: flex;
  gap: 14px; align-items: center;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  opacity: 0;
  animation: fade-in 1s ease 0.2s forwards;
}

.hero-edge-dot { color: var(--accent); font-size: 8px; letter-spacing: 0; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  animation: fade-in 1s ease 0.3s forwards;
}

.meta-line {
  flex: 1; height: 1px; background: var(--line);
}

.hero-meta-top { margin-bottom: 40px; }
.hero-meta-bottom { margin-top: 40px; animation-delay: 1.2s; }

.hero-stage {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;                          /* was 48px — polaroid ~10% closer to text */
  align-items: center;
  flex: 1;
  min-height: 520px;
}

.hero-type { position: relative; }

.hero-number {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-size: 14px; font-style: italic;
  color: var(--accent);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(12px);
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.hero-headline {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 60px;
}

.hero-headline .word {
  display: inline-block;
  margin-right: 0.18em;
  opacity: 0;
  transform: translateY(24px);
  animation: rise-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-headline .word.italic {
  font-style: italic;
  color: var(--accent);
}

.word-1 { animation-delay: 0.45s; }
.word-2 { animation-delay: 0.55s; }
.word-3 { animation-delay: 0.65s; }
.word-4 { animation-delay: 0.78s; }
.word-5 { animation-delay: 0.88s; }
.word-6 { animation-delay: 0.98s; }

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
  max-width: 820px;
  opacity: 0;
  animation: fade-in 1s ease 1.1s forwards;
}

.hero-caption {
  position: relative;
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
}

.caption-label {
  display: block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-caption p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 380px;
}

.hero-caption em {
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 0;
  transition: gap 0.3s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.hero-link svg { width: 16px; height: 16px; }

.hero-link.primary {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.hero-link.primary:hover {
  gap: 20px;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.hero-link.secondary {
  color: var(--ink-soft);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  border-bottom: 1px solid transparent;
}

.hero-link.secondary:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Polaroid */
.hero-right {
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
}

.hero-frame {
  position: relative;
  opacity: 0;
  transform: translateY(30px) rotate(1.5deg);
  animation: frame-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}

.frame-inner {
  position: relative;
  width: 336px;
  aspect-ratio: 3 / 4;
  background: var(--paper);
  padding: 16px 16px 74px;
  box-shadow:
    0 28px 56px rgba(0,0,0,0.2),
    0 6px 16px rgba(0,0,0,0.08);
  transform: rotate(-2.5deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.4s ease;
}

.hero-frame:hover .frame-inner {
  transform: rotate(0deg) scale(1.02);
}

.frame-inner video {
  width: 100%;
  height: calc(100% - 58px);
  object-fit: cover;
  display: block;
  background: #111;
}

.frame-caption {
  position: absolute;
  left: 16px; right: 16px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.frame-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0;
  line-height: 1;
}

.video-toggle {
  position: absolute;
  top: 24px; right: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, transform 0.25s ease, opacity 0.3s ease;
  opacity: 0;
}

.hero-frame:hover .video-toggle,
.video-toggle:focus-visible { opacity: 1; }

.video-toggle:hover { background: rgba(0, 0, 0, 0.75); transform: scale(1.08); }

.video-toggle svg {
  width: 14px; height: 14px; position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.icon-pause { opacity: 1; transform: scale(1); }
.icon-play  { opacity: 0; transform: scale(0.6); }
.video-toggle.is-paused .icon-pause { opacity: 0; transform: scale(0.6); }
.video-toggle.is-paused .icon-play  { opacity: 1; transform: scale(1); }

.hero-mission {
  max-width: 300px;
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
  opacity: 0;
  animation: fade-in 1s ease 1.3s forwards;
}

.mission-label {
  display: block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
}

.mission-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.mission-text em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--ink);
  font-size: 14px;
}


/* ===========================================
   MARQUEE
   =========================================== */
.marquee {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  background: var(--accent);
  overflow: hidden;
  color: #fff;
}

.marquee-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px 0 40px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.25);
  height: 22px;
}

.marquee-dot {
  color: #fff;
  font-size: 8px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.marquee-viewport {
  flex: 1;
  overflow: hidden;
  padding-left: 28px;
  mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 160s linear infinite;
}

.marquee-track:hover { animation-play-state: paused; }

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 18px;
  padding-right: 18px;
}

.marquee-group span {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  color: #fff;
  white-space: nowrap;
  transition: color 0.25s ease, font-style 0.25s ease;
}

.marquee-group span:not(.dot) { cursor: pointer; }

.marquee-group span:not(.dot):hover {
  font-style: italic;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.marquee-group .dot { color: rgba(255,255,255,0.55); }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ===========================================
   SECTION 03 — HOW IT WORKS
   =========================================== */
.how-section {
  position: relative;
  padding: 120px 72px 100px;
  background: var(--bg);
  overflow: hidden;
}

/* Vertical edge marker like the hero */
.how-edge {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.how-edge-dot { color: var(--accent); font-size: 8px; letter-spacing: 0; }

/* Header */
.how-head {
  max-width: 760px;
  margin: 0 auto 90px;
  text-align: center;
}

.how-kicker {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 24px;
}

.how-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 28px;
}

.how-title em {
  font-style: italic;
  color: var(--accent);
}

.how-intro {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto;
}

/* The three steps */
.how-steps {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 72px;
}

/* Red connector line runs behind all 3 steps, top portion only */
.how-line {
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right,
    transparent 0%,
    var(--accent) 15%,
    var(--accent) 85%,
    transparent 100%);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}

.how-step {
  position: relative;
  z-index: 2;
  text-align: left;
}

/* Numeral + label row */
.how-step-num {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.4s ease;
}

/* Red dot marking the connection to the line */
.how-step-num::before {
  content: '';
  position: absolute;
  top: -44px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: background-color 0.4s ease, transform 0.3s ease;
}

.how-step:hover .how-step-num::before {
  background: var(--accent);
  transform: scale(1.2);
}

.how-numeral {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(64px, 7vw, 96px);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.how-step-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: auto;
}

/* Step body */
.how-step-body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}

.how-step-body p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.how-step-body p em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--ink);
  font-size: 15px;
}

.how-step-note {
  display: block;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faint);
  transition: border-color 0.4s ease;
}

/* Footer CTAs */
.how-foot {
  max-width: 1200px;
  margin: 80px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  transition: border-color 0.4s ease;
}

@media (max-width: 1100px) {
  .how-section { padding: 100px 40px 80px; }
  .how-edge { left: 14px; font-size: 9px; }
  .how-steps { gap: 48px; }
}

@media (max-width: 900px) {
  .how-edge { display: none; }
  .how-steps { grid-template-columns: 1fr; gap: 60px; }
  .how-line { display: none; }
  .how-step-num::before { display: none; }
  .how-head { margin-bottom: 60px; }
  .how-foot { gap: 24px; flex-direction: column; }
}

@media (max-width: 800px) {
  .how-section { padding: 70px 24px 60px; }
}

/* ===========================================
   PLACEHOLDER SECTIONS
   =========================================== */
.placeholder-section {
  padding: 100px 72px;
  background: var(--bg);
}

.ph-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ph-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.ph-dot {
  color: var(--accent);
  font-size: 6px;
}

.ph-number {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(140px, 18vw, 260px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 16px;
  transition: color 0.4s ease;
}

.ph-hint {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faint);
}

.section-divider {
  height: 1px;
  background: var(--line);
  margin: 0 72px;
  transition: background-color 0.4s ease;
}


/* ===========================================
   CHAPTER BREAK — simple centered separator
   =========================================== */
.chapter-break {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 72px;
  transition: background-color 0.4s ease;
}

.chapter-break-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  transition: background-color 0.4s ease;
}

.chapter-break-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  transition: color 0.4s ease;
}

.chapter-break-sup {
  font-size: 11px;
  color: var(--accent);
  line-height: 1;
  transform: translateY(-3px);
}


/* ===========================================
   SECTION 04 — ON CONDITION (grading)
   =========================================== */
.grading {
  position: relative;
  padding: 80px 72px 100px;
  background: var(--bg);
  overflow: hidden;
  transition: background-color 0.4s ease;
}

.grading-edge {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  z-index: 1;
}

.grading-edge-dot { color: var(--accent); font-size: 8px; letter-spacing: 0; }

.grading-head {
  max-width: 760px;
  margin: 0 auto 72px;
  text-align: center;
}

.grading-kicker {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 24px;
}

.grading-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 28px;
}

.grading-title em {
  font-style: italic;
  color: var(--accent);
}

.grading-intro {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto;
}

.grading-intro em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--ink);
  font-size: 15px;
}

/* ---- Cards grid ----
   THE ASCENT:
   A staircase — each card climbs slightly higher than the last.
   Cards become more refined as you ascend, culminating in the
   shimmering Perfect card lifted slightly above the row. */
.grading-cards {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  align-items: end;       /* let each card control its height */
  padding-top: 60px;      /* room for the tallest card */
  padding-bottom: 40px;
  position: relative;
}

/* Subtle base rail the cards seem to rest on */
.grading-cards::before {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 2%;
  right: 2%;
  height: 1px;
  background: linear-gradient(to right,
    transparent 0%,
    var(--line-strong) 15%,
    var(--line-strong) 85%,
    transparent 100%);
  opacity: 0.6;
  z-index: 0;
}

.grade {
  position: relative;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 340px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.4s ease,
              border-color 0.4s ease,
              color 0.4s ease,
              box-shadow 0.4s ease;
  overflow: hidden;
  z-index: 1;
}

/* Staircase: each card sits slightly higher than the last */
.grade-1 { transform: translateY(44px); }
.grade-2 { transform: translateY(30px); }
.grade-3 { transform: translateY(16px); }
.grade-4 { transform: translateY(6px);  }
.grade-5 { transform: translateY(-10px); }

/* And a slight tilt variance for personality */
.grade-1 { transform: translateY(44px) rotate(-1deg); }
.grade-2 { transform: translateY(30px) rotate(0.4deg); }
.grade-3 { transform: translateY(16px) rotate(-0.3deg); }
.grade-4 { transform: translateY(6px)  rotate(0.5deg); }
.grade-5 { transform: translateY(-10px) rotate(-1.2deg); }

.grade:hover {
  transform: translateY(0) rotate(0deg) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  z-index: 5;
}

/* ---- The condition bar at the top of each card ----
   Tells the story visually: choppy for Fair, whole for Perfect. */
.grade-bar {
  position: relative;
  height: 3px;
  margin: 0 -22px 20px;     /* bleed to card edges */
  overflow: hidden;
}

.grade-bar::before {
  content: '';
  position: absolute;
  inset: 0;
}

.grade-1 .grade-bar::before {
  /* Choppy — breaks in the line like a damaged garment */
  background:
    linear-gradient(to right,
      #a8a6a1 0%, #a8a6a1 12%,
      transparent 12%, transparent 18%,
      #a8a6a1 18%, #a8a6a1 30%,
      transparent 30%, transparent 40%,
      #a8a6a1 40%, #a8a6a1 58%,
      transparent 58%, transparent 66%,
      #a8a6a1 66%, #a8a6a1 82%,
      transparent 82%, transparent 90%,
      #a8a6a1 90%);
  opacity: 0.7;
}

.grade-2 .grade-bar::before {
  background:
    linear-gradient(to right,
      #bfa88f 0%, #bfa88f 30%,
      transparent 30%, transparent 36%,
      #bfa88f 36%, #bfa88f 72%,
      transparent 72%, transparent 78%,
      #bfa88f 78%, #bfa88f 100%);
  opacity: 0.8;
}

.grade-3 .grade-bar::before {
  background:
    linear-gradient(to right,
      #d89888 0%, #d89888 48%,
      transparent 48%, transparent 52%,
      #d89888 52%, #d89888 100%);
  opacity: 0.85;
}

.grade-4 .grade-bar::before {
  background: var(--accent);
  opacity: 0.85;
}

.grade-5 .grade-bar::before {
  background: linear-gradient(to right,
    #fff 0%,
    #ffd4d9 30%,
    #fff 50%,
    #ffd4d9 70%,
    #fff 100%);
  opacity: 0.95;
  animation: bar-shimmer 3s ease-in-out infinite;
}

@keyframes bar-shimmer {
  0%, 100% { transform: translateX(-10%); }
  50%      { transform: translateX(10%); }
}

.grade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.grade-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  transition: color 0.4s ease;
}

.grade-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.grade-name {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 4px;
  transition: color 0.4s ease;
}

.grade-sub {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  transition: color 0.4s ease;
}

.grade-criteria {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}

.grade-criteria li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 8px;
  transition: color 0.4s ease;
}

.grade-criteria li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px; height: 1px;
  background: var(--ink-faint);
  transition: background-color 0.4s ease;
}

.grade-foot {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faint);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  transition: color 0.4s ease, border-color 0.4s ease;
}

/* ---- Special decorations ----

   Fair: a loose red thread dangling off the bottom-right corner.
   Tiny detail but it whispers "worn in." */
.grade-thread {
  position: absolute;
  bottom: -4px;
  right: 16px;
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
  opacity: 0.6;
  transform-origin: top center;
  animation: thread-sway 4s ease-in-out infinite;
  z-index: 2;
}

.grade-thread::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

@keyframes thread-sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

/* Excellent: a small quality-check seal in the corner */
.grade-seal {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transform: rotate(-8deg);
  transition: transform 0.4s ease;
}

.grade-seal svg {
  width: 14px;
  height: 14px;
}

.grade-4:hover .grade-seal {
  transform: rotate(0deg) scale(1.1);
}

/* ---- Gradient across the five cards ---- */

/* 01 — Fair — dusty grey, faded feel */
.grade-1 {
  background:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 8px,
      rgba(0,0,0,0.015) 8px, rgba(0,0,0,0.015) 9px),
    linear-gradient(180deg, #f2f1ec 0%, #e8e6e0 100%);
  border-color: #dcdad4;
  color: #595854;
}
:root[data-theme="dark"] .grade-1 {
  background:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 8px,
      rgba(255,255,255,0.02) 8px, rgba(255,255,255,0.02) 9px),
    linear-gradient(180deg, #2a2a2e 0%, #222226 100%);
  border-color: #3a3a3e;
  color: #c8c7c3;
}

.grade-1 .grade-name,
.grade-1 .grade-num { color: #4a4945; }
:root[data-theme="dark"] .grade-1 .grade-name,
:root[data-theme="dark"] .grade-1 .grade-num { color: #d8d7d3; }

/* 02 — Good — warmer neutral */
.grade-2 {
  background: linear-gradient(180deg, #f6f4ee 0%, #f0ede5 100%);
  border-color: #e4e0d6;
}
:root[data-theme="dark"] .grade-2 {
  background: linear-gradient(180deg, #2e2c28 0%, #282622 100%);
  border-color: #42403a;
}
:root[data-theme="dark"] .grade-2 .grade-name { color: #e8e6dd; }

/* 03 — Very Good — soft blush warming */
.grade-3 {
  background: linear-gradient(180deg, #fbf6f3 0%, #f7ede8 100%);
  border-color: #eedfd6;
}
:root[data-theme="dark"] .grade-3 {
  background: linear-gradient(180deg, #332628 0%, #2e2022 100%);
  border-color: #4d3438;
}
:root[data-theme="dark"] .grade-3 .grade-name { color: #f2d8d0; }

.grade-3 .grade-dot { background: #e0a494; }

/* 04 — Excellent — clear red blush with pinker tint */
.grade-4 {
  background: linear-gradient(180deg, #ffe2e5 0%, #ffc9ce 100%);
  border-color: #f4a7ae;
  color: #5a1820;
}
:root[data-theme="dark"] .grade-4 {
  background: linear-gradient(180deg, #4a1f25 0%, #5a1c24 100%);
  border-color: #7a2a34;
  color: #ffd4d9;
}

.grade-4 .grade-name { color: #8a1e28; }
:root[data-theme="dark"] .grade-4 .grade-name { color: #ffc5cc; }
.grade-4 .grade-dot { background: var(--accent); }
.grade-4 .grade-num { color: #a83440; }
:root[data-theme="dark"] .grade-4 .grade-num { color: #ff9da6; }
.grade-4 .grade-criteria li { color: #7a2a32; }
:root[data-theme="dark"] .grade-4 .grade-criteria li { color: #f0b8be; }
.grade-4 .grade-criteria li::before { background: #c55560; }
.grade-4 .grade-sub,
.grade-4 .grade-foot { color: #9a4048; }
:root[data-theme="dark"] .grade-4 .grade-sub,
:root[data-theme="dark"] .grade-4 .grade-foot { color: #e0a0a8; }
.grade-4 .grade-foot { border-top-color: #e69aa0; }
:root[data-theme="dark"] .grade-4 .grade-foot { border-top-color: #7a2a34; }

/* 05 — Perfect — shimmering, foil-like red trading card
   Slightly larger & lifted — the trophy at the top of the stair. */
.grade-5 {
  background: linear-gradient(135deg,
    #ff4b5a 0%,
    #d81e2c 40%,
    #ff4b5a 55%,
    #ff8089 70%,
    #d81e2c 100%);
  background-size: 200% 200%;
  border: none;
  color: #fff;
  box-shadow:
    0 16px 40px rgba(255, 75, 90, 0.4),
    inset 0 0 30px rgba(255, 255, 255, 0.08);
  animation: foil-breathe 6s ease-in-out infinite;
  min-height: 380px;
  padding: 28px 24px 26px;
}

@keyframes foil-breathe {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}

/* Specular shine */
.grade-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 220% 100%;
  background-position: 100% 0;
  pointer-events: none;
  animation: shine-sweep 4.5s ease-in-out infinite;
  mix-blend-mode: overlay;
  z-index: 1;
}

@keyframes shine-sweep {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: -50% 0; }
}

/* Sparkles */
.grade-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  animation: sparkle-twinkle 3s ease-in-out infinite;
}

.sparkle::before,
.sparkle::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 1px;
}

.sparkle::before {
  top: 50%; left: -4px;
  width: 12px; height: 1px;
  transform: translateY(-50%);
}

.sparkle::after {
  left: 50%; top: -4px;
  width: 1px; height: 12px;
  transform: translateX(-50%);
}

.s1 { top: 12%; left: 18%; animation-delay: 0s;   }
.s2 { top: 28%; right: 14%; animation-delay: 0.6s; }
.s3 { top: 48%; left: 32%; animation-delay: 1.2s; }
.s4 { top: 62%; right: 22%; animation-delay: 1.8s; }
.s5 { top: 78%; left: 14%; animation-delay: 2.4s; }
.s6 { top: 38%; left: 68%; animation-delay: 0.3s; }
.s7 { top: 86%; right: 38%; animation-delay: 1.5s; }

@keyframes sparkle-twinkle {
  0%, 100%     { opacity: 0; transform: scale(0.4); }
  20%, 30%     { opacity: 1; transform: scale(1); }
  45%          { opacity: 0; transform: scale(0.4); }
}

/* Perfect card text contrast */
.grade-5 .grade-head,
.grade-5 .grade-name,
.grade-5 .grade-sub,
.grade-5 .grade-criteria li,
.grade-5 .grade-foot {
  position: relative;
  z-index: 3;
  color: #fff;
}

.grade-5 .grade-num {
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 3;
}

.grade-5 .grade-dot {
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 3;
}

.grade-5 .grade-sub,
.grade-5 .grade-foot { color: rgba(255, 255, 255, 0.85); }

.grade-5 .grade-criteria li { color: rgba(255, 255, 255, 0.9); }

.grade-5 .grade-criteria li::before {
  background: rgba(255, 255, 255, 0.6);
}

.grade-5 .grade-foot {
  border-top-color: rgba(255, 255, 255, 0.25);
}

.grade-5:hover {
  transform: translateY(-20px) rotate(0deg) !important;
  box-shadow:
    0 28px 56px rgba(255, 75, 90, 0.55),
    inset 0 0 40px rgba(255, 255, 255, 0.12);
}

/* ---- Section foot ---- */
.grading-foot {
  max-width: 1200px;
  margin: 40px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}


/* ===========================================
   REDUCED MOTION — stop shimmer, sparkles, travel
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  .seam-needle,
  .grade-5,
  .grade-shine,
  .grade-bar::before,
  .grade-thread,
  .sparkle {
    animation: none !important;
  }
  .grade-shine { display: none; }
  .grade-1, .grade-2, .grade-3, .grade-4, .grade-5 {
    transform: none !important;
  }
}


/* ===========================================
   RESPONSIVE — grading cards
   =========================================== */
@media (max-width: 1100px) {
  .grading { padding: 60px 40px 80px; }
  .grading-edge { left: 14px; font-size: 9px; }
  .grading-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-top: 40px;
  }
  /* On tablet, reset the staircase so cards fit */
  .grade-1, .grade-2, .grade-3, .grade-4, .grade-5 {
    transform: rotate(0deg);
  }
  .grade-5 { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .grading { padding: 50px 24px 60px; }
  .grading-edge { display: none; }
  .grading-cards {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 20px;
  }
  .grading-cards::before { display: none; }

  /* Tilt alternating cards like scattered polaroids */
  .grade-1 { transform: rotate(-1.5deg); }
  .grade-2 { transform: rotate(1deg); }
  .grade-3 { transform: rotate(-1deg); }
  .grade-4 { transform: rotate(1.2deg); }
  .grade-5 { transform: rotate(-1.5deg); }

  .grade { min-height: auto; padding: 22px 20px 20px; }
  .grade-5 { grid-column: auto; min-height: auto; padding: 24px 22px 22px; }

  .grade:hover {
    transform: rotate(0deg) !important;
  }

  .chapter-break { padding: 40px 24px; gap: 16px; }
  .chapter-break-label { font-size: 11px; }
}


/* ===========================================
   FOOTER
   =========================================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 32px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.footer-rule-sep { color: var(--ink-faint); }

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 32px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }

.footer-col h4 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}

.footer-col a {
  font-size: 13px;
  color: var(--ink-soft);
  transition: color 0.25s ease, padding-left 0.25s ease;
  padding: 3px 0;
}

.footer-col a:hover {
  color: var(--accent);
  padding-left: 6px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-logo { height: 28px; width: auto; }

.footer-wordmark {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
}

.footer-mission {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 320px;
}

.footer-mission em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--ink);
  font-size: 14px;
}

.footer-bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border-radius: 50%;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-2px);
}

.footer-social svg { width: 18px; height: 18px; }

.footer-legals {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
}

.footer-legals a {
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.footer-legals a:hover { color: var(--accent); }

.legal-sep {
  color: var(--ink-faint);
  font-weight: 300;
}

.footer-copyright {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-align: right;
}


/* ===========================================
   AUTH MODAL + TAPE ANIMATION
   =========================================== */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}

.auth-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* The tape strips — scrolling brands as a background animation */
.auth-tape {
  position: absolute;
  left: -10%;
  right: -10%;
  width: 120%;
  height: 80px;
  overflow: hidden;
  background: var(--accent);
  transform: rotate(-3deg);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.auth-modal.open .auth-tape {
  opacity: 0.92;
}

.auth-tape-1 {
  top: 12%;
  transform: rotate(-6deg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.auth-tape-2 {
  top: 44%;
  transform: rotate(2deg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.auth-tape-3 {
  top: 75%;
  transform: rotate(-4deg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.tape-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  animation: tape-scroll 90s linear infinite;
}

.tape-track.tape-reverse {
  animation: tape-scroll-reverse 75s linear infinite;
}

.tape-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 24px;
  padding-right: 24px;
}

.tape-group span {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 44px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.tape-group .dot { color: rgba(255,255,255,0.5); font-style: normal; }

@keyframes tape-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes tape-scroll-reverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* The modal card */
.auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 36px 36px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal.open .auth-card {
  transform: translateY(0) scale(1);
}

.auth-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.auth-close:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.auth-close svg { width: 16px; height: 16px; }

.auth-head {
  text-align: center;
  margin-bottom: 24px;
}

.auth-kicker {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.auth-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.auth-tabs {
  position: relative;
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  padding: 12px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.auth-tab.active { color: var(--ink); }
.auth-tab:hover { color: var(--accent); }

.auth-tab-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.auth-form.active { display: flex; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.auth-field input {
  height: 40px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid transparent;
  border-radius: 2px;
  outline: none;
  transition: background-color 0.4s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.4s ease;
}

.auth-field input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
}

.auth-check input {
  accent-color: var(--accent);
}

.auth-check a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.auth-minor {
  font-size: 12px;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.auth-minor:hover { color: var(--accent); }

.auth-submit {
  margin-top: 8px;
  height: 44px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.auth-submit:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.auth-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.auth-foot-line { flex: 1; height: 1px; background: var(--line); }

.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-social-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.4s ease;
}

.auth-social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.auth-swap {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.auth-swap span {
  display: none;
}

.auth-swap span.active {
  display: inline;
}

.auth-swap a {
  color: var(--accent);
  cursor: pointer;
}

.auth-swap a:hover { text-decoration: underline; }


/* ===========================================
   404 PAGE
   =========================================== */
.notfound {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 70px 72px;
  position: relative;
  overflow: hidden;
}

.nf-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.nf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 24px;
  opacity: 0;
  animation: fade-in 0.9s ease 0.2s forwards;
}

.nf-kicker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.nf-number {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(140px, 22vw, 320px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 32px;
}

.nf-number .digit {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: rise-in 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nf-number .digit:nth-child(1) { animation-delay: 0.3s; }
.nf-number .digit:nth-child(2) { animation-delay: 0.45s; color: var(--accent); }
.nf-number .digit:nth-child(3) { animation-delay: 0.6s; }

.nf-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--ink);
  max-width: 500px;
  opacity: 0;
  animation: fade-in 1s ease 0.85s forwards;
}

.nf-title em { font-style: italic; color: var(--accent); }

.nf-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 440px;
  margin-bottom: 40px;
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
  opacity: 0;
  animation: fade-in 1s ease 1s forwards;
}

.nf-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-in 1s ease 1.15s forwards;
}

.nf-actions .hero-link { padding: 6px 0; }

.nf-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf-stack {
  position: relative;
  width: 340px;
  height: 440px;
  opacity: 0;
  animation: fade-in 1.2s ease 0.5s forwards;
}

.nf-polaroid {
  position: absolute;
  width: 280px;
  aspect-ratio: 3/4;
  background: var(--paper);
  padding: 14px 14px 52px;
  box-shadow:
    0 24px 48px rgba(0,0,0,0.2),
    0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.4s ease;
}

.nf-polaroid.back   { top: 50px; left: 10px; transform: rotate(-6deg); }
.nf-polaroid.middle { top: 20px; left: 40px; transform: rotate(3deg); }
.nf-polaroid.front  {
  top: 0; left: 70px;
  transform: rotate(-2deg);
  background: transparent;
  border: 2px dashed var(--line-strong);
  box-shadow: none;
}

.nf-stack:hover .nf-polaroid.back   { transform: rotate(-8deg) translate(-8px, 4px); }
.nf-stack:hover .nf-polaroid.middle { transform: rotate(5deg) translate(6px, -4px); }
.nf-stack:hover .nf-polaroid.front  { transform: rotate(0deg) translateY(-4px); }

.nf-polaroid-inside {
  width: 100%;
  height: calc(100% - 14px);
  background: linear-gradient(135deg, var(--field) 25%, transparent 25%, transparent 50%, var(--field) 50%, var(--field) 75%, transparent 75%);
  background-size: 14px 14px;
  opacity: 0.6;
}

.nf-polaroid.front .nf-polaroid-inside {
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.nf-polaroid-caption {
  position: absolute;
  left: 14px; right: 14px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nf-polaroid-caption .nf-poln {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0;
}

.nf-edge {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  opacity: 0;
  animation: fade-in 1s ease 1.3s forwards;
}

.nf-edge-dot { color: var(--accent); font-size: 8px; letter-spacing: 0; }


/* ===========================================
   SCROLL-TO-TOP + TOAST
   =========================================== */
.scroll-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  z-index: 90;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease, transform 0.3s ease,
              background-color 0.4s ease, color 0.4s ease;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover { background: var(--accent); transform: translateY(-3px); }
.scroll-top svg { width: 18px; height: 18px; }

.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translate(-50%, 20px);
  padding: 10px 20px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 250;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: opacity 0.25s ease, transform 0.25s ease,
              background-color 0.4s ease, color 0.4s ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* ===========================================
   KEYFRAMES
   =========================================== */
@keyframes fade-in { to { opacity: 1; } }
@keyframes rise-in { to { opacity: 1; transform: translateY(0); } }
@keyframes frame-in { to { opacity: 1; transform: translateY(0) rotate(0); } }


/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track, .tape-track { animation: none; }
}


/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */
@media (max-width: 1100px) {
  .hero { padding: 50px 40px 40px; }
  .hero-edge { left: 14px; font-size: 9px; }
  .hero-stage { grid-template-columns: 1fr 300px; gap: 36px; }
  .frame-inner { width: 280px; }
  .hero-mission { max-width: 260px; }
  .nav-rule { font-size: 10px; gap: 10px; }
  .kbd-hint { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .placeholder-section { padding: 80px 40px; }
}

/* Tablet / medium */
@media (max-width: 900px) {
  .nav-rule { display: none; }
  body { padding-top: 56px; }

  /* Burger visible, categories hidden */
  .nav-burger { display: flex; }
  .nav-categories { display: none; }
  .separator { display: none; }
  .nav-search { display: none; }
  .nav-search-trigger { display: inline-flex; }
  .lang-picker { display: none; }
  .auth { display: none; }

  .nav-inner {
    grid-template-columns: auto 1fr auto;
    padding: 0 16px;
    gap: 12px;
  }
}

/* Phone */
@media (max-width: 800px) {
  .hero { padding: 40px 24px; min-height: auto; }
  .hero-edge { display: none; }
  .hero-stage { grid-template-columns: 1fr; gap: 40px; }

  /* Hide polaroid video on mobile per request */
  .hero-right { display: none; }

  .hero-headline { font-size: clamp(42px, 11vw, 72px); margin-bottom: 40px; }
  .hero-foot { grid-template-columns: 1fr; gap: 32px; max-width: 100%; }
  .hero-actions { align-items: flex-start; }
  .marquee-label { padding: 0 16px 0 20px; }
  .scroll-top { bottom: 16px; right: 16px; }

  .placeholder-section { padding: 60px 24px; }
  .section-divider { margin: 0 24px; }

  .footer-inner { padding: 40px 24px 24px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 40px;
  }
  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .footer-legals { justify-content: center; }
  .footer-copyright { text-align: center; }
  .footer-rule { font-size: 10px; padding: 8px 16px; }

  .notfound {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 50px 24px;
  }
  .nf-edge { display: none; }
  .nf-stack { width: 280px; height: 360px; margin: 0 auto; }
  .nf-polaroid { width: 220px; }

  .auth-card { padding: 28px 24px 22px; }
  .auth-title { font-size: 24px; }
  .tape-group span { font-size: 32px; }
  .auth-tape { height: 62px; }
}
