/* Egosi OS - egosios.com homepage. Rebuilt from KB 142 (egosios-corporate-website-architecture).
   Design system + animations per spec. Plain CSS, no build step. */

:root {
  --teal-dark: #294555;
  --teal-mid: #4A8A99;
  --rose: #CC6B97;
  --gold: #FFD700;
  --hero-bg: #0D1B22;
  --light: #FAFAF7;
  --light-alt: #F5F3EE;
  --ink: #1c2b33;
  --ink-soft: #4a5a63;
  --white: #ffffff;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: inherit; color: var(--ink); background: var(--light); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--rose); }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
section { padding: clamp(4.5rem, 10vw, 9rem) 1.5rem; }
.section-title { font-size: clamp(2rem, 4.5vw, 3.25rem); max-width: 16ch; margin: 0 auto; text-align: center; }
.section-lead { text-align: center; color: var(--ink-soft); font-size: 1.2rem; max-width: 40ch; margin: 1.25rem auto 0; }

/* ---- buttons ---- */
.btn { display: inline-block; padding: 0.95rem 2.1rem; border-radius: 999px; font-weight: 600; font-size: 1.05rem; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn--gold { background: var(--gold); color: var(--teal-dark); position: relative; }
.btn--gold:hover { transform: translateY(-2px); }
.cta-glow { position: relative; }
.cta-glow::after { content: ""; position: absolute; inset: -8px; border-radius: 999px; background: var(--gold); filter: blur(22px); opacity: .35; z-index: -1; animation: glowPulse 3.2s var(--ease) infinite; }
@keyframes glowPulse { 0%,100% { opacity: .25; transform: scale(0.97); } 50% { opacity: .5; transform: scale(1.03); } }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.trait.reveal[data-delay="1"], .family__card.reveal[data-delay="1"] { transition-delay: .12s; }
.trait.reveal[data-delay="2"], .family__card.reveal[data-delay="2"] { transition-delay: .24s; }
.trait.reveal[data-delay="3"] { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .cta-glow::after, .ava__glow { animation: none; } }

/* ============ 1. HERO ============ */
.hero { position: relative; min-height: 100vh; background: var(--hero-bg); color: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.hero__constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 1.5rem; }
.nav__logo { height: 54px; width: auto; }
.nav__cta { font-size: .95rem; font-weight: 600; padding: .55rem 1.2rem; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; transition: background .25s, border-color .25s; }
.nav__cta:hover { background: rgba(255,255,255,.1); border-color: var(--gold); }
.hero__inner { position: relative; z-index: 2; margin: auto; text-align: center; max-width: 800px; padding: 1.5rem; }
.hero__headline { font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 800; letter-spacing: -0.03em; }
.hero__sub { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: rgba(255,255,255,.82); margin: 1.5rem auto 2.5rem; max-width: 36ch; font-weight: 300; }
.hero__note { margin-top: 1.5rem; font-size: .95rem; color: rgba(255,255,255,.55); letter-spacing: .04em; }
.hero__scroll { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2; }
.hero__scroll span { display: block; width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.4); border-radius: 12px; position: relative; }
.hero__scroll span::after { content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 3px; height: 7px; background: var(--gold); border-radius: 2px; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; top: 7px; } 40% { opacity: 1; } 80% { opacity: 0; top: 18px; } 100% { opacity: 0; } }

/* ============ 2. THE PROBLEM ============ */
.problem { background: var(--teal-dark); color: var(--white); text-align: center; position: relative; }
.problem__chaos { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; max-width: 760px; margin: 0 auto 3rem; min-height: 5.5rem; }
.chaos-tag { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.7); padding: .4rem 1rem; border-radius: 999px; font-size: .95rem; transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.problem.is-dissolved .chaos-tag { opacity: 0; transform: translateY(-12px) scale(.9); filter: blur(6px); }
.problem__calm h2 { font-size: clamp(1.8rem, 4vw, 3rem); max-width: 20ch; margin: 0 auto; }
.problem__calm p { color: rgba(255,255,255,.7); max-width: 46ch; margin: 1.25rem auto 0; font-weight: 300; font-size: 1.15rem; }
.problem__turn { font-size: clamp(1.5rem, 3vw, 2.1rem) !important; color: var(--white) !important; font-weight: 500; margin-top: 2rem !important; }

/* ============ 3. MEET AVA ============ */
.ava { background: var(--light); text-align: center; }
.ava__logo-wrap { position: relative; width: 150px; height: 150px; margin: 0 auto 2.5rem; display: grid; place-items: center; }
.ava__logo { width: 110px; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 6px 18px rgba(204,107,151,.35)); }
.ava__glow { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(204,107,151,.55), transparent 65%); filter: blur(26px); animation: avaGlow 4s var(--ease) infinite; }
@keyframes avaGlow { 0%,100% { transform: scale(.9); opacity: .5; } 50% { transform: scale(1.15); opacity: .85; } }
/* Ava logo on light bg - render the mark in the brand teal/rose via mix when source is white */
.ava__logo { background: var(--teal-dark); -webkit-mask: url(../assets/branding/Ava_Logo_White_web.png) center/contain no-repeat; mask: url(../assets/branding/Ava_Logo_White_web.png) center/contain no-repeat; }
.traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem; max-width: var(--maxw); margin: 3.5rem auto 0; text-align: left; }
.trait h3 { font-size: 1.45rem; color: var(--teal-dark); margin-bottom: .6rem; }
.trait h3::before { content: ""; display: block; width: 38px; height: 4px; background: var(--gold); border-radius: 2px; margin-bottom: 1rem; }
.trait p { color: var(--ink-soft); }

/* ============ 4. ZERO SETUP ============ */
.zero { background: var(--light-alt); }
.stories { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; max-width: var(--maxw); margin: 3.5rem auto 0; }
.story-card { background: var(--white); border-radius: 18px; padding: 1.8rem; box-shadow: 0 10px 30px rgba(41,69,85,.08); border-top: 4px solid var(--teal-mid); opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.story-card.is-visible { opacity: 1; transform: none; }
.story-card:nth-child(2) { border-top-color: var(--rose); }
.story-card:nth-child(3) { border-top-color: var(--gold); }
.story-card:nth-child(4) { border-top-color: var(--teal-dark); }
.story-card h3 { font-size: 1.25rem; color: var(--teal-dark); margin-bottom: .7rem; }
.story-card p { color: var(--ink-soft); font-size: 1.02rem; }

/* ============ 5. FAMILY ============ */
.family { background: var(--teal-mid); color: var(--white); }
.family__inner { max-width: var(--maxw); margin: 0 auto; }
.family .section-title { color: var(--white); }
.family__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 3.5rem; }
.family__card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 2rem; backdrop-filter: blur(4px); }
.family__card h3 { font-size: 1.3rem; margin-bottom: .7rem; }
.family__card p { color: rgba(255,255,255,.85); font-weight: 300; }

/* ============ 6. DIFFERENT ============ */
.different { background: var(--hero-bg); color: var(--white); }
.contrast { list-style: none; max-width: 780px; margin: 0 auto; display: grid; gap: 1.4rem; }
.contrast li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; font-size: clamp(1.25rem, 3vw, 2rem); padding-bottom: 1.4rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.contrast__no { color: rgba(255,255,255,.4); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.contrast__yes { color: var(--white); font-weight: 600; }
.contrast__yes::before { content: "→ "; color: var(--gold); }

/* ============ 7. FOUNDER ============ */
.founder { background: var(--light); }
.founder__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 3rem; align-items: center; }
.founder__press { margin: 0; }
.founder__press img { border-radius: 16px; box-shadow: 0 16px 40px rgba(41,69,85,.18); width: 100%; }
.founder__press figcaption { margin-top: .75rem; font-size: .9rem; color: var(--ink-soft); font-style: italic; text-align: center; }
.founder__body .section-title { text-align: left; max-width: none; margin: 0; }
.founder__body p { color: var(--ink-soft); font-size: 1.12rem; margin-top: 1.25rem; font-weight: 300; }
.founder__links { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 1.75rem; }
.founder__link { color: var(--teal-dark); font-weight: 600; border-bottom: 2px solid var(--gold); padding-bottom: 2px; transition: color .2s; }
.founder__link:hover { color: var(--rose); }
@media (max-width: 760px) { .founder__inner { grid-template-columns: 1fr; gap: 2rem; } .founder__press { max-width: 320px; margin: 0 auto; } }

/* ============ 8. EARLY ACCESS ============ */
.early { background: linear-gradient(160deg, var(--teal-dark), var(--hero-bg)); color: var(--white); text-align: center; }
.early__inner { max-width: 600px; margin: 0 auto; }
.early h2 { font-size: clamp(2rem, 5vw, 3rem); }
.early p { color: rgba(255,255,255,.78); margin-top: 1rem; font-weight: 300; }
.early__form { display: flex; gap: .75rem; margin: 2.5rem auto 0; max-width: 480px; flex-wrap: wrap; justify-content: center; }
.early__form input { flex: 1 1 240px; padding: .95rem 1.25rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: var(--white); font-size: 1.05rem; }
.early__form input::placeholder { color: rgba(255,255,255,.5); }
.early__form input:focus { outline: 2px solid var(--gold); }
.early__status { margin-top: 1.25rem; min-height: 1.4rem; font-weight: 500; }
.early__status.ok { color: var(--gold); }
.early__status.err { color: var(--rose); }

/* ============ 9. FOOTER ============ */
.footer { background: var(--hero-bg); color: rgba(255,255,255,.7); padding: 3.5rem 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer__logo { height: 38px; opacity: .85; }
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__links a { font-size: .95rem; transition: color .2s; }
.footer__links a:hover { color: var(--gold); }
.footer__copy { font-size: .9rem; width: 100%; text-align: center; opacity: .6; margin-top: 1rem; }

@media (max-width: 600px) {
  .nav__cta { display: none; }
  .contrast li { flex-direction: column; gap: .25rem; }
}
