/* CortexIA — dark premium landing, centered & seamless.
   Continuous olive-charcoal canvas with ambient glow orbs (no hard section
   cuts). Self-hosted Fraunces (display) + Hanken Grotesk (text). Olive lead with
   a clay spark. Mobile-first. Tiny progressive-enhancement JS for scroll reveals. */

/* ---- Fonts (self-hosted, variable) ---- */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/fraunces-latinext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/hanken-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/hanken-latinext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #181c10;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.075);
  --ink: #ece6d6;
  --ink-soft: #cdc7b6;
  --muted: #989279;
  --line: rgba(255, 255, 255, 0.1);
  --olive: #67804a;
  --olive-deep: #45562f;
  --olive-bright: #9ab673;
  --clay: #d3804f;
  --cream: #ece6d6;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 64rem;
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.3), 0 36px 70px -30px rgba(0, 0, 0, 0.8);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25), 0 18px 44px -24px rgba(0, 0, 0, 0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ambient glow orbs — fixed, span the whole page seamlessly (no section cuts) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(36rem 30rem at 84% -8%, rgba(106, 134, 74, 0.26), transparent 60%),
    radial-gradient(34rem 30rem at 6% 30%, rgba(211, 128, 79, 0.1), transparent 62%),
    radial-gradient(40rem 36rem at 96% 70%, rgba(106, 134, 74, 0.14), transparent 62%),
    radial-gradient(34rem 32rem at 4% 100%, rgba(106, 134, 74, 0.12), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.8'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='180'%20height='180'%20filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (forced-colors: active) { body::before, body::after { display: none; } }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.4rem; }

/* ---- Masthead (sticky, glassy) ---- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(24, 28, 16, 0.6);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; }
.wordmark {
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em;
  transition: opacity 0.18s ease;
}
.wordmark:hover { opacity: 0.75; }
.masthead__tag { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.01em; }

/* ---- Hero (centered) ---- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero__orbs { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(48px); }
.orb--1 {
  width: 34rem; height: 34rem; top: -14rem; left: 50%; margin-left: -10rem;
  background: radial-gradient(circle, rgba(106, 134, 74, 0.42), transparent 64%);
  animation: drift1 20s ease-in-out infinite alternate;
}
.orb--2 {
  width: 26rem; height: 26rem; bottom: -14rem; left: 8%;
  background: radial-gradient(circle, rgba(211, 128, 79, 0.26), transparent 64%);
  animation: drift2 24s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-2.5rem, 2rem) scale(1.08); } }
@keyframes drift2 { to { transform: translate(2.5rem, -2rem) scale(1.1); } }

.hero__inner { max-width: 52rem; margin-inline: auto; text-align: center; padding-top: 3rem; padding-bottom: 3.4rem; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; margin: 0 0 1.1rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--olive-bright);
}
.hero__eyebrow-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; background: var(--olive-bright); box-shadow: 0 0 10px rgba(154, 182, 115, 0.8); }
.hero__title {
  margin: 0 auto; max-width: 16ch;
  font-family: var(--display); font-optical-sizing: auto; font-weight: 600;
  font-size: clamp(2.4rem, 9vw, 3rem); line-height: 1.04; letter-spacing: -0.022em; text-wrap: balance; color: var(--ink);
}
.lead { margin: 1.3rem auto 0; max-width: 40ch; font-size: 1.22rem; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.note { margin: 1.2rem 0 0; font-size: 0.9rem; color: var(--muted); letter-spacing: 0.01em; }

/* ---- Chat mockup ---- */
.hero__visual { position: relative; margin-top: 2.8rem; }
.hero__visual::before {
  content: ""; position: absolute; z-index: 0; inset: -8% 0 -12%;
  background: radial-gradient(50% 55% at 50% 45%, rgba(106, 134, 74, 0.26), transparent 70%);
  filter: blur(30px);
}
.chat {
  position: relative; z-index: 1; max-width: 24rem; margin-inline: auto; text-align: left;
  background: #1f2416; border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-card);
}
.chat__bar { display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem 0.95rem; background: linear-gradient(135deg, var(--olive) 0%, var(--olive-deep) 100%); color: #f3f6ec; }
.chat__avatar { width: 2.15rem; height: 2.15rem; flex: none; border-radius: 50%; background: #f3f6ec; color: var(--olive-deep); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.chat__id { display: flex; flex-direction: column; line-height: 1.2; }
.chat__name { font-weight: 600; font-size: 0.98rem; }
.chat__status { display: inline-flex; align-items: center; gap: 0.32rem; font-size: 0.74rem; opacity: 0.92; }
.chat__dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: #bce3a1; box-shadow: 0 0 8px rgba(188, 227, 161, 0.9); }
.chat__thread { background: #11150b; padding: 0.95rem; display: flex; flex-direction: column; gap: 0.5rem; min-height: 17rem; }
.bubble { position: relative; max-width: 83%; padding: 0.52rem 0.74rem 0.95rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.38; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.bubble--in { align-self: flex-start; background: #262d1a; color: var(--ink); border-bottom-left-radius: 5px; }
.bubble--out { align-self: flex-end; color: #f2f5ea; border-bottom-right-radius: 5px; background: linear-gradient(145deg, var(--olive) 0%, var(--olive-deep) 100%); }
.bubble__time { position: absolute; right: 0.64rem; bottom: 0.34rem; font-size: 0.6rem; letter-spacing: 0.02em; opacity: 0.6; }
.typing { align-self: flex-start; display: inline-flex; gap: 0.28rem; padding: 0.64rem 0.8rem; background: #262d1a; border-radius: 16px; border-bottom-left-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.typing span { width: 0.46rem; height: 0.46rem; border-radius: 50%; background: #8c8770; }

/* ---- Sections (seamless: no bands, no hard borders) ---- */
.section { padding-block: 3.4rem; }
.section__head { max-width: 44rem; margin-inline: auto; text-align: center; }
h2 {
  margin: 0 auto; max-width: 22ch;
  font-family: var(--display); font-optical-sizing: auto; font-weight: 600;
  font-size: clamp(1.7rem, 6vw, 2.15rem); line-height: 1.12; letter-spacing: -0.018em; color: var(--ink); text-wrap: balance;
}
.section__sub { margin: 1rem auto 0; max-width: 46ch; font-size: 1.08rem; color: var(--ink-soft); text-wrap: pretty; }

.grid { margin: 2.4rem auto 0; max-width: 56rem; display: grid; gap: 1rem; }

/* Pains — light, airy, centered */
.pain {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  padding: 0.6rem 0.8rem; text-align: center; color: var(--ink-soft); font-size: 1.05rem; text-wrap: pretty;
}
.pain__dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; flex: none; background: var(--clay); box-shadow: 0 0 12px rgba(211, 128, 79, 0.6); }

/* Value — glass cards */
.value {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.6rem 1.4rem; text-align: center; box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.value:hover { background: var(--surface-hover); transform: translateY(-3px); border-color: rgba(154, 182, 115, 0.3); }
.value__title { margin: 0 0 0.5rem; font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.value__text { margin: 0; color: var(--ink-soft); font-size: 1rem; text-wrap: pretty; }

/* Steps — centered, numeral circles */
.step { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; text-align: center; }
.step__num {
  width: 3rem; height: 3rem; display: grid; place-items: center; margin-bottom: 0.3rem;
  font-family: var(--display); font-weight: 600; font-size: 1.5rem; font-feature-settings: "lnum" 1; color: #f3f6ec;
  background: linear-gradient(145deg, var(--olive) 0%, var(--olive-deep) 100%); border-radius: 50%;
  box-shadow: 0 0 20px rgba(106, 134, 74, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.step__label { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.step__text { margin: 0; color: var(--ink-soft); font-size: 1rem; text-wrap: pretty; max-width: 24ch; }

/* ---- Closing (soft glow finish, no hard edge) ---- */
.closing { position: relative; overflow: hidden; isolation: isolate; }
.closing__glow {
  position: absolute; z-index: -1; inset: 0;
  background:
    radial-gradient(46% 70% at 50% 18%, rgba(106, 134, 74, 0.32), transparent 64%),
    radial-gradient(40% 60% at 80% 100%, rgba(211, 128, 79, 0.16), transparent 62%);
}
.closing { padding-block: 4.6rem; }
.closing__inner { max-width: 42rem; margin-inline: auto; text-align: center; }
.closing__title { margin: 0 auto; max-width: 18ch; font-family: var(--display); font-weight: 600; color: var(--cream); font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.closing__text { margin: 1.3rem auto 0; max-width: 38ch; font-size: 1.18rem; color: var(--ink-soft); text-wrap: pretty; }

/* ---- Footer ---- */
.footer { position: relative; }
.footer__inner { padding-block: 2.4rem; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; }
.footer__name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.footer__tag { font-size: 0.85rem; color: var(--muted); }

/* ---- Focus + selection ---- */
a:focus-visible, :focus-visible { outline: 2px solid var(--olive-bright); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(154, 182, 115, 0.3); color: #fff; }

/* ---- Motion ---- */
.rise { opacity: 0; transform: translateY(16px); animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in-view { opacity: 1; transform: none; }

.chat__thread .bubble, .chat__thread .typing { opacity: 0; }
.b1 { animation: pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s both; }
.t1 { animation: ping 1.0s ease 1.5s both; }
.b2 { animation: pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 2.55s both; }
.b3 { animation: pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 3.4s both; }
.t2 { animation: ping 1.0s ease 4.05s both; }
.b4 { animation: pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 5.1s both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.chat__dot { animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.typing span { animation: dotjump 1.2s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 0.16s; }
.typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes dotjump { 0%, 60%, 100% { transform: translateY(0); opacity: 0.55; } 30% { transform: translateY(-0.22rem); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .rise, .js .reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .chat__thread .bubble { opacity: 1 !important; animation: none !important; }
  .chat__thread .typing, .chat__dot { display: none !important; }
  .orb { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- Tablet / desktop ---- */
@media (min-width: 48em) {
  body { font-size: 1.125rem; }
  .wrap { padding-inline: 2.25rem; }
  .hero__inner { padding-top: 4rem; padding-bottom: 4.4rem; }
  .hero__title { font-size: clamp(3rem, 5vw, 3.7rem); }
  .lead { font-size: 1.36rem; }
  .section { padding-block: 4.8rem; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
  .pain { padding: 0.4rem 1rem; }
  .closing { padding-block: 6.5rem; }
}

/* Hero: two columns on desktop (chat beside copy), stacked/centered below */
@media (min-width: 60em) {
  .hero__inner { max-width: 66rem; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 3.4rem; text-align: left; }
  .hero__title { margin-inline: 0; max-width: 15ch; }
  .lead { margin-inline: 0; }
  .hero__visual { margin-top: 0; }
}

@media (min-width: 64em) {
  .hero__inner { padding-bottom: 5rem; }
  .section { padding-block: 5.4rem; }
  .closing { padding-block: 7rem; }
}
