:root {
  --navy: #152238;
  --navy-light: #1B2A4A;
  --navy-deep: #0F1A2E;
  --coral: #E8664D;
  --orange: #F0562A;
  --blue: #5C9BD6;
  --cream: #F5F3EF;
  --ink: #24303F;
  --muted: #5B6472;
  --border: #E1DED7;
  --max-width: 1080px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-light);
  text-decoration: none;
}

.brand img {
  width: 56px;
  height: 56px;
  display: block;
  transform: rotate(-12deg);
  transform-origin: 50% 55%;
  transition: transform .55s var(--ease-spring), filter .4s ease;
  filter: drop-shadow(0 3px 6px rgba(240, 86, 42, 0.18));
}

.brand:hover img {
  transform: rotate(0deg) scale(1.06);
  filter: drop-shadow(0 5px 12px rgba(240, 86, 42, 0.35));
}

.brand-word { display: flex; flex-direction: column; line-height: 1.05; }

.brand-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-light);
  letter-spacing: -0.2px;
}

.brand-data {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: var(--blue);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.nav-links a:hover { color: var(--navy-light); }
.nav-links a.active { color: var(--navy-light); }

.nav-auth {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.nav-auth a, .nav-auth button {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.nav-auth a:hover, .nav-auth button:hover { color: var(--navy-light); }
.nav-auth .nav-login {
  color: #fff;
  background: linear-gradient(100deg, var(--orange), var(--coral) 70%);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
}
.nav-auth .nav-login:hover { color: #fff; opacity: .9; }
.nav-auth .nav-email {
  color: var(--navy-light);
  font-weight: 600;
  font-size: 13px;
}
.nav-links a.active::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--orange);
  margin-top: 3px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 96px 0 104px;
  background:
    radial-gradient(1300px 900px at 100% -30%, rgba(240, 86, 42, 0.09), transparent 70%),
    radial-gradient(760px 520px at 8% 128%, rgba(92, 155, 214, 0.16), transparent 58%),
    linear-gradient(158deg, var(--navy-deep) 0%, var(--navy) 55%, #10192b 100%);
}

/* Decorative node network echoing the brand mark */
.hero-graphic {
  position: absolute;
  top: 50%;
  right: -60px;
  width: 680px;
  max-width: 68%;
  transform: translateY(-50%);
  pointer-events: none;
  animation: floaty 22s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(circle at 58% 50%, #000 60%, transparent 96%);
  mask-image: radial-gradient(circle at 58% 50%, #000 60%, transparent 96%);
}
.hero-graphic svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-graphic .n-line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.2; }

/* The connected network (lines + the dots they join) breathes as one rigid body, so every
   line stays glued to its endpoints — only unconnected ambient dots move independently. */
.hero-graphic .n-network {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 20s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.008) rotate(0.2deg); }
}

.hero-graphic .n-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* Depth tiers: back nodes recede (small, faint); front nodes pop (large, crisp) */
.hero-graphic .n-back { opacity: 0.55; }
.hero-graphic .n-mid { opacity: 0.78; }
.hero-graphic .n-front { opacity: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)); }

/* Fade the network's own outer nodes so the connected cluster blends into the wider
   ambient field instead of reading as one solid, separate shape. */
.hero-graphic .n-network .n-mid { opacity: 0.4; }
.hero-graphic .n-network .n-line { stroke: rgba(255, 255, 255, 0.11); }

/* In-place pulse for connected front-tier nodes: scale/opacity only, never translate,
   so the line endpoint they sit on doesn't drift away from them. */
@keyframes pulse-a {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes pulse-b {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.045); opacity: 1; }
}

/* Free drift paths for unconnected ambient dots (assigned per-node via inline style),
   so they wander through the network instead of moving in lockstep. Each traces a small
   closed loop sampled at 8 evenly-spaced points and is played with `linear` timing, so the
   motion reads as one continuous glide with no easing "pause" at any waypoint. */
@keyframes drift-a {
  0%   { transform: translate(0, 0); }
  12.5%  { transform: translate(2.8px, -1.2px); }
  25%    { transform: translate(4px, -4px); }
  37.5%  { transform: translate(2.8px, -6.8px); }
  50%    { transform: translate(0, -8px); }
  62.5%  { transform: translate(-2.8px, -6.8px); }
  75%    { transform: translate(-4px, -4px); }
  87.5%  { transform: translate(-2.8px, -1.2px); }
  100% { transform: translate(0, 0); }
}
@keyframes drift-b {
  0%   { transform: translate(0, 0); }
  12.5%  { transform: translate(-2.5px, 1px); }
  25%    { transform: translate(-3.5px, 3.5px); }
  37.5%  { transform: translate(-2.5px, 6px); }
  50%    { transform: translate(0, 7px); }
  62.5%  { transform: translate(2.5px, 6px); }
  75%    { transform: translate(3.5px, 3.5px); }
  87.5%  { transform: translate(2.5px, 1px); }
  100% { transform: translate(0, 0); }
}
@keyframes drift-c {
  0%   { transform: translate(0, 0); }
  12.5%  { transform: translate(2.1px, -1.2px); }
  25%    { transform: translate(3px, -4px); }
  37.5%  { transform: translate(2.1px, -6.8px); }
  50%    { transform: translate(0, -8px); }
  62.5%  { transform: translate(-2.1px, -6.8px); }
  75%    { transform: translate(-3px, -4px); }
  87.5%  { transform: translate(-2.1px, -1.2px); }
  100% { transform: translate(0, 0); }
}
@keyframes drift-d {
  0%   { transform: translate(0, 0); }
  12.5%  { transform: translate(-2.8px, 0.9px); }
  25%    { transform: translate(-4px, 3px); }
  37.5%  { transform: translate(-2.8px, 5.1px); }
  50%    { transform: translate(0, 6px); }
  62.5%  { transform: translate(2.8px, 5.1px); }
  75%    { transform: translate(4px, 3px); }
  87.5%  { transform: translate(2.8px, 0.9px); }
  100% { transform: translate(0, 0); }
}

/* Interior page hero (shorter) */
.page-hero { padding: 72px 0 60px; }
.page-hero h1 { font-size: 34px; }

.hero .wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.22;
  margin: 0;
  max-width: 740px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.hero h1 .hl {
  background: linear-gradient(100deg, var(--orange), var(--coral) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Staggered hero entrance */
.hero h1 { animation: rise .8s var(--ease-out) both .05s; }
.hero p.lead { animation: rise .8s var(--ease-out) both .18s; }
.hero .cta-row { animation: rise .8s var(--ease-out) both .30s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 16px)); }
}

.hero p.lead {
  font-size: 18px;
  color: #C7CCD6;
  max-width: 620px;
  margin: 0;
}

.cta-row { display: flex; gap: 14px; margin-top: 12px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out),
              background .2s ease, border-color .2s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--coral);
  color: #1a1108;
  box-shadow: 0 8px 22px -10px rgba(232, 102, 77, 0.9);
}
.btn-primary:hover {
  background: #d9573f;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(232, 102, 77, 0.95);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary { border-color: #4A5670; color: #fff; }
.btn-secondary:hover { border-color: #fff; transform: translateY(-2px); }
.btn-secondary:active { transform: translateY(0); }

/* Sections */
section { padding: 72px 0; }

h2.section-title {
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--navy-light);
  letter-spacing: -0.3px;
}
h2.section-title::before {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  border-radius: 3px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--orange), var(--coral));
}
.contact-section h2.section-title::before,
.hero h2.section-title::before { background: linear-gradient(90deg, var(--orange), var(--coral)); }

p.section-sub {
  color: var(--muted);
  margin: 0 0 40px;
  max-width: 640px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out),
              border-color .28s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--coral);
  box-shadow: 0 22px 44px -24px rgba(21, 34, 56, 0.45);
}

.card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--navy-light);
}

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

/* Proof */
.proof-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--coral);
  border-radius: 0 10px 10px 0;
  padding: 28px 32px;
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out),
              border-left-width .28s var(--ease-out);
}
.proof-card:hover {
  transform: translateX(5px);
  border-left-width: 7px;
  box-shadow: 0 20px 42px -26px rgba(21, 34, 56, 0.4);
}

.proof-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--navy-light);
}

.proof-card p { margin: 0; color: var(--ink); }

.proof-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 10px;
}

.proof-tag.wip { color: var(--muted); }

.proof-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 720px;
}

.about-grid p { margin: 0; }

.about-heading {
  font-size: 18px;
  color: var(--navy-light);
  margin: 18px 0 0;
  font-weight: 700;
}

.mission-line {
  font-style: italic;
  color: var(--navy-light);
  border-left: 3px solid var(--coral);
  padding-left: 16px;
  margin-top: 8px !important;
}

/* Principles */
.principles-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 640px;
  margin: 8px 0 0;
}

.principle-card {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.principle-card:first-child { border-top: none; padding-top: 0; }

.principle-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--muted);
  flex: 0 0 auto;
}

.principle-body { min-width: 0; }

.principle-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--navy-light);
}

.principle-card h3 .accent { color: var(--orange); }

.principle-card p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

@media (max-width: 720px) {
  .principle-card { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Contact */
.contact-section { background: var(--navy); color: #fff; }
.contact-section h2 { color: #fff; }
.contact-section p.section-sub { color: #C7CCD6; }

.contact-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Contact page details */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: start;
}

.contact-aside p { color: var(--muted); margin: 0 0 18px; }
.contact-aside h3 { font-size: 15px; margin: 0 0 4px; color: var(--navy-light); }

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-light);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--coral);
  background: #fff;
}

.field textarea { resize: vertical; min-height: 120px; }

.honey { position: absolute; left: -9999px; }

.contact-form button { width: 100%; cursor: pointer; }
.contact-form button:disabled { opacity: 0.6; cursor: default; }

.form-status {
  margin: 16px 0 0;
  font-size: 14px;
  min-height: 20px;
}
.form-status.ok { color: #2F7A4E; }
.form-status.err { color: #C0392B; }

/* Footer */
footer {
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner nav { display: flex; gap: 20px; }
.footer-inner nav a { color: var(--muted); text-decoration: none; }
.footer-inner nav a:hover { color: var(--navy-light); }

/* Scroll reveal (classes added by enhance.js) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 10px 0; }
  .nav-links { gap: 18px; font-size: 14px; width: 100%; }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 31px; }
  .page-hero h1 { font-size: 27px; }
  .hero-graphic { display: none; }
  .cards { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .hero-graphic { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .brand img { transition: none; }
}

/* ---- account.html (login / sign up / change password) ---- */
.account-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}
.account-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 12px 32px rgba(21, 34, 56, 0.08);
}
.account-card h1 { font-size: 20px; margin: 0 0 6px; color: var(--navy-light); letter-spacing: -.2px; }
.account-card p.sub { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; }
.account-tabs { display: flex; gap: 4px; margin-bottom: 22px; background: var(--cream); border-radius: 10px; padding: 4px; }
.account-tabs button {
  flex: 1; padding: 8px 0; border: none; border-radius: 7px; background: none;
  font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; font-family: inherit;
}
.account-tabs button.active { background: #fff; color: var(--navy-light); box-shadow: 0 1px 3px rgba(21,34,56,.1); }
.account-form { display: none; flex-direction: column; gap: 14px; }
.account-form.active { display: flex; }
.account-form label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.account-form input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14.5px; margin-top: 5px; font-family: inherit;
}
.account-form button[type="submit"] {
  padding: 11px 14px; border: none; border-radius: 9px; font-size: 14.5px; font-weight: 700;
  color: #fff; background: linear-gradient(100deg, var(--orange), var(--coral) 70%); cursor: pointer;
  margin-top: 6px;
}
.account-form button[type="submit"]:hover { opacity: .92; }
.account-msg { border-radius: 9px; padding: 10px 13px; font-size: 13px; margin-bottom: 16px; display: none; }
.account-msg.error { display: block; background: rgba(232,102,77,.1); color: #C24A31; }
.account-msg.ok { display: block; background: rgba(31,161,132,.1); color: #157A64; }
.account-loggedin { display: none; flex-direction: column; gap: 16px; }
.account-loggedin .who { font-size: 14px; color: var(--ink); }
.account-loggedin .who b { color: var(--navy-light); }
.account-links { display: flex; gap: 12px; flex-wrap: wrap; }
.account-links a, .account-links button {
  flex: 1; text-align: center; padding: 10px 12px; border-radius: 9px; font-size: 13.5px;
  font-weight: 700; text-decoration: none; cursor: pointer; font-family: inherit; border: 1px solid var(--border);
  background: #fff; color: var(--navy-light);
}
.account-links a:hover, .account-links button:hover { background: var(--cream); }
.account-links .primary { background: linear-gradient(100deg, var(--orange), var(--coral) 70%); color: #fff; border: none; }
.account-banner {
  background: rgba(240,86,42,.08); color: var(--orange); border: 1px solid rgba(240,86,42,.25);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 18px;
}
