/* =========================================================================
   Setwell design system (shared by every page)
   Radius rule: interactive controls = full pill, surfaces = 16px,
   inputs = 12px, inner UI chips = 8px. Accent: logo blue only.
   Z-index scale: page content 0-10, menu overlay 180, nav 200, grain 300.
   ========================================================================= */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05070c;
  --bg-1: #080c15;
  --bg-2: #0c121e;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3f5f9;
  --text-2: rgba(243, 245, 249, 0.7);
  --text-3: rgba(243, 245, 249, 0.5);
  --blue: #287efd;
  --blue-hi: #6aa8ff;
  --blue-soft: rgba(40, 126, 253, 0.14);
  --green: #3ddc97;
  --green-soft: rgba(61, 220, 151, 0.12);
  --red: #f47c7c;
  --red-soft: rgba(244, 124, 124, 0.1);
  --radius: 16px;
  --radius-in: 12px;
  --radius-chip: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }

::selection { background: rgba(40, 126, 253, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 400;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; font-size: 14px; transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- page transitions ---------- */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
html.js body { animation: page-in 0.32s ease 0.02s both; }
html.js body.is-leaving { opacity: 0; transition: opacity 0.18s ease; animation: none; }

/* ---------- film grain (fixed, never scrolls) ---------- */
.grain {
  position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.section { position: relative; padding-block: clamp(96px, 12vw, 168px); }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-hi);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7;
}
.h2 {
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.038em;
  font-weight: 600;
  text-wrap: balance;
}
.h2 .dim { color: var(--text-3); }
.h2 .blue { color: var(--blue); }
.lead {
  font-size: clamp(17px, 1.35vw, 19px);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 58ch;
  text-wrap: pretty;
}
.mono { font-family: var(--mono); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 28px; border-radius: 999px;
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background-color 0.3s ease, color 0.3s ease;
  will-change: transform;
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: var(--text); color: #05070c;
  box-shadow: inset 0 -2px 0 rgba(5, 7, 12, 0.08), 0 12px 32px -12px rgba(40, 126, 253, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 -2px 0 rgba(5, 7, 12, 0.08), 0 18px 44px -14px rgba(40, 126, 253, 0.85);
}
.btn-ghost {
  color: var(--text); background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line-2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.btn-sm { height: 42px; padding: 0 20px; font-size: 14px; }
.btn .arrow { transition: transform 0.45s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- nav ---------- */
.nav-sentinel { position: absolute; top: 60px; left: 0; width: 1px; height: 1px; pointer-events: none; }

.nav {
  position: fixed; top: 16px; left: 50%; z-index: 200;
  width: min(100% - 2 * var(--gutter), 1080px);
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 10px 0 22px;
  border-radius: 999px;
  background: rgba(10, 14, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  transform: translateX(-50%) scale(1);
  transform-origin: 50% 0;
  transition: transform 0.55s var(--ease), background-color 0.4s ease, top 0.55s var(--ease);
}
/* invisible hover halo so the bar expands when the cursor gets close */
.nav::before { content: ""; position: absolute; inset: -22px -28px; border-radius: inherit; }
.nav.is-scrolled {
  transform: translateX(-50%) scale(0.88);
  top: 10px;
  background: rgba(8, 11, 19, 0.78);
}
.nav.is-scrolled:hover,
.nav.is-scrolled:focus-within { transform: translateX(-50%) scale(1); top: 16px; }

.nav-logo { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 44px; width: auto; }

.nav-links { position: relative; display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14.5px; color: var(--text-2); padding: 8px 14px; border-radius: 999px;
  transition: color 0.25s ease, background-color 0.25s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-cta { position: relative; margin-right: 3px; }

.nav-burger {
  position: relative; display: none; width: 46px; height: 46px; border-radius: 999px;
  align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.nav-burger span {
  display: block; width: 20px; height: 1.5px; background: var(--text); border-radius: 2px;
  transition: transform 0.45s var(--ease), opacity 0.25s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(5, 7, 12, 0.96);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu-links { display: flex; flex-direction: column; gap: 4px; }
.menu-links a {
  font-size: clamp(34px, 9vw, 52px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15;
  padding: 6px 0; color: var(--text);
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--i) * 45ms + 60ms);
}
.menu.is-open .menu-links a { opacity: 1; transform: none; }
.menu-foot {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px;
  opacity: 0; transition: opacity 0.5s var(--ease) 0.3s;
}
.menu.is-open .menu-foot { opacity: 1; }
.menu-foot .btn { width: 100%; }
.menu-contact { font-family: var(--mono); font-size: 13px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.menu-contact a:hover { color: var(--text); }
body.menu-open { overflow: hidden; }

/* ---------- reveal ---------- */
html.js [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.field input {
  height: 52px; padding: 0 16px; border-radius: var(--radius-in);
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line-2);
  color: var(--text); font-size: 16px;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.field input::placeholder { color: rgba(243, 245, 249, 0.38); }
.field input:hover { border-color: rgba(255, 255, 255, 0.22); }
.field input:focus { outline: none; border-color: var(--blue); background: rgba(40, 126, 253, 0.06); box-shadow: 0 0 0 4px rgba(40, 126, 253, 0.18); }
.field-error { display: none; font-size: 13px; color: var(--red); }
.field.is-invalid input { border-color: var(--red); }
.field.is-invalid .field-error { display: block; }

/* ---------- footer ---------- */
.footer { position: relative; overflow: hidden; padding-top: 96px; border-top: 1px solid var(--line); background: var(--bg); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px;
  position: relative; z-index: 1;
}
.footer-brand img { height: 46px; width: auto; }
.footer-brand p { margin-top: 18px; color: var(--text-3); font-size: 15px; max-width: 30ch; }
.footer-col h3 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-2); font-size: 15px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-word {
  position: relative; z-index: 0;
  margin-top: 72px;
  font-size: clamp(88px, 21vw, 300px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.78;
  text-align: center; user-select: none; pointer-events: none;
  background: linear-gradient(180deg, rgba(243, 245, 249, 0.1), rgba(243, 245, 249, 0) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(8%);
}
.footer-bottom {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 0 28px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-3);
}
.footer-bottom a:hover { color: var(--text); }

/* ---------- simple pages (contact / legal / 404) ---------- */
.page-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% -6%, rgba(127, 198, 230, 0.2), transparent 70%),
    radial-gradient(55% 55% at 70% 8%, rgba(40, 126, 253, 0.26), transparent 72%),
    radial-gradient(40% 40% at 10% 100%, rgba(40, 126, 253, 0.08), transparent 70%);
}

.doc { padding: 170px 0 120px; }
.doc-inner { max-width: 760px; margin-inline: auto; }
.doc h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 600; }
.doc-updated { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.doc-intro { margin-top: 36px; font-size: 18px; color: var(--text-2); }
.doc-block { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.doc-block h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.doc-block p, .doc-block li { color: var(--text-2); font-size: 16px; line-height: 1.7; }
.doc-block p + p { margin-top: 12px; }
.doc-block ul { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.doc-block ul + p { margin-top: 16px; }
.doc-block li { position: relative; padding-left: 20px; }
.doc-block li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--blue-hi); }
.doc-block a { color: var(--blue-hi); }
.doc-block a:hover { text-decoration: underline; }

/* ---------- subpage nav + contact page ---------- */
.nav-simple { width: min(100% - 2 * var(--gutter), 1080px); }
.nav-back { position: relative; margin-right: 3px; gap: 8px; }
.back-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease); }
.nav-back:hover .back-ico { transform: translateX(-3px); }
.dim { color: var(--text-3); }

.contact { min-height: calc(100svh - 80px); display: flex; align-items: center; padding: 150px 0 110px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.contact-copy h1 { margin-top: 20px; font-size: clamp(40px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.034em; font-weight: 600; text-wrap: balance; }
.contact-copy .lead { margin-top: 24px; }
.contact-cards { display: flex; flex-direction: column; gap: 14px; }
.contact-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 22px 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.45s var(--ease);
}
.contact-row:hover { border-color: rgba(40, 126, 253, 0.45); transform: translateY(-2px); }
.contact-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); }
.contact-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--blue-hi); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-txt small { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.contact-txt strong { display: block; margin-top: 2px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; letter-spacing: -0.02em; word-break: break-word; }
.contact-arrow { width: 20px; height: 20px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease), stroke 0.3s; }
.contact-row:hover .contact-arrow { transform: translateX(4px); stroke: var(--blue-hi); }
.contact-alt { margin-top: 18px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.contact-alt p { color: var(--text-2); font-size: 16px; }

.footer-compact { padding-top: 0; }
.footer-compact .footer-bottom { border-top: 0; }
.footer-links-inline { display: flex; gap: 20px; }

.notfound { min-height: 100svh; display: flex; align-items: center; padding: 140px 0 80px; }
.notfound-code { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; color: var(--blue-hi); }
.notfound h1 { margin-top: 18px; font-size: clamp(40px, 6vw, 80px); line-height: 1.04; letter-spacing: -0.034em; font-weight: 600; }
.notfound p { margin-top: 20px; color: var(--text-2); font-size: 18px; max-width: 40ch; }
.notfound .btn { margin-top: 34px; }

/* ---------- responsive (shared) ---------- */
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav { height: 62px; padding: 0 8px 0 18px; }
  .nav-logo img { height: 36px; }
  .nav.is-scrolled, .nav.is-scrolled:hover, .nav.is-scrolled:focus-within { transform: translateX(-50%) scale(1); top: 12px; }
  .nav::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .contact { padding: 120px 0 80px; min-height: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .nav-back { padding: 0 16px; font-size: 13.5px; }
  .contact-row { padding: 18px; gap: 14px; }
  .contact-alt .btn { width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .btn:not(.btn-sm) { height: 52px; padding: 0 24px; }
  .btn-sm { height: 42px; }
  .doc { padding: 130px 0 90px; }
  .footer { padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
