/* =========================================================
   PETER SAN PEDRO — Premium personal site
   Aesthetic: cigar-band luxury (Rolex / Plasencia inspiration)
   Deep onyx, ivory parchment, antique gold, oxblood.
========================================================= */

/* --- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }

/* --- Tokens ----------------------------------------------- */
:root {
  /* Palette */
  --onyx:        #0b0b0c;     /* near-black base */
  --onyx-2:      #131315;     /* card surface */
  --onyx-3:      #1c1c1f;     /* higher surface */
  --ivory:       #f3ecdc;     /* parchment / cream */
  --ivory-2:     #e8dfca;     /* warm paper */
  --bone:        #bdb5a2;     /* muted ivory */
  --gold:        #c9a24a;     /* antique gold */
  --gold-2:      #b4892f;     /* deeper gold */
  --gold-soft:   #d9b65f;     /* highlight */
  --oxblood:     #5a1a1a;     /* deep cigar red */
  --oxblood-2:   #7a2424;
  --line:        rgba(201,162,74,0.22);
  --line-strong: rgba(201,162,74,0.55);
  --text:        var(--ivory);
  --muted:       #9a9384;

  /* Type */
  --serif:  'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* --- Base ------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--onyx);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(201,162,74,0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(90,26,26,0.15), transparent 60%);
  background-attachment: fixed;
}

::selection { background: var(--gold); color: var(--onyx); }

/* --- Typography ------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ivory);
  line-height: 1.08;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
h4 { font-size: 1.1rem; letter-spacing: 0.02em; }

p { color: var(--bone); font-size: 1.02rem; }
p.lead { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--ivory-2); max-width: 58ch; line-height: 1.55; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.italic-serif { font-family: var(--serif); font-style: italic; color: var(--gold-soft); }

/* --- Layout ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section-tight { padding: clamp(56px, 7vw, 96px) 0; }

.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

/* Gold hairline divider, cigar band style */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 40px auto;
  color: var(--gold);
  opacity: 0.85;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  max-width: 220px;
}
.divider .mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
}

/* --- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--ivory);
  background: transparent;
  transition: all .35s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover { background: var(--gold); color: var(--onyx); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-solid {
  background: var(--gold);
  color: var(--onyx);
  border-color: var(--gold);
}
.btn-solid:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ivory);
}
.btn-ghost:hover { background: var(--ivory); color: var(--onyx); border-color: var(--ivory); }

.btn--compact { padding: 10px 18px; font-size: 0.72rem; letter-spacing: 0.2em; }
@media (max-width: 640px) {
  .nav .btn--compact { display: none; }
}

.cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

/* --- Navigation ------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 11, 12, 0.55);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.scrolled {
  background: rgba(11, 11, 12, 0.88);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.brand__mark {
  width: 38px; height: 38px;
  border: 1px solid var(--gold);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  position: relative;
}
.brand__mark::before, .brand__mark::after{
  content:""; position:absolute; left:50%; transform:translateX(-50%);
  width: 14px; height:1px; background: var(--gold); opacity:.6;
}
.brand__mark::before { top:-4px; } .brand__mark::after { bottom:-4px; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory);
}
.brand__name span { color: var(--gold); font-style: italic; letter-spacing: 0; text-transform: none; font-weight: 400; }

.nav__links { display: flex; gap: 34px; align-items: center; }
.nav__links a {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone);
  padding: 8px 0;
  position: relative;
  transition: color .2s var(--ease);
}
.nav__links a:hover { color: var(--ivory); }
.nav__links a.active { color: var(--gold); }
.nav__links a.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold);
}

.nav__toggle {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  color: var(--ivory);
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 16px; height: 1px; background: var(--ivory); position: relative;
}
.nav__toggle span::before { position: absolute; top: -5px; }
.nav__toggle span::after { position: absolute; top: 5px; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: var(--onyx);
    border-bottom: 1px solid var(--line);
    padding: 24px var(--gutter) 32px;
    gap: 20px;
    transform: translateY(-110%);
    transition: transform .35s var(--ease);
  }
  .nav__links.open { transform: translateY(0); }
}

/* --- Hero ------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 60px;
  position: relative;
  overflow: hidden;
}
.hero__content { max-width: 900px; position: relative; z-index: 2; }
.hero h1 {
  margin: 28px 0 24px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
  font-weight: 400;
}
.hero p.lead { color: var(--ivory-2); }
.hero__meta {
  margin-top: 56px;
  display: flex; gap: 40px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.hero__meta .item .k {
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
}
.hero__meta .item .v {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ivory);
  margin-top: 6px;
}

.hero__ornament {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: 560px; height: 720px;
  pointer-events: none;
  z-index: 1;
}
.hero__portrait {
  position: absolute; inset: 0;
  background-image: url('../images/peter-seated.jpg');
  background-size: cover;
  background-position: center top;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,1) 30%, rgba(0,0,0,0.75) 55%, rgba(0,0,0,0) 78%);
          mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,1) 30%, rgba(0,0,0,0.75) 55%, rgba(0,0,0,0) 78%);
  filter: saturate(0.75) contrast(1.05) brightness(0.85);
}
.hero__portrait::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,11,12,0.95) 0%, rgba(11,11,12,0.35) 40%, rgba(11,11,12,0) 100%),
    linear-gradient(180deg, rgba(11,11,12,0.5) 0%, rgba(11,11,12,0) 40%, rgba(11,11,12,0.7) 100%);
}
.hero__ring {
  position: absolute; inset: 40px 80px 40px 80px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: .7;
}
.hero__ring::before {
  content: "";
  position: absolute; inset: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  opacity: .7;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 40px;
    padding-bottom: 40px;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }
  .hero > .container { order: 1; width: 100%; }
  .hero__ornament {
    order: 2;
    position: relative;
    right: auto; top: auto; transform: none;
    width: calc(100% - 40px);
    max-width: 440px;
    aspect-ratio: 4 / 5;
    height: auto;
    margin: 36px auto 0;
    flex: none;
  }
  .hero__portrait {
    -webkit-mask-image: radial-gradient(circle at 50% 40%, rgba(0,0,0,1) 45%, rgba(0,0,0,0.85) 62%, rgba(0,0,0,0) 82%);
            mask-image: radial-gradient(circle at 50% 40%, rgba(0,0,0,1) 45%, rgba(0,0,0,0.85) 62%, rgba(0,0,0,0) 82%);
  }
  .hero__portrait::after {
    background:
      linear-gradient(180deg, rgba(11,11,12,0) 40%, rgba(11,11,12,0.9) 100%);
  }
  .hero__ring { inset: 10px; }
  .hero__ring::before { inset: 22px; }
}

/* --- Cigar-band frame -------------------------------------
   Ornamental border used on feature headings & cards */
.band {
  position: relative;
  padding: 48px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(28,28,31,0.6), rgba(11,11,12,0.4));
}
.band::before, .band::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  height: 1px; background: var(--gold); opacity: .45;
}
.band::before { top: 10px; }
.band::after { bottom: 10px; }

.corner { position: absolute; width: 14px; height: 14px; border: 1px solid var(--gold); }
.corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

/* --- Section heading ------------------------------------ */
.section-head { margin-bottom: 56px; max-width: 780px; }
.section-head h2 { margin: 18px 0 18px; }
.section-head p { color: var(--ivory-2); font-size: 1.1rem; line-height: 1.6; max-width: 60ch; }

/* --- Cards ---------------------------------------------- */
.card {
  position: relative;
  padding: 36px 32px;
  background: linear-gradient(180deg, rgba(28,28,31,0.75), rgba(19,19,21,0.6));
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: .45;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(34,30,22,0.85), rgba(19,19,21,0.6));
}
.card__num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}
.card h3 { margin: 14px 0 14px; }
.card p { color: var(--bone); font-size: 0.98rem; line-height: 1.6; }
.card .meta {
  margin-top: 22px;
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
}

/* --- Feature rows --------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.feature.reverse { grid-template-columns: 1fr 1.1fr; }
.feature.reverse .feature__media { order: -1; }
@media (max-width: 900px) {
  .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse .feature__media { order: 0; }
}
.feature__media {
  aspect-ratio: 4/5;
  background: var(--onyx-2);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95) contrast(1.02); }
.feature__media .tag {
  position: absolute; bottom: 18px; left: 18px;
  padding: 8px 14px;
  background: rgba(11,11,12,0.7);
  border: 1px solid var(--line-strong);
  color: var(--gold);
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
}

/* --- Portfolio grid ------------------------------------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 780px) { .portfolio-grid { grid-template-columns: 1fr; } }

.work {
  position: relative;
  background: var(--onyx-2);
  border: 1px solid var(--line);
  overflow: hidden;
  display: block;
  transition: border-color .3s var(--ease), transform .5s var(--ease);
}
.work:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.work__media {
  aspect-ratio: 16/10;
  background: #0d0d0f;
  overflow: hidden;
  position: relative;
}
.work__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
  filter: saturate(0.95);
}
.work:hover .work__media img { transform: scale(1.05); }

/* Crest — decorative typographic tile for portfolio cards */
.crest {
  width: 100%; height: 100%;
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(201,162,74,0.08), transparent 60%),
    linear-gradient(180deg, #141416 0%, #0d0d0f 100%);
  display: grid; place-items: center;
  overflow: hidden;
}
.crest::before, .crest::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: .55;
}
.crest::before { top: 18px; }
.crest::after { bottom: 18px; }
.crest__frame {
  position: absolute; inset: 32px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.crest__frame::before, .crest__frame::after {
  content: ""; position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--gold);
}
.crest__frame::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.crest__frame::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.crest__inner {
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  z-index: 1;
  padding: 0 40px;
}
.crest__roman {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.04em;
}
.crest__rule {
  width: 56px; height: 1px;
  background: var(--gold);
  opacity: .7;
}
.crest__label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ivory-2);
}
.crest__seal {
  position: absolute; bottom: 16px; right: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--gold);
  opacity: .7;
  letter-spacing: 0.04em;
}
.work:hover .crest { background: linear-gradient(180deg, #1a1814 0%, #0d0d0f 100%); }
.work:hover .crest__roman { transform: translateY(-2px); transition: transform .4s var(--ease); }
.work__body { padding: 26px 28px 30px; }
.work__cat {
  font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold);
}
.work h3 { margin: 10px 0 8px; font-size: 1.5rem; }
.work p { color: var(--bone); font-size: 0.95rem; }
.work__arrow {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--gold);
  background: rgba(11,11,12,0.6);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.work:hover .work__arrow { background: var(--gold); color: var(--onyx); }

/* --- Case study list ------------------------------------ */
.case {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}
.case:last-child { border-bottom: 1px solid var(--line); }
.case .idx {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.1rem;
}
.case .cat {
  margin-top: 10px;
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
}
.case h3 { margin-bottom: 20px; }
.case dl { display: grid; grid-template-columns: 160px 1fr; gap: 14px 28px; margin-top: 20px; }
.case dt { color: var(--gold); font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; }
.case dd { color: var(--ivory-2); }
@media (max-width: 780px) {
  .case { grid-template-columns: 1fr; gap: 16px; }
  .case dl { grid-template-columns: 1fr; gap: 4px 0; }
  .case dd { margin-bottom: 12px; }
}

/* --- Stats band ----------------------------------------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 54px 0;
}
.stats__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 820px) { .stats__row { grid-template-columns: repeat(2, 1fr); } }
.stats .n { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); color: var(--gold); }
.stats .l { color: var(--bone); font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 4px; }

/* --- Process steps -------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 120px 1fr 1fr; gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}
.step h3 { font-size: 1.6rem; }
.step p { color: var(--bone); }
@media (max-width: 820px) {
  .step { grid-template-columns: 1fr; gap: 14px; }
}

/* --- Quote ---------------------------------------------- */
.quote {
  padding: clamp(48px, 8vw, 96px);
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-style: italic;
  color: var(--ivory);
  max-width: 28ch;
  margin: 0 auto;
  line-height: 1.3;
}
.quote .sig {
  margin-top: 28px;
  font-size: 0.76rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
}

/* --- Final CTA ------------------------------------------ */
.cta {
  position: relative;
  padding: clamp(64px, 10vw, 140px) 0;
  text-align: center;
  overflow: hidden;
}
.cta .container { position: relative; z-index: 1; }
.cta::before {
  content: "";
  position: absolute; inset: 10% 3%;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: .8;
  pointer-events: none;
  animation: cta-ring-breathe 7s ease-in-out infinite;
}
@keyframes cta-ring-breathe {
  0%, 100% {
    transform: scale(1) rotate(-1.2deg);
    box-shadow: 0 0 30px rgba(201,162,74,0.10), inset 0 0 60px rgba(201,162,74,0.05);
  }
  50% {
    transform: scale(1.025) rotate(1.2deg);
    box-shadow: 0 0 65px rgba(201,162,74,0.24), inset 0 0 90px rgba(201,162,74,0.11);
  }
}
/* Gold comet orbiting the ring */
@property --orbit {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.cta::after {
  content: "";
  position: absolute; inset: 10% 3%;
  border-radius: 50%;
  padding: 2.5px;
  /* A long glowing tail chasing a bright hot head around the ring */
  background: conic-gradient(from var(--orbit),
    rgba(217,182,95,0)      0deg,
    rgba(217,182,95,0)      250deg,
    rgba(201,162,74,0.35)   300deg,
    rgba(217,182,95,0.85)   334deg,
    rgba(255,244,214,1)     349deg,
    rgba(255,249,232,1)     356deg,
    rgba(255,244,214,0.9)   360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  /* Stacked blooms = a real halo of light travelling the loop */
  filter:
    drop-shadow(0 0 5px rgba(255,244,214,0.95))
    drop-shadow(0 0 14px rgba(217,182,95,0.8))
    drop-shadow(0 0 30px rgba(201,162,74,0.5));
  pointer-events: none;
  animation: cta-orbit 6s linear infinite;
}
@keyframes cta-orbit { to { --orbit: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .cta::before { animation: none; }          /* no scale/tilt motion */
  .cta::after { animation-duration: 14s; }   /* keep the orbit, gentler */
}
/* Mobile: a narrow viewport squishes the ellipse into a cramped oval the
   headline overflows. Let it bleed past the edges instead — the content
   sits inside one grand arc and the comet sweeps the visible curves. */
@media (max-width: 720px) {
  .cta { overflow: hidden; }
  .cta::before, .cta::after { inset: 4% -36%; }
}
.cta h2 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); max-width: 22ch; margin: 0 auto 20px; }
.cta p { max-width: 54ch; margin: 0 auto 34px; color: var(--ivory-2); }

/* --- Footer --------------------------------------------- */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: #09090a;
}
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 820px) { .foot { grid-template-columns: 1fr 1fr; } }
.foot h5 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.foot a { color: var(--bone); font-size: 0.95rem; display: block; padding: 6px 0; transition: color .2s var(--ease); }
.foot a:hover { color: var(--ivory); }
.foot__bottom {
  margin-top: 44px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: var(--muted); font-size: 0.82rem; letter-spacing: 0.08em;
}
@media (max-width: 640px) { .foot__bottom { flex-direction: column; } }

/* --- Utility -------------------------------------------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0 !important; }

/* --- Animations ----------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* Headline + eyebrow choreography inside any reveal */
.reveal .eyebrow::before {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .9s var(--ease) .15s;
}
.reveal.in .eyebrow::before { transform: scaleX(1); }
.reveal h2 {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(7px);
  transition: opacity .95s var(--ease) .1s, transform .95s var(--ease) .1s, filter .95s var(--ease) .1s;
}
.reveal.in h2 { opacity: 1; transform: none; filter: none; }

/* Image wipe reveal (feature media) — a curtain slides off the image.
   (A clip-path on the observed element would zero its intersection area
   and IntersectionObserver would never fire.) */
.reveal--clip { transform: none; transition: opacity .6s var(--ease); }
.reveal--clip.in { transform: none; }
.reveal--clip::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, var(--onyx-2), var(--onyx));
  transform: scaleX(1);
  transform-origin: right center;
  transition: transform 1.1s var(--ease) .1s;
}
.reveal--clip.in::after { transform: scaleX(0); }
.reveal--clip .tag {
  z-index: 3;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease) .6s, transform .6s var(--ease) .6s;
}
.reveal--clip.in .tag { opacity: 1; transform: none; }

/* Staggered children */
.stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms);
}
.stagger.in > * { opacity: 1; transform: none; }

/* Mobile: same choreography at double speed — phone scrolling is faster
   and long fades read as "slow loading", not elegance. */
@media (max-width: 900px) {
  .reveal { transform: translateY(14px); transition-duration: .4s; }
  .reveal-delay-1 { transition-delay: .04s; }
  .reveal-delay-2 { transition-delay: .08s; }
  .reveal-delay-3 { transition-delay: .12s; }
  .reveal-delay-4 { transition-delay: .16s; }
  .reveal .eyebrow::before { transition-duration: .4s; transition-delay: .05s; }
  .reveal h2 {
    transform: translateY(16px);
    filter: blur(4px);
    transition-duration: .45s;
    transition-delay: .04s;
  }
  .reveal--clip::after { transition-duration: .55s; transition-delay: 0s; }
  .reveal--clip .tag { transition-delay: .25s; }
  .stagger > * { transform: translateY(12px); transition-duration: .38s; }
}

/* Quote: blur settles into focus */
.quote blockquote.reveal {
  transform: translateY(24px) scale(.975);
  filter: blur(9px);
  transition: opacity 1.15s var(--ease), transform 1.15s var(--ease), filter 1.15s var(--ease);
}
.quote blockquote.reveal.in { transform: none; filter: none; }

/* One-shot shine sweep across the final CTA button */
.cta .reveal.in .btn-solid::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -80%; width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-18deg);
  animation: btn-shine 1.3s var(--ease) .8s both;
  pointer-events: none;
}
@keyframes btn-shine { to { left: 135%; } }

/* Scroll-linked parallax (JS writes --py; transforms stay in CSS).
   Desktop-only: on mobile the ornament is position:relative and stacked
   below the content, so this translateY(-50%) must NOT apply there. */
@media (min-width: 901px) {
  .hero__ornament { transform: translateY(-50%) translate3d(0, var(--py, 0px), 0); }
  .feature__media img { transform: translate3d(0, var(--py, 0px), 0) scale(1.12); }
  .hero__content { will-change: opacity, transform; }
}

/* Reduced motion: no movement, no blur, no parallax — but content still
   fades in gracefully instead of the page playing dead. */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal h2, .stagger > *,
  .reveal--clip .tag, .quote blockquote.reveal {
    transform: none; filter: none; clip-path: none;
    transition: opacity .8s var(--ease) var(--d, 0ms);
  }
  .reveal .eyebrow::before { transform: none; transition: none; }
  .reveal--clip { transition: opacity .8s var(--ease); }
  .reveal--clip::after { display: none; }
  .feature__media img { transform: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 901px) {
  .hero__ornament { transform: translateY(-50%); }
  .cta .reveal.in .btn-solid::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* --- Page-specific ------------------------------------- */
.page-hero {
  padding-top: 180px;
  padding-bottom: 100px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin: 18px 0 22px; }
.page-hero p.lead { color: var(--ivory-2); }

.list-check { display: grid; gap: 14px; margin-top: 18px; }
.list-check li {
  display: flex; align-items: baseline; gap: 14px;
  color: var(--ivory-2); font-size: 1.02rem;
}
.list-check li::before {
  content: "";
  width: 10px; height: 10px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  position: relative; top: 4px;
}

/* --- Contact form -------------------------------------- */
.form { display: grid; gap: 22px; max-width: 640px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.form label {
  display: grid; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
}
.form input, .form textarea, .form select {
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line-strong);
  color: var(--ivory);
  padding: 12px 2px;
  font-family: var(--sans);
  font-size: 1rem;
  transition: border-color .2s var(--ease);
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-bottom-color: var(--gold);
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }

/* --- Marquee ribbon ------------------------------------ */
.ribbon {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  background: linear-gradient(180deg, rgba(201,162,74,0.05), rgba(201,162,74,0.01));
}
.ribbon__track {
  display: flex; gap: 54px; white-space: nowrap;
  animation: slide 40s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ivory-2);
}
.ribbon__track span { display: inline-flex; align-items: center; gap: 54px; }
.ribbon__track i {
  font-style: normal; color: var(--gold); font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
}
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Proof strip ---------------------------------------- */
.proof {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 84px);
  margin-top: 52px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof__item { text-align: center; }
.proof__n {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
  color: var(--gold-soft);
}
.proof__l {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Second Brain graph ---------------------------------- */
.brain { position: relative; margin-top: 44px; }
.brain__stage {
  --stage-h: clamp(540px, 68vw, 760px);
  position: relative;
  height: var(--stage-h);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 46%, rgba(201,162,74,0.08), transparent 70%),
    radial-gradient(90% 70% at 50% 55%, rgba(90,26,26,0.10), transparent 75%),
    linear-gradient(180deg, var(--onyx-2), var(--onyx));
  isolation: isolate;
  touch-action: pan-y;
}
.brain__stage::before,
.brain__stage::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  pointer-events: none; z-index: 4;
}
.brain__stage::before { top: 0; }
.brain__stage::after  { bottom: 0; }

/* Detail card ---------------------------------------------- */
.brain__card {
  position: absolute;
  top: 20px; right: 20px;
  width: min(330px, calc(100% - 40px));
  padding: 24px 26px;
  background: rgba(19,19,21,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--c, var(--gold)) 45%, transparent);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  z-index: 6;
  animation: card-in .45s var(--ease);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.brain__card-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: 0;
  color: var(--muted); font-size: 1.3rem; line-height: 1;
  cursor: pointer;
  transition: color .25s;
}
.brain__card-close:hover { color: var(--ivory); }
.brain__card-hub {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans);
  font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: color-mix(in srgb, var(--c, var(--gold)) 80%, var(--ivory));
}
.brain__card-hub::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, var(--gold));
  box-shadow: 0 0 8px var(--c, var(--gold));
}
.brain__card-title {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--ivory);
}
.brain__card-blurb {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--bone);
}
.brain__card-stat {
  display: block;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.brain__card-stat:empty { display: none; }

/* Hint ------------------------------------------------------ */
.brain__hint {
  position: absolute;
  right: 26px; bottom: 24px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}

/* Conversion hook ------------------------------------------- */
.brain__hook {
  margin-top: 46px;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.brain__hook.is-on { opacity: 1; transform: none; }
.brain__hook p {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  color: var(--ivory-2);
  margin-bottom: 22px;
}
.brain__hook .italic-serif { color: var(--gold-soft); }

/* Responsive ------------------------------------------------ */
@media (max-width: 720px) {
  .proof { gap: 20px; }
  .brain__stage { --stage-h: 72vh; min-height: 520px; max-height: 680px; }
  .brain__hint { right: 14px; bottom: 15px; font-size: 0.52rem; }
  .brain__card {
    top: auto; bottom: 14px; left: 14px; right: 14px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .brain__hook { transition: none; }
}

/* --- Brain: card CTA ---------------------------------------- */
.brain__card-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: color .25s var(--ease), border-color .25s var(--ease), gap .3s var(--ease);
}
.brain__card-cta:hover { color: var(--ivory); border-color: var(--gold); gap: 12px; }



/* --- Brain canvas engine ------------------------------------ */
.brain__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
}

/* Center offer overlay — floats over the densest part of the cloud */
.brain__core-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 2px 24px rgba(11,11,12,0.9);
}
.brain__core-label span {
  display: block;
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.brain__core-label b {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1;
  color: var(--gold-soft);
}
.brain__core-label small {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone);
}

/* Callout tag — exposed on hover / auto-scan */
.brain__tag {
  position: absolute;
  left: 0; top: 0;
  z-index: 5;
  padding: 10px 14px 9px;
  background: rgba(19,19,21,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--c, var(--gold)) 55%, transparent);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5),
    0 0 18px color-mix(in srgb, var(--c, var(--gold)) 14%, transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s var(--ease);
  max-width: 240px;
}
.brain__tag.is-on { opacity: 1; }
.brain__tag b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--ivory);
  white-space: nowrap;
}
.brain__tag small {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c, var(--gold)) 85%, var(--ivory));
  white-space: nowrap;
}

/* Keyboard-reachable list, visually hidden */
.brain__a11y {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.brain__a11y button { color: inherit; }

@media (max-width: 720px) {
  .brain__core-label b { font-size: 1.7rem; }
  .brain__core-label span { font-size: 0.48rem; }
  .brain__core-label small { font-size: 0.48rem; }
  .brain__tag b { font-size: 0.9rem; white-space: normal; }
  .brain__tag { max-width: 200px; }
}

/* Idle breathing for the core offer */
@keyframes core-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  50%      { transform: translate(-50%, -50%) scale(1.04); opacity: 1; }
}
.brain__core-label { animation: core-breathe 6.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .brain__core-label { animation: none; }
}

@media (max-width: 900px) {
  /* no parallax on small screens — keep images unzoomed */
  .feature__media img { transform: none; }
}
