:root{
  --bg:#071018;
  --bg2:#0c1a26;
  --surface:#122230;
  --surface-soft:#0f1d28;
  --elev:#173041;
  --fg:#e8f0f4;
  --muted:#9bb3c2;
  --sub:#6d8798;
  --accent:#7ec4d8;
  --deep:#3d7d93;
  --border:rgba(232,240,244,.12);
  --border-strong:rgba(126,196,216,.28);
  --shadow:0 24px 80px rgba(0,0,0,.18);
  --radius-sm:.65rem;
  --radius-md:1rem;
  --radius-lg:1.5rem;
  --content:1180px;
  --measure:760px;
}

:root[data-theme="light"]{
  --bg:#f4f8fa;
  --bg2:#e9f1f5;
  --surface:#fff;
  --surface-soft:#f7fbfc;
  --elev:#eef6f8;
  --fg:#10202b;
  --muted:#456170;
  --sub:#68808d;
  --accent:#256d82;
  --deep:#3d7d93;
  --border:rgba(16,32,43,.14);
  --border-strong:rgba(37,109,130,.26);
  --shadow:0 24px 70px rgba(20,55,70,.10);
}

*{box-sizing:border-box}

html{color-scheme:dark}
html[data-theme="light"]{color-scheme:light}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 78% 10%,rgba(126,196,216,.055),transparent 28rem),
    linear-gradient(180deg,var(--bg2),var(--bg) 32%,#05090d 100%);
  color:var(--fg);
  font:16px/1.68 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

html[data-theme="light"] body{
  background:
    radial-gradient(circle at 78% 10%,rgba(37,109,130,.06),transparent 28rem),
    linear-gradient(180deg,var(--bg2),var(--bg) 35%,var(--bg));
}

a{color:var(--accent)}

a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:4px;
}

h1,h2,h3{
  margin-top:0;
  color:var(--fg);
  font-family:Georgia,"Times New Roman",serif;
  letter-spacing:-.025em;
  line-height:1.08;
}

h1{
  max-width:950px;
  margin-bottom:0;
  font-size:clamp(3rem,5.6vw,5.65rem);
}

h2{font-size:clamp(2rem,3.6vw,3.15rem)}
h3{font-size:1.32rem}

p{margin-top:0}

.site-header{
  position:sticky;
  top:0;
  z-index:20;
  border-bottom:1px solid rgba(126,196,216,.14);
  background:color-mix(in srgb,var(--bg) 90%,transparent);
  backdrop-filter:blur(16px);
}

.nav-wrap{
  max-width:var(--content);
  margin:auto;
  padding:14px 24px;
  display:flex;
  align-items:center;
  gap:18px;
}

.wordmark{
  color:var(--fg);
  font:700 1.28rem Georgia,serif;
  text-decoration:none;
  letter-spacing:-.02em;
}

.nav-wrap nav{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:22px;
}

.nav-wrap nav a{
  position:relative;
  padding:.36rem .08rem;
  color:var(--muted);
  font-size:.9rem;
  text-decoration:none;
}

.nav-wrap nav a:hover{color:var(--fg)}

.nav-wrap nav a[aria-current="page"]{
  color:var(--fg);
  font-weight:700;
}

.nav-wrap nav a[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:.08rem;
  right:.08rem;
  bottom:-.28rem;
  height:2px;
  border-radius:2px;
  background:var(--accent);
}

.nav-cta,
.button{
  display:inline-block!important;
  padding:.72rem 1.08rem;
  border-radius:var(--radius-sm);
  background:var(--accent)!important;
  color:#061017!important;
  font-weight:750;
  line-height:1.2;
  text-decoration:none;
}

.nav-cta{
  padding:.58rem .78rem!important;
  font-size:.86rem!important;
}

.button.secondary{
  border:1px solid var(--border);
  background:var(--surface)!important;
  color:var(--fg)!important;
}

.menu-button{
  display:none;
  padding:.55rem .75rem;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--fg);
  font:inherit;
  font-weight:700;
}

.theme-toggle{
  display:inline-grid;
  min-width:70px;
  padding:3px;
  grid-template-columns:1fr 1fr;
  align-items:center;
  gap:0;
  border:1px solid var(--border-strong);
  border-radius:999px;
  background:var(--surface-soft);
  cursor:pointer;
}

.theme-icon{
  display:grid;
  width:28px;
  height:28px;
  place-items:center;
  border-radius:50%;
  font-size:1rem;
  line-height:1;
}

.theme-toggle[data-theme="dark"] .moon,
.theme-toggle[data-theme="light"] .sun{
  background:var(--accent);
  color:#061017;
}

.theme-toggle[data-theme="dark"] .sun,
.theme-toggle[data-theme="light"] .moon{
  color:var(--muted);
}

.waterline{
  height:1px;
  background:linear-gradient(90deg,transparent,var(--accent),transparent);
  opacity:.65;
}

.hero,
.section{
  max-width:var(--content);
  margin:auto;
  padding-left:24px;
  padding-right:24px;
}

.hero{
  padding-top:84px;
  padding-bottom:64px;
}

.hero-home{
  padding-top:76px;
  padding-bottom:72px;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(290px,.75fr);
  gap:clamp(42px,7vw,92px);
  align-items:center;
}

.hero-copy{min-width:0}

.kicker{
  margin-bottom:18px;
  color:var(--accent);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.17em;
  text-transform:uppercase;
}

.hero-home h1{
  max-width:800px;
  font-size:clamp(3.45rem,5.2vw,5.35rem);
  text-wrap:balance;
}

.hero-intro{
  max-width:720px;
  margin-top:34px;
}

.lead{
  max-width:var(--measure);
  color:var(--muted);
  font-size:1.12rem;
  line-height:1.62;
}

.hero-intro .lead{margin-bottom:14px}
.hero-intro .lead:last-child{margin-bottom:0}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:28px;
}

.system-path{
  position:relative;
  overflow:hidden;
  padding:24px;
  border:1px solid var(--border-strong);
  border-radius:var(--radius-lg);
  background:
    linear-gradient(180deg,color-mix(in srgb,var(--surface) 92%,transparent),color-mix(in srgb,var(--surface-soft) 96%,transparent));
  box-shadow:var(--shadow);
}

.system-path::before{
  content:"";
  position:absolute;
  top:-60px;
  right:-60px;
  width:170px;
  height:170px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(126,196,216,.14),transparent 68%);
  pointer-events:none;
}

.path-label{
  margin-bottom:22px;
  color:var(--accent);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.path-step{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:38px 1fr;
  gap:14px;
  align-items:start;
}

.path-number{
  display:grid;
  width:34px;
  height:34px;
  place-items:center;
  border:1px solid var(--border-strong);
  border-radius:50%;
  color:var(--accent);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.08em;
}

.path-step h2{
  margin:1px 0 5px;
  font-size:1.4rem;
}

.path-step p{
  margin:0;
  color:var(--muted);
  font-size:.92rem;
  line-height:1.45;
}

.path-connector{
  width:1px;
  height:30px;
  margin:5px 0 5px 16px;
  background:linear-gradient(var(--accent),var(--deep));
  opacity:.7;
}

.section{
  padding-top:58px;
  padding-bottom:58px;
}

.section + .section{
  border-top:1px solid rgba(232,240,244,.035);
}

.section-head{
  max-width:var(--measure);
  margin-bottom:30px;
}

.section-head h2{margin-bottom:14px}
.section-head p,
.muted{color:var(--muted)}

.grid{
  display:grid;
  gap:18px;
}

.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}

.card{
  padding:24px;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:linear-gradient(180deg,var(--surface),var(--surface-soft));
}

.card h3{margin-bottom:12px}

.card p{
  margin-bottom:0;
  color:var(--muted);
}

.card-link{
  display:flex;
  min-height:210px;
  flex-direction:column;
  color:var(--fg);
  text-decoration:none;
}

.card-link:hover{
  border-color:var(--border-strong);
  transform:translateY(-1px);
}

.card-link .go{
  margin-top:auto;
  padding-top:22px;
  color:var(--accent);
  font-weight:700;
}

.principles{
  padding:0;
  list-style:none;
}

.lined{
  margin:14px 0;
  padding-left:16px;
  border-left:2px solid var(--deep);
  color:var(--muted);
}

.step .num{
  color:var(--accent);
  font-size:.75rem;
  letter-spacing:.15em;
}

.cta{
  padding:32px;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:linear-gradient(180deg,var(--surface),var(--surface-soft));
}

.site-footer{
  margin-top:76px;
  padding:48px 24px 28px;
  border-top:1px solid var(--border);
}

.footer-grid{
  max-width:var(--content);
  margin:auto;
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr;
  gap:40px;
}

.footer-grid p{
  max-width:390px;
  color:var(--muted);
}

.footer-grid h3{
  color:var(--sub);
  font:700 .75rem system-ui;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.footer-grid>div>a:not(.wordmark){
  display:block;
  margin:7px 0;
  color:var(--muted);
  text-decoration:none;
}

.fine{
  max-width:var(--content);
  margin:35px auto 0;
  color:var(--sub);
  font-size:.75rem;
}

.plain-list{
  padding-left:1.2rem;
  color:var(--muted);
}

.plain-list li{margin:.55rem 0}

@media(max-width:980px){
  .nav-wrap nav{gap:16px}
  .nav-wrap nav a{font-size:.84rem}
  .hero-grid{grid-template-columns:minmax(0,1.3fr) minmax(260px,.7fr);gap:36px}
  .hero-home h1{font-size:clamp(3.2rem,6vw,4.5rem)}
}

@media(max-width:800px){
  .nav-wrap{
    padding:12px 18px;
    gap:12px;
    flex-wrap:wrap;
  }

  .menu-button{
    display:inline-block;
    margin-left:auto;
  }

  .theme-toggle{order:2}

  .nav-wrap nav{
    display:none;
    order:3;
    width:100%;
    margin-left:0;
    padding:10px 0 4px;
    flex-direction:column;
    align-items:stretch;
    gap:4px;
  }

  .nav-wrap nav.is-open{display:flex}

  .nav-wrap nav a{
    padding:.8rem .9rem;
    border-radius:var(--radius-sm);
    font-size:1rem;
  }

  .nav-wrap nav a[aria-current="page"]{background:var(--surface)}
  .nav-wrap nav a[aria-current="page"]::after{display:none}

  .nav-cta{
    margin-top:4px;
    text-align:center;
  }

  .hero,
  .section{
    padding-left:20px;
    padding-right:20px;
  }

  .hero{
    padding-top:50px;
    padding-bottom:40px;
  }

  .hero-home{
    padding-top:46px;
    padding-bottom:50px;
  }

  .hero-grid{
    grid-template-columns:1fr;
    gap:34px;
  }

  .hero-home h1{
    max-width:680px;
    font-size:clamp(2.7rem,12vw,4rem);
    line-height:1.02;
  }

  .hero-intro{margin-top:26px}

  .system-path{
    max-width:620px;
    padding:22px;
  }

  .section{
    padding-top:42px;
    padding-bottom:42px;
  }

  .grid.three,
  .grid.two,
  .grid.four,
  .footer-grid{
    grid-template-columns:1fr;
  }

  .card-link{min-height:0}
}

@media(max-width:520px){
  .hero-home h1{font-size:clamp(2.55rem,13vw,3.45rem)}
  .lead{font-size:1.03rem}
  .button{width:100%;text-align:center}
  .actions{gap:10px}
  .system-path{border-radius:1.1rem}
}

@media(prefers-reduced-motion:reduce){
  *{
    scroll-behavior:auto!important;
    transition:none!important;
  }
}



/* Homepage faces */
.home-main{
  max-width:var(--content);
  margin:0 auto;
  padding:72px 24px 24px;
}

.faces{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  align-items:stretch;
}

.face-card{
  position:relative;
  min-height:510px;
  padding:30px 28px 24px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:linear-gradient(180deg,var(--surface),var(--surface-soft));
  transition:
    transform .24s ease,
    border-color .24s ease,
    box-shadow .24s ease,
    flex .24s ease;
}

.face-card h1{
  margin:0 0 26px;
  font-size:clamp(2rem,3.1vw,3.2rem);
}

.face-preview{
  max-width:34rem;
}

.face-preview p{
  margin:0;
  color:var(--muted);
  font-size:1.05rem;
  line-height:1.68;
}

.face-actions{
  margin-top:auto;
  padding-top:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.face-more,
.face-enter{
  min-height:44px;
  padding:.65rem .8rem;
  border:0;
  background:transparent;
  color:var(--accent);
  font:inherit;
  font-weight:750;
  text-decoration:none;
  cursor:pointer;
}

.face-more{margin-left:-.8rem}
.face-enter{margin-right:-.8rem}

@media (hover:hover) and (pointer:fine) and (min-width:901px){
  .faces:has(.face-card:hover){
    grid-template-columns:.86fr .86fr .86fr;
  }

  .face-card:hover{
    z-index:2;
    transform:scale(1.045);
    border-color:var(--border-strong);
    box-shadow:var(--shadow);
  }
}

.face-dialog{
  width:min(860px,calc(100vw - 32px));
  max-height:min(82vh,900px);
  padding:0;
  border:1px solid var(--border-strong);
  border-radius:var(--radius-lg);
  background:var(--surface);
  color:var(--fg);
  box-shadow:0 30px 120px rgba(0,0,0,.55);
}

.face-dialog::backdrop{
  background:rgba(2,7,11,.72);
  backdrop-filter:blur(5px);
}

.face-dialog-inner{
  position:relative;
  padding:34px;
}

.face-dialog-close{
  position:absolute;
  top:18px;
  right:18px;
  min-height:42px;
  padding:.55rem .75rem;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface-soft);
  color:var(--muted);
  font:inherit;
  cursor:pointer;
}

.face-dialog h2{
  margin:0 90px 26px 0;
  font-size:clamp(2.1rem,4vw,3.2rem);
}

.face-dialog-copy{
  max-height:56vh;
  overflow:auto;
  padding-right:10px;
}

.face-dialog-copy p{
  color:var(--muted);
  font-size:1.05rem;
  line-height:1.7;
}

.face-dialog-copy .self-trial{
  margin:24px 0;
}

.face-dialog-enter{
  display:inline-block;
  margin-top:24px;
  padding:.72rem 1rem;
  border-radius:var(--radius-sm);
  background:var(--accent);
  color:#061017;
  font-weight:750;
  text-decoration:none;
}

@media(max-width:900px){
  .home-main{
    padding-top:46px;
  }

  .faces{
    grid-template-columns:1fr;
  }

  .face-card{
    min-height:0;
  }
}

@media(max-width:520px){
  .home-main{
    padding-left:18px;
    padding-right:18px;
  }

  .face-card{
    padding:24px 22px 20px;
  }

  .face-dialog-inner{
    padding:26px 22px;
  }

  .face-dialog-close{
    position:static;
    margin:0 0 20px auto;
    display:block;
  }

  .face-dialog h2{
    margin-right:0;
  }
}
