/* Etude Analytics: site styles.
   Brand palette (from the Decay Curve deck template). Edit the variables
   below to restyle the whole site. */
:root {
  --midnight: #0B244A;
  --royal: #1E5BBB;
  --azure: #3BA0FF;
  --slate: #6B869D;      /* brand Slate: decorative use only (3.3:1 on Fog) */
  --slate-text: #4A6278; /* deeper Slate for small text on light (AA, 5.4:1 on Fog) */
  --fog: #E8EEF4;
  --rule: #A9BCD0;       /* light rule; also secondary text on Midnight (7.9:1) */
  --white: #FFFFFF;

  --wrap: 72rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.5rem;
}

/* ------------------------------------------------------------ fonts */
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../assets/fonts/cinzel-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../assets/fonts/cinzel-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--midnight);
  background: var(--white);
  font-feature-settings: "kern", "liga", "calt";
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--royal); text-underline-offset: 0.18em; }
a:hover { color: var(--midnight); }
:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); position: relative; }
section[id], main[id] { scroll-margin-top: var(--header-h); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--azure); color: var(--midnight); padding: 0.6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Dark (Midnight) surfaces */
.dark { background: var(--midnight); color: var(--white); }
.dark a { color: var(--azure); }
.dark a:hover { color: var(--white); }

/* Decay-curve watermark on dark sections (~13% opacity, as in the decks) */
.watermark { position: relative; overflow: hidden; isolation: isolate; }
.watermark::after {
  content: "";
  position: absolute; z-index: -1;
  right: -2%; bottom: -6%;
  width: min(46rem, 62%); aspect-ratio: 206 / 120;
  background: url("../assets/img/watermark.svg") no-repeat right bottom / contain;
  opacity: 0.13;
  pointer-events: none;
}

/* ----------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--midnight);
  border-bottom: 4px solid var(--azure);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--header-h);
}
.header-logo img { width: 10.5rem; }
.nav { list-style: none; display: flex; gap: 0.25rem 1.6rem; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--white); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a:focus-visible { color: var(--white); border-bottom-color: var(--azure); }

/* ------------------------------------------------------------- hero */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(4rem, 10vw, 8rem); border-bottom: 1px solid rgba(169, 188, 208, 0.28); }
.hero .wrap { position: relative; }
.hero::after { width: min(58rem, 70%); opacity: 0.13; }
.hero-logo { width: clamp(9.5rem, 20vw, 13.5rem); margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.75rem); max-width: 24ch; }
.hero-sub { color: var(--azure); font-size: clamp(1.25rem, 2.6vw, 1.75rem); margin: 0.9rem 0 1.6rem; max-width: 34ch; line-height: 1.35; }
.hero-products { color: var(--rule); font-size: 1rem; letter-spacing: 0.04em; margin-bottom: 2.4rem; }

.button {
  display: inline-block;
  background: var(--azure); color: var(--midnight);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  padding: 0.85rem 1.75rem; border-radius: 2px;
  border: 2px solid var(--azure);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.dark .button { color: var(--midnight); }
.button:hover, .dark .button:hover { background: transparent; color: var(--white); }

/* --------------------------------------------------------- sections */
.section-head {
  padding: clamp(2.75rem, 6vw, 4.25rem) 0 clamp(2.25rem, 5vw, 3.25rem);
  border-bottom: 4px solid var(--azure);
}
.section-head::after { width: min(30rem, 48%); bottom: -14%; }
.section-num {
  color: var(--azure); font-weight: 600; line-height: 1;
  font-size: clamp(3rem, 7vw, 4.75rem); letter-spacing: -0.02em;
  margin: 0 0 0.75rem; font-variant-numeric: lining-nums tabular-nums;
}
.section-head h2, .contact h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); }
.section-sub { color: var(--azure); font-size: clamp(1.1rem, 2.1vw, 1.375rem); margin: 0.75rem 0 0; max-width: 48ch; line-height: 1.4; }

.section-body { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.lead { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.55; max-width: 52ch; margin: 0; }

h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* Stat cards on Fog */
.stat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.stat { background: var(--fog); padding: 1.75rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.9rem; }
.stat-num { font-size: clamp(2.1rem, 3.6vw, 2.75rem); font-weight: 600; line-height: 1; color: var(--midnight); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.stat-label { color: var(--slate-text); font-size: 0.975rem; line-height: 1.45; }

/* Bulleted lists with an Azure tick */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.4rem; margin-bottom: 0.85rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.55rem; height: 2px; background: var(--azure); }

/* Model chain */
.chain { list-style: none; margin: 0 0 1.25rem; padding: 0; counter-reset: chain; display: grid; gap: 0.4rem; }
.chain li { counter-increment: chain; display: flex; align-items: center; gap: 1rem; background: var(--fog); padding: 0.6rem 1rem; border-left: 4px solid var(--royal); }
.chain li::before { content: counter(chain, decimal-leading-zero); color: var(--royal); font-weight: 600; font-size: 0.875rem; font-variant-numeric: tabular-nums; min-width: 1.5rem; }
.chain span { font-weight: 500; }
.note { color: var(--slate-text); font-size: 0.975rem; margin: 0; }

/* How we work */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.steps li { background: var(--fog); padding: 1.75rem 1.6rem; border-top: 4px solid var(--royal); }
.step-num { display: block; color: var(--royal); font-weight: 600; font-size: 2.25rem; line-height: 1; margin-bottom: 1rem; }
.steps h3 { margin-bottom: 0.6rem; }
.steps p { margin: 0; color: var(--midnight); }

/* Founder */
.founder { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.founder-photo { margin: 0; }
.founder-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.founder-photo figcaption { background: var(--midnight); color: var(--white); padding: 0.9rem 1.1rem; display: flex; flex-direction: column; border-bottom: 4px solid var(--azure); }
.founder-photo figcaption span { color: var(--rule); font-size: 0.9rem; }
.founder-text > p { max-width: 62ch; }
.credentials { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.credentials li { background: var(--fog); padding: 1rem 1.2rem; display: flex; flex-direction: column; }
.credentials strong { font-weight: 600; font-size: 0.975rem; }
.credentials span { color: var(--slate-text); font-size: 0.925rem; }

/* Contact */
.contact { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.contact-list { margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 1.5rem 4rem; }
.contact-list dt { color: var(--rule); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.35rem; }
.contact-list dd { margin: 0; font-size: 1.125rem; font-weight: 500; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--rule); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer-inner img { width: 9rem; }
.footer-inner p { margin: 0; color: var(--slate-text); font-size: 0.9rem; }

/* ------------------------------------------------------- responsive */
@media (max-width: 60rem) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .columns, .steps { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
}
@media (max-width: 52rem) {
  /* On small screens the header scrolls away with the page and the nav wraps. */
  :root { --header-h: 0rem; }
  .site-header { position: static; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding-top: 0.9rem; padding-bottom: 0.75rem; }
  .header-logo img { width: 8.5rem; }
  .nav { justify-content: flex-start; gap: 0.15rem 1.25rem; }
  .nav a { white-space: nowrap; font-size: 0.9rem; }
  .founder { grid-template-columns: 1fr; }
  .founder-photo { max-width: 18rem; }
}
@media (max-width: 34rem) {
  .stat-grid, .credentials { grid-template-columns: 1fr; }
  .stat { padding: 1.25rem 1.25rem 1.2rem; gap: 0.6rem; }
  .stat-num { font-size: 2rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media print {
  .site-header { position: static; }
  .watermark::after { display: none; }
}
