/* ============================================================
   451 PROJECT — Design System
   Aesthetic: Editorial luxury / fragrance house
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #F7F4EF;
  --bg-dark:    #1C1A17;
  --ink:        #1C1A17;
  --ink-mid:    #6B6560;
  --ink-light:  #A8A29C;
  --gold:       #B5924A;
  --gold-light: #D4AE72;
  --rule:       #E3DED7;

  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'Jost', system-ui, sans-serif;

  --max:    1240px;
  --pad:    clamp(1.5rem, 5vw, 4rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(3.5rem, 8vw, 7rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
h4 { font-size: 1.2rem; }

p { max-width: 60ch; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity .2s;
}
a:hover { opacity: .55; }

em { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem var(--pad);
  transition: background .4s, box-shadow .4s;
}

.nav.scrolled {
  background: rgba(247,244,239,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--rule);
}

.nav__logo {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: .04em;
}

.nav__logo span {
  color: var(--gold);
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav__links a {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .3s ease;
}

.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__links a:hover { opacity: 1; }

.nav__links a.active { color: var(--gold); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  padding-top: 8rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(181,146,74,.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero__eyebrow {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero__title {
  margin-bottom: 2rem;
}

.hero__title em {
  color: var(--gold);
  font-style: italic;
}

.hero__sub {
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 3rem;
}

.hero__rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero__rule::before {
  content: '';
  flex: 0 0 3rem;
  height: 1px;
  background: var(--gold);
}

.hero__rule span {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .9rem 2rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}

.btn:hover {
  background: var(--ink);
  color: var(--bg);
  opacity: 1;
}

.btn--gold {
  border-color: var(--gold);
  color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold);
  color: var(--bg);
}

.btn__arrow {
  display: inline-block;
  transition: transform .25s;
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ── Sections ─────────────────────────────────────────────── */
.section {
  padding-block: clamp(5rem, 10vw, 9rem);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--bg);
}

.section--dark .section__label { color: var(--gold-light); }
.section--dark p { color: rgba(247,244,239,.7); }
.section--dark hr { border-color: rgba(255,255,255,.1); }

.section__label {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.section__title {
  margin-bottom: 1.5rem;
}

.section__intro {
  font-size: 1.1rem;
  color: var(--ink-mid);
  margin-bottom: 3.5rem;
  line-height: 1.85;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.section--dark .card { border-color: rgba(255,255,255,.12); }

.card__number {
  font-family: var(--serif);
  font-size: .9rem;
  color: var(--gold);
  margin-bottom: 1rem;
  letter-spacing: .05em;
}

.card__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: .75rem;
  font-weight: 400;
}

.card__text {
  font-size: .92rem;
  color: var(--ink-mid);
  line-height: 1.8;
}

.section--dark .card__text { color: rgba(247,244,239,.55); }

/* ── Pull Quote ───────────────────────────────────────────── */
.pullquote {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  border-left: 2px solid var(--gold);
  padding-left: 2rem;
  margin-block: 3rem;
  color: var(--ink);
}

.section--dark .pullquote { color: var(--bg); }

/* ── Documentation Styles ─────────────────────────────────── */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 5rem;
  align-items: start;
}

.doc-nav {
  position: sticky;
  top: 7rem;
}

.doc-nav__title {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.25rem;
}

.doc-nav__list {
  list-style: none;
  border-left: 1px solid var(--rule);
}

.doc-nav__list li a {
  display: block;
  padding: .45rem 1rem;
  font-size: .85rem;
  color: var(--ink-mid);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .2s, border-color .2s;
}

.doc-nav__list li a:hover,
.doc-nav__list li a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  opacity: 1;
}

.doc-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 1.25rem;
  padding-top: 2rem;
}

.doc-content h3 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: .75rem;
}

.doc-content p {
  color: var(--ink-mid);
  margin-bottom: 1.25rem;
  max-width: 68ch;
}

.doc-content ul, .doc-content ol {
  padding-left: 1.5rem;
  color: var(--ink-mid);
  margin-bottom: 1.25rem;
}

.doc-content li { margin-bottom: .4rem; line-height: 1.7; }

.doc-section { padding-bottom: 4rem; border-bottom: 1px solid var(--rule); margin-bottom: 4rem; }
.doc-section:last-child { border-bottom: none; }

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .82em;
  background: rgba(181,146,74,.1);
  color: var(--gold);
  padding: .15em .4em;
  border-radius: 3px;
}

pre {
  background: var(--bg-dark);
  color: #E8E3DC;
  padding: 1.75rem;
  overflow-x: auto;
  margin-block: 1.5rem;
  line-height: 1.6;
  font-size: .85rem;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

@media (max-width: 800px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav { display: none; }
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-dark);
  color: rgba(247,244,239,.45);
  padding-block: 3.5rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: rgba(247,244,239,.8);
}

.footer__logo span { color: var(--gold); }

.footer__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer__links a {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(247,244,239,.45);
  transition: color .2s;
}

.footer__links a:hover { color: var(--gold-light); opacity: 1; }

.footer__copy {
  font-size: .75rem;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  margin-top: .5rem;
}

/* ── Divider ornament ─────────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1.5rem;
}

.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.ornament span {
  font-size: .65rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── Stat row ─────────────────────────────────────────────── */
.stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  padding-block: 3.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-block: 4rem;
}

.stat__value {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  margin-bottom: .35rem;
}

.stat__value em { color: var(--gold); font-style: normal; }

.stat__label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── Page header (inner pages) ────────────────────────────── */
.page-header {
  padding-top: clamp(7rem, 14vw, 11rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}

.page-header__eyebrow {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.page-header__title { margin-bottom: 1.25rem; }

.page-header__sub {
  font-size: 1.1rem;
  color: var(--ink-mid);
  line-height: 1.85;
  max-width: 62ch;
}

/* ── Scroll fade-in ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
