/* ==========================================================================
   Decyphered Labs — website styles
   "Clean & approachable" — warm, friendly, trustworthy. Light theme.
   ========================================================================== */

/* ---- Self-hosted fonts (no external requests) ---- */
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  font-style: normal;
}

:root {
  color-scheme: light;
  --paper: #fbf8f3;
  --paper-2: #f4efe6;
  --surface: #ffffff;
  --ink: #23282f;
  --ink-soft: #3c434c;
  --muted: #646a73;       /* AA: >=4.5:1 on cream, white, and paper-2 */
  --primary: #0f857a;      /* calm, trustworthy teal */
  --primary-600: #0b6d64;
  --primary-700: #095349;
  --primary-tint: #e2f2ef;
  --accent: #f0a24b;       /* warm amber highlight */
  --accent-tint: #fbecd6;
  --border: #ece5d8;
  --border-2: #e2d9c8;
  --shadow-sm: 0 1px 2px rgba(58, 46, 30, 0.05), 0 2px 8px rgba(58, 46, 30, 0.04);
  --shadow-md: 0 6px 24px rgba(58, 46, 30, 0.08);
  --shadow-lg: 0 18px 48px rgba(58, 46, 30, 0.12);
  --ring: 0 0 0 3px rgba(15, 133, 122, 0.35);
  --max: 1120px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Keep anchored section headings clear of the sticky header when jumping via nav */
[id] { scroll-margin-top: 92px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; color: var(--ink); }

a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary-700); }

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

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--primary); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0; font-weight: 600; }
.skip:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "Figtree", sans-serif; font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(15,133,122,.28); }
.btn-primary:hover { background: var(--primary-600); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15,133,122,.34); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-700); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ---------- Header ---------- */
header.site { position: sticky; top: 0; z-index: 50; background: rgba(251,248,243,.82); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: "Figtree", sans-serif; font-weight: 700; font-size: 1.12rem; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--primary), var(--primary-700)); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(15,133,122,.3); }
.brand .mark svg { width: 21px; height: 21px; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .98rem; }
.nav-links a:hover { color: var(--primary-700); }
.nav-links .btn { padding: 11px 20px; font-size: .95rem; }
@media (max-width: 720px) {
  .nav { height: 64px; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 11vw, 120px) 0 clamp(56px, 8vw, 96px); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .6; z-index: 0; pointer-events: none; }
.hero::before { width: 520px; height: 520px; background: radial-gradient(circle at 30% 30%, #cdeae4, transparent 70%); top: -160px; right: -120px; }
.hero::after { width: 460px; height: 460px; background: radial-gradient(circle at 50% 50%, #fbe4c4, transparent 70%); bottom: -220px; left: -140px; opacity: .5; }
.hero .wrap { position: relative; z-index: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border-2); color: var(--primary-700); font-weight: 600; font-size: .82rem; letter-spacing: .02em; padding: 7px 15px; border-radius: var(--r-pill); box-shadow: var(--shadow-sm); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 22px 0 0; max-width: 16ch; }
.hero h1 .warm { color: var(--primary-700); font-style: italic; }
.hero .lead { font-size: clamp(1.1rem, 2.3vw, 1.35rem); color: var(--muted); max-width: 56ch; margin: 22px 0 34px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.trust { display: flex; align-items: center; gap: 22px 30px; flex-wrap: wrap; margin-top: 40px; color: var(--muted); font-size: .95rem; }
.trust span { display: inline-flex; align-items: center; gap: 9px; }
.trust svg { width: 18px; height: 18px; color: var(--primary); flex: none; }

/* Hero two-column + decorative visual */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }
.hero-visual { position: relative; min-height: 440px; }
.hero-visual .panel { position: absolute; inset: 6% 2%; border-radius: 32px; background: linear-gradient(160deg, #e6f3f0 0%, #fbeede 100%); box-shadow: inset 0 0 0 1px rgba(15,133,122,.06), var(--shadow-md); overflow: hidden; }
.hero-visual .panel .spark { position: absolute; right: -20px; bottom: -20px; width: 200px; height: 200px; color: rgba(15,133,122,.14); }
.hero-visual .panel .grid-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(15,133,122,.14) 1.5px, transparent 1.6px); background-size: 26px 26px; opacity: .5; }
.vcard { position: absolute; display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 15px 18px; box-shadow: var(--shadow-md); font-weight: 600; font-size: .97rem; color: var(--ink); white-space: nowrap; }
.vcard .vico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.vcard .vico svg { width: 20px; height: 20px; }
.vcard.teal .vico { background: var(--primary-tint); color: var(--primary-700); }
.vcard.amber .vico { background: var(--accent-tint); color: #8f560d; }
.vcard-1 { top: 4%; left: 0; transform: rotate(-2.5deg); animation: floaty 7s ease-in-out infinite; }
.vcard-2 { top: 42%; right: -2%; transform: rotate(2deg); animation: floaty 8s ease-in-out infinite .6s; }
.vcard-3 { bottom: 4%; left: 8%; transform: rotate(-1.5deg); animation: floaty 7.5s ease-in-out infinite 1.1s; }
@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@media (prefers-reduced-motion: reduce) { .vcard { animation: none !important; } }

/* ---------- Section scaffolding ---------- */
section { padding: clamp(56px, 8vw, 96px) 0; }
.sec-head { max-width: 60ch; margin-bottom: 46px; }
.sec-eyebrow { display: inline-block; color: var(--primary-700); font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 14px; }
.sec-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ---------- Services ---------- */
.services { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .ico { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 20px; background: var(--primary-tint); color: var(--primary-700); }
.card:nth-child(2) .ico { background: var(--accent-tint); color: #8f560d; }
.card .ico svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.3rem; margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- Approach / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 28px 26px; border-radius: var(--r-lg); border: 1px dashed var(--border-2); background: var(--surface); }
.step .num { font-family: "Fraunces", serif; font-size: 1.05rem; font-weight: 600; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; margin-bottom: 16px; box-shadow: 0 4px 10px rgba(15,133,122,.25); }
.step h3 { font-size: 1.18rem; margin: 0 0 8px; }
.step p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ---------- About ---------- */
.about { background: linear-gradient(180deg, var(--paper-2), var(--paper)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about .cols { display: grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .about .cols { grid-template-columns: 1fr; gap: 32px; } }
.about h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 18px; }
.about p { color: var(--ink-soft); font-size: 1.06rem; margin: 0 0 16px; }
.factcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px 26px; box-shadow: var(--shadow-md); }
.factcard dl { margin: 0; }
.factcard .row { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.factcard .row:last-child { border-bottom: 0; }
.factcard dt { color: var(--muted); font-size: .95rem; margin: 0; }
.factcard dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

/* ---------- CTA band ---------- */
.ctaband { padding: clamp(48px, 7vw, 80px) 0; }
.ctaband .inner { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--primary-600), var(--primary-700)); border-radius: var(--r-lg); padding: clamp(40px, 6vw, 64px); text-align: center; box-shadow: var(--shadow-lg); }
.ctaband .inner::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(240,162,75,.4), transparent 70%); top: -140px; right: -80px; filter: blur(30px); }
.ctaband h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 0 12px; position: relative; }
.ctaband p { color: rgba(255,255,255,.94); font-size: 1.1rem; margin: 0 auto 28px; max-width: 48ch; position: relative; }
.ctaband .btn-primary { background: #fff; color: var(--primary-700); box-shadow: 0 8px 22px rgba(0,0,0,.18); position: relative; }
.ctaband .btn-primary:hover { background: var(--accent-tint); color: var(--primary-700); }

/* ---------- Contact ---------- */
.contact .box { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 620px) { .contact .box { grid-template-columns: 1fr; } }
.contact .tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-sm); display: flex; gap: 18px; align-items: flex-start; }
.contact .tile .ico { width: 48px; height: 48px; border-radius: 13px; background: var(--primary-tint); color: var(--primary-700); display: grid; place-items: center; flex: none; }
.contact .tile .ico svg { width: 23px; height: 23px; }
.contact .tile .label { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 3px; }
.contact .tile a, .contact .tile .val { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.contact .tile a:hover { color: var(--primary-700); }

/* ---------- Doc pages (support/privacy) ---------- */
.doc { padding: clamp(56px, 8vw, 88px) 0; }
.doc .inner { max-width: 760px; margin-inline: auto; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 10px; }
.doc .updated { color: var(--muted); font-size: .95rem; margin-bottom: 40px; }
.doc h2 { font-size: 1.5rem; margin: 44px 0 12px; }
.doc h3 { font-size: 1.15rem; font-family: "Figtree", sans-serif; font-weight: 700; margin: 26px 0 8px; color: var(--ink); }
.doc p, .doc li { color: var(--ink-soft); }
/* In-prose links need more than color alone (WCAG 1.4.1) */
.doc a { text-decoration: underline; text-underline-offset: 2px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .note { background: var(--accent-tint); border-left: 4px solid var(--accent); padding: 16px 20px; border-radius: 12px; color: var(--ink); margin: 26px 0; }

/* ---------- Footer ---------- */
footer.site { background: var(--ink); color: #c9cfd6; padding: 56px 0 40px; }
footer.site .ftop { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
footer.site .brand { color: #fff; }
footer.site .brand .mark { box-shadow: none; }
footer.site .fnav { display: flex; gap: 28px; flex-wrap: wrap; }
footer.site .fnav a { color: #c9cfd6; font-weight: 500; }
footer.site .fnav a:hover { color: #fff; }
footer.site .legal { margin-top: 26px; font-size: .88rem; color: #9aa2ab; max-width: 68ch; }

/* ---------- Scroll reveal (progressive enhancement) ----------
   Content is fully visible by default; only hidden when JS is present
   (html.js), so no-JS users always see everything. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
