/* Sillage Next Editorial System
   Applied from the attached reference and enhanced for the existing local-first app.
   Visual-only layer: existing IDs, data attributes and interaction hooks remain intact. */

:root {
  --nx-ink: #271b18;
  --nx-ink-2: #4a332a;
  --nx-muted: #806b60;
  --nx-ivory: #f7f0e7;
  --nx-paper: #fffaf4;
  --nx-blush: #ead7cb;
  --nx-terra: #a85f48;
  --nx-terra-deep: #7f3f31;
  --nx-line: rgba(78, 48, 37, .16);
  --nx-line-strong: rgba(78, 48, 37, .28);
  --nx-shadow: 0 18px 48px rgba(57, 34, 26, .10);
  --nx-shadow-soft: 0 8px 24px rgba(57, 34, 26, .07);
}

html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  background:
    linear-gradient(rgba(247,240,231,.86), rgba(247,240,231,.86)),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(90,51,39,.035) 25%);
  color: var(--nx-ink);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image: linear-gradient(90deg, transparent 0 49.9%, rgba(90,51,39,.045) 50%, transparent 50.1%);
  mix-blend-mode: multiply;
  z-index: -1;
}

.container { width: min(calc(100% - 5rem), 86rem); }
.site-header {
  background: rgba(247,240,231,.78);
  border-bottom: 1px solid var(--nx-line);
  box-shadow: 0 3px 18px rgba(57,34,26,.035);
}
.nav-shell { min-height: 5.8rem; }
.brand { gap: .72rem; }
.brand strong { font-family: var(--sillage-font-ui); font-size: .86rem; letter-spacing: .26em; }
.brand small { font-size: .68rem; color: var(--nx-muted); }
.brand-mark { filter: drop-shadow(0 4px 6px rgba(90,51,39,.10)); }
.desktop-nav { margin-inline: auto; gap: .15rem; }
.desktop-nav a {
  position: relative;
  padding: .56rem .78rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--nx-muted);
  font-size: .78rem;
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}
.desktop-nav a:hover, .desktop-nav a:focus-visible {
  color: var(--nx-ink);
  background: rgba(255,250,244,.8);
  border-color: var(--nx-line);
  transform: translateY(-1px);
}
.nav-actions { gap: .4rem; }
.nav-mode, .nav-language, .nav-search {
  border: 1px solid var(--nx-line-strong);
  background: rgba(255,250,244,.54);
  color: var(--nx-ink);
  border-radius: 999px;
  min-height: 2.45rem;
  transition: .25s ease;
}
.nav-mode { background: var(--nx-ink); border-color: var(--nx-ink); color: var(--nx-paper); }
.nav-mode:hover, .nav-language:hover, .nav-search:hover { background: var(--nx-terra); border-color: var(--nx-terra); color: white; }

.hero {
  position: relative;
  min-height: min(50rem, calc(100svh - 5.8rem));
  align-items: center;
  padding-block: clamp(4rem, 8vw, 8rem) clamp(4rem, 7vw, 6rem);
  gap: clamp(2.5rem, 7vw, 7rem);
}
.hero::before {
  content: 'SILLAGE / 01';
  position: absolute;
  inset-block-start: 1.65rem;
  inset-inline-start: 0;
  font: .62rem/1 var(--sillage-font-ui);
  letter-spacing: .19em;
  color: var(--nx-muted);
}
.hero-copy { max-width: 40rem; padding-inline-start: clamp(0rem, 2vw, 2rem); }
.hero-copy::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: -2.5rem;
  width: 7rem;
  height: 1px;
  background: var(--nx-terra);
  opacity: .75;
}
.hero h1 {
  max-width: 13ch;
  font-family: var(--sillage-font-editorial);
  font-size: clamp(4rem, 7.8vw, 8rem);
  line-height: .84;
  letter-spacing: -.075em;
  text-wrap: balance;
}
.hero h1 em { display: inline-block; color: var(--nx-terra); font-style: normal; }
.hero-lede { max-width: 32rem; color: var(--nx-muted); line-height: 2.05; }
.hero-actions { margin-block-start: 2.2rem; }
.button {
  border-radius: 999px;
  min-height: 3.35rem;
  padding-inline: 1.35rem;
  transition: transform .25s var(--sillage-ease-apple), box-shadow .25s ease, background .25s ease;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(57,34,26,.14); }
.button-dark { background: var(--nx-ink); box-shadow: 0 8px 18px rgba(57,34,26,.14); }
.button-dark:hover { background: var(--nx-terra-deep); }
.hero-meta { margin-block-start: 4.75rem; font-size: .7rem; color: var(--nx-muted); }
.hero-atmosphere {
  min-height: clamp(32rem, 48vw, 42rem);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 2rem;
  box-shadow: var(--nx-shadow);
  isolation: isolate;
}
.hero-atmosphere::before { opacity: .74; }
.hero-atmosphere::after { inset: .7rem; border: 1px solid rgba(255,250,244,.25); }
.specimen-intro, .atmosphere-caption { font-size: .6rem; letter-spacing: .12em; }
.specimen-detail { box-shadow: 0 10px 24px rgba(38,21,17,.12); }

.journey-section {
  position: relative;
  margin-block: 2rem 3rem;
  padding: clamp(2rem, 4vw, 4.6rem);
  border: 1px solid var(--nx-line);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(255,250,244,.86), rgba(238,220,210,.64));
  box-shadow: var(--nx-shadow-soft);
}
.journey-section::before {
  content: 'CHOOSE YOUR ENTRY';
  position: absolute;
  inset-block-start: 1.35rem;
  inset-inline-start: 1.5rem;
  color: var(--nx-terra);
  font-size: .58rem;
  letter-spacing: .16em;
}
.journey-grid { gap: .9rem; }
.journey-card {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: 1.1rem;
  background: rgba(255,250,244,.72);
  box-shadow: 0 4px 0 rgba(90,51,39,.03);
  transition: transform .35s var(--sillage-ease-apple), background .35s ease, color .35s ease, box-shadow .35s ease;
}
.journey-card::before {
  content: '';
  position: absolute;
  inset: auto -20% -55% 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(168,95,72,.10);
  transition: transform .5s ease;
}
.journey-card:hover { box-shadow: var(--nx-shadow); }
.journey-card:hover::before { transform: translate(-15%, -18%) scale(1.2); }
.journey-card strong, .journey-card span, .journey-card small, .journey-card i { position: relative; z-index: 1; }

.manifesto { padding-block: clamp(5rem, 9vw, 8rem); border-block-color: var(--nx-line); }
.manifesto-copy h2, .section-heading h2, .journey-heading h2 { font-family: var(--sillage-font-editorial); }
.manifesto-text { color: var(--nx-muted); }
.arrow-link { color: var(--nx-terra-deep); }

.explore {
  position: relative;
  margin-block: 3rem;
  padding: clamp(2rem, 5vw, 5rem);
  border: 1px solid var(--nx-line);
  border-radius: 1.5rem;
  background: rgba(255,250,244,.58);
  box-shadow: var(--nx-shadow-soft);
}
.explore::after {
  content: 'ARCHIVE / 12';
  position: absolute;
  inset-block-start: 1.5rem;
  inset-inline-start: 1.5rem;
  font-size: .58rem;
  letter-spacing: .15em;
  color: var(--nx-muted);
}
.section-heading { align-items: end; }
.section-heading h2 { font-size: clamp(3.3rem, 5.6vw, 6.4rem); }
.heading-note { color: var(--nx-muted); font-size: .91rem; }
.explore-toolbar { border-block-color: var(--nx-line); }
.search-field { min-height: 3.35rem; border-color: var(--nx-line-strong); background: rgba(255,250,244,.8); box-shadow: 0 4px 12px rgba(57,34,26,.04); }
.search-field:focus-within { border-color: var(--nx-terra); box-shadow: 0 0 0 4px rgba(168,95,72,.10); }
.filter-chip { border: 1px solid var(--nx-line); border-radius: 999px; transition: .22s ease; }
.filter-chip:hover { border-color: var(--nx-terra); color: var(--nx-terra-deep); transform: translateY(-1px); }
.filter-chip.active { background: var(--nx-ink); border-color: var(--nx-ink); }
.explore-aside { border-color: var(--nx-line); background: rgba(238,220,210,.35); box-shadow: inset 0 1px rgba(255,255,255,.6); }
.fragrance-grid { gap: 1.1rem; }
.fragrance-card {
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: 1.1rem;
  background: var(--nx-paper);
  box-shadow: var(--nx-shadow-soft);
  transition: transform .35s var(--sillage-ease-apple), box-shadow .35s ease, border-color .35s ease;
}
.fragrance-card:hover { border-color: rgba(168,95,72,.42); box-shadow: var(--nx-shadow); }
.fragrance-visual { position: relative; min-height: 15.5rem; background: linear-gradient(145deg, #e9d5c9, #d1aa97); }
.fragrance-visual::after { content: 'S'; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); font: 6rem/1 var(--sillage-font-editorial); color: rgba(255,250,244,.46); }
.card-body h3 { font-family: var(--sillage-font-editorial-text); font-size: 1.55rem; }
.card-footer { border-top-color: var(--nx-line); }

.mood-section { background: linear-gradient(180deg, transparent, rgba(234,215,203,.22), transparent); }
.mood-card, .note-card, .guide-card {
  border-color: var(--nx-line);
  border-radius: 1rem;
  background: rgba(255,250,244,.72);
  transition: transform .3s var(--sillage-ease-apple), border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.mood-card:hover, .note-card:hover, .guide-card:hover { border-color: rgba(168,95,72,.45); box-shadow: var(--nx-shadow-soft); transform: translateY(-4px); }
.mood-card.active { background: var(--nx-ink); }
.notes-section { border-block: 1px solid var(--nx-line); background: linear-gradient(135deg, rgba(234,215,203,.76), rgba(247,240,231,.2)); }
.note-tabs button { border-radius: 999px; }
.family-map, .wheel-layout, .context-grid, .compare-board, .graph-wrap, .glossary-grid, .guide-grid { position: relative; }
.family-map, .wheel-visual, .wheel-detail, .context-panel, .compare-board, .graph-wrap { border-color: var(--nx-line); box-shadow: var(--nx-shadow-soft); }
.family-map { background: radial-gradient(circle at 50% 45%, rgba(168,95,72,.19), transparent 38%), rgba(255,250,244,.72); }
.finder-section { padding-block: clamp(4rem, 8vw, 7rem); }
.finder-panel { position: relative; overflow: hidden; border-radius: 1.6rem; box-shadow: 0 24px 60px rgba(44,27,23,.22); }
.finder-panel::before { content: 'SCENT PROFILE LAB'; position: absolute; inset-block-start: 1.5rem; inset-inline-start: 1.75rem; color: rgba(255,250,244,.55); font-size: .58rem; letter-spacing: .16em; }
.finder-panel::after { content: ''; position: absolute; width: 22rem; height: 22rem; border: 1px solid rgba(234,215,203,.24); border-radius: 50%; inset: -9rem auto auto -6rem; }
.compare-board { background: rgba(255,250,244,.8); }
.compare-selects select, .advanced-filters select, .explore-aside select { border-color: var(--nx-line-strong); border-radius: .65rem; background: var(--nx-paper); }
.modal-backdrop { background: rgba(39,27,24,.48); backdrop-filter: blur(12px); }
.modal { border: 1px solid var(--nx-line); border-radius: 1.35rem; box-shadow: 0 30px 80px rgba(39,27,24,.25); }
.modal-close { border-radius: 50%; background: var(--nx-blush); transition: .2s ease; }
.modal-close:hover { background: var(--nx-terra); color: white; }
.site-footer { margin-top: 3rem; border-top: 1px solid var(--nx-line); background: var(--nx-ink); }

@media (max-width: 1120px) {
  .container { width: min(calc(100% - 3rem), 74rem); }
  .desktop-nav a { padding-inline: .5rem; font-size: .72rem; }
  .nav-search { font-size: 0; padding-inline: .7rem; }
  .nav-search span { font-size: 1.1rem; }
}
@media (max-width: 860px) {
  .container { width: min(calc(100% - 2rem), 44rem); }
  .hero { min-height: auto; padding-block-start: 4rem; }
  .hero::before { inset-inline-start: .5rem; }
  .hero-copy { padding-inline-start: 0; }
  .hero-copy::after { display: none; }
  .hero-atmosphere { min-height: min(34rem, 86vw); }
  .desktop-nav { display: none; }
  .nav-actions { margin-inline-start: auto; }
  .journey-section { grid-template-columns: 1fr; }
  .manifesto { grid-template-columns: 1fr; }
  .manifesto .section-index { order: -1; }
  .section-heading { gap: 1.25rem; }
}
@media (max-width: 560px) {
  .container { width: min(calc(100% - 1.25rem), 34rem); }
  .site-header { position: sticky; top: 0; z-index: 20; }
  .nav-shell { min-height: 4.6rem; }
  .brand strong { font-size: .74rem; letter-spacing: .18em; }
  .brand small { font-size: .58rem; }
  .brand-mark { width: 1.8rem; height: 1.8rem; }
  .nav-mode, .nav-language { display: none; }
  .nav-search { min-width: 2.6rem; }
  .hero { padding-block: 3.2rem 3.7rem; gap: 2.4rem; }
  .hero h1 { font-size: clamp(3.35rem, 16vw, 5rem); line-height: .88; }
  .hero-lede { font-size: .9rem; line-height: 1.9; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button, .hero-actions .text-link { width: 100%; justify-content: center; }
  .hero-meta { margin-block-start: 2.6rem; }
  .hero-atmosphere { min-height: 23rem; border-radius: 1.2rem; }
  .journey-section { padding: 2.35rem 1rem 1rem; border-radius: 1.1rem; }
  .journey-section::before, .explore::after { display: none; }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-card { min-height: 8.8rem; }
  .manifesto { padding-block: 4.3rem; }
  .manifesto-copy h2, .section-heading h2, .journey-heading h2 { font-size: clamp(2.9rem, 14vw, 4.5rem); }
  .section-heading { margin-block-end: 1.8rem; }
  .heading-note { font-size: .84rem; line-height: 1.85; }
  .explore { padding: 1.25rem .8rem 1.5rem; border-radius: 1.1rem; }
  .explore-toolbar { padding-block: .8rem; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; padding-block: .35rem .55rem; scrollbar-width: thin; }
  .filter-chip { flex: 0 0 auto; }
  .explore-aside { grid-template-columns: 1fr 1fr; padding: .8rem; }
  .data-note { grid-column: 1 / -1; }
  .fragrance-grid { grid-template-columns: 1fr; }
  .fragrance-visual { min-height: 12rem; }
  .mood-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
  .mood-card { min-height: 8.4rem; padding: .8rem; }
  .notes-scroller { overflow-x: auto; }
  .note-card { min-width: 15rem; }
  .wheel-visual svg { width: min(100%, 19rem); }
  .finder-panel { padding: 1.25rem; }
  .finder-panel::before { inset-inline-start: 1.25rem; }
  .finder-copy h2 { font-size: clamp(2.6rem, 12vw, 4rem); }
  .finder-visual { min-height: 15rem; transform: scale(.78); margin-block: -1.7rem; }
  .compare-board { padding: .8rem; }
  .compare-selects { gap: .65rem; }
  .compare-selects label { flex-basis: 100%; }
  .compare-selects .button { width: 100%; }
  .modal { width: min(100%, 30rem); max-height: 90dvh; padding: 2.7rem .9rem 1rem; }
  .site-footer { margin-top: 1.5rem; border-radius: 1rem 1rem 0 0; }
}
@media (max-width: 360px) {
  .container { width: calc(100% - 1rem); }
  .hero h1 { font-size: 3.15rem; }
  .mood-grid { grid-template-columns: 1fr; }
  .explore-aside { grid-template-columns: 1fr; }
  .data-note { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
