/* ==========================================================================
   ELEGANCE THE HUB — Design tokens, reset and shared primitives
   Palette lifted directly from the studio artwork: deep navy, royal blue,
   electric blue, ice, white, and one orange accent borrowed from the bean bag.
   ========================================================================== */

:root {
  /* --- brand ------------------------------------------------------------ */
  --navy-950: #03061C;
  --navy-900: #060A28;
  --navy-850: #080B33;
  --navy-800: #0A1246;
  --navy-700: #101A5E;
  --royal-700: #16265E;
  --royal-600: #1B3FA0;
  --royal-500: #2B4FC7;
  --blue-500: #2F6BFF;
  --blue-400: #4C86FF;
  --blue-300: #7BA6FF;
  --ice-200: #8FB4FF;
  --ice-100: #C7DAFF;
  --white: #FFFFFF;
  --accent: #FF6B2C;
  --accent-soft: #FFA477;
  --danger: #FF4757;
  --success: #22C58B;
  --warning: #FFB020;

  /* --- semantic --------------------------------------------------------- */
  --bg: var(--navy-950);
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --surface-solid: #0B1140;
  --line: rgba(143, 180, 255, .16);
  --line-strong: rgba(143, 180, 255, .32);
  --text: #EEF3FF;
  --text-soft: #A9BCE6;
  --text-dim: #7286B5;

  /* --- type ------------------------------------------------------------- */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0:  clamp(.95rem, .92rem + .16vw, 1.05rem);
  --step-1:  clamp(1.1rem, 1.03rem + .34vw, 1.35rem);
  --step-2:  clamp(1.35rem, 1.2rem + .72vw, 1.9rem);
  --step-3:  clamp(1.7rem, 1.38rem + 1.55vw, 2.9rem);
  --step-4:  clamp(2.15rem, 1.5rem + 3.1vw, 4.6rem);
  --step-5:  clamp(2.7rem, 1.4rem + 6.2vw, 7rem);

  /* --- space & shape ---------------------------------------------------- */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(2, 5, 25, .35);
  --shadow-md: 0 14px 40px rgba(2, 5, 25, .5);
  --shadow-lg: 0 34px 90px rgba(2, 5, 25, .65);
  --glow: 0 0 0 1px rgba(47, 107, 255, .35), 0 0 34px rgba(47, 107, 255, .35);

  /*
   * A shared spacing scale. The dashboard is built on it; the public pages
   * still carry their own hand-tuned clamps in places, so treat these as the
   * target to move toward rather than a rule already applied everywhere.
   */
  --gap-2xs: .35rem;
  --gap-xs:  .55rem;
  --gap-sm:  .85rem;
  --gap-md:  1.15rem;
  --gap-lg:  clamp(1.4rem, 2.5vw, 2rem);
  --gap-xl:  clamp(2rem, 5vw, 3.25rem);
  --gap-2xl: clamp(2.75rem, 7vw, 5rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-in-out: cubic-bezier(.65, .05, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  /* A long, gentle tail — things arrive rather than stop. */
  --ease-out-soft: cubic-bezier(.16, 1, .3, 1);
  /* Slight overshoot without the cartoon bounce of --ease-back. */
  --ease-settle: cubic-bezier(.2, .9, .25, 1.06);

  --nav-h: 72px;
  --wrap: 1240px;
}

/* --------------------------------------------------------------- reset --- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--royal-600) var(--navy-900);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

/*
 * Images fade in as they decode instead of snapping into place. The engine and
 * site script add .is-loaded once the image reports complete, so a cached image
 * is already visible on first paint and never flashes.
 */
img[data-fade] { opacity: 0; transition: opacity .5s var(--ease-out-soft); }
img[data-fade].is-loaded { opacity: 1; }

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--blue-500); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--navy-900); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--royal-600), var(--blue-500));
  border-radius: 99px;
  border: 2px solid var(--navy-900);
}

/* ------------------------------------------------------------ utilities -- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 820px); margin-inline: auto; }

.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;
}

/*
 * Two-column split with a sidebar. These used to be inline grid styles on the
 * pages themselves, which meant no media query could reach them and the layout
 * stayed two-up at 375px — squeezing content until it was unreadable.
 */
.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--aside-w, 360px));
}
.split--even { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.split--center { align-items: center; }

@media (max-width: 900px) {
  .split, .split--even { grid-template-columns: minmax(0, 1fr); }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 999;
  background: var(--blue-500); color: #fff; padding: .7rem 1.1rem;
  border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icn { flex: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ice-200);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-400));
}

.text-grad {
  background: linear-gradient(105deg, var(--white) 8%, var(--ice-100) 42%, var(--blue-400) 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.mono { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .04em; }

.muted { color: var(--text-soft); }
.dim { color: var(--text-dim); }

/* ---------------------------------------------------------------- chips -- */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .72rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ice-200);
  white-space: nowrap;
}
.chip--solid { background: var(--blue-500); border-color: transparent; color: #fff; }
.chip--accent { background: rgba(255,107,44,.16); border-color: rgba(255,107,44,.4); color: var(--accent-soft); }
.chip--ghost { background: transparent; }

/* --------------------------------------------------------------- button -- */
/*
 * Buttons used to carry a gradient "sheen" that swept across on hover. With a
 * button in every card, every panel head and both floating actions, the page
 * was never still — so the sweep is gone and hover is now a plain lift. That
 * also drops the overflow:hidden it needed, which is what used to clip labels.
 */
.btn {
  --btn-bg: var(--blue-500);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .88rem 1.6rem;
  font-family: var(--font-display);
  font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  /* Rows shrink the field next to a button rather than squashing its label. */
  flex-shrink: 0;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  box-shadow: 0 6px 18px -10px rgba(47,107,255,.85);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(47,107,255,.95); }
.btn:active { transform: translateY(0) scale(.99); }

.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--blue-400); box-shadow: none; }

.btn--light { --btn-bg: #fff; --btn-fg: var(--navy-850); box-shadow: 0 10px 30px -14px rgba(255,255,255,.7); }
.btn--accent { --btn-bg: var(--accent); box-shadow: 0 10px 30px -12px rgba(255,107,44,.9); }
.btn--sm { padding: .58rem 1.05rem; font-size: .85rem; }
.btn--lg { padding: 1.05rem 2.1rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }

.btn-link {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; color: var(--blue-300);
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s, gap .25s var(--ease);
}
.btn-link:hover { color: var(--white); border-color: var(--blue-400); gap: .75rem; }

/* ---------------------------------------------------------------- cards -- */
/*
 * The card used to blur whatever sat behind it. With a card in almost every
 * section that meant the browser compositing a full-page blur many times over,
 * for an effect nobody could see against a near-black background. A solid tint
 * reads identically and costs nothing.
 */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card--pad { padding: clamp(1.2rem, 2.5vw, 2rem); }
.card--hover { transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.card--hover:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }

/* glass panel echoing the frosted card in the studio's service poster */
.glass {
  background: linear-gradient(150deg, rgba(255,255,255,.11), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-xl);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), var(--shadow-md);
}

/* ---------------------------------------------------------------- forms -- */
.field { display: grid; gap: .45rem; margin-bottom: 1.1rem; }
.field > label,
.label {
  font-size: .82rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ice-200);
}
.label .req { color: var(--accent); }

.input, .select, .textarea {
  width: 100%;
  min-width: 0;
  padding: .85rem 1rem;
  color: var(--text);
  background: rgba(4, 8, 32, .6);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s, background .2s, box-shadow .2s;
  appearance: none;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238FB4FF' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
  cursor: pointer;
}
.select option { background: var(--navy-850); color: var(--text); }

.input::placeholder, .textarea::placeholder { color: var(--text-dim); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  background: rgba(6, 12, 46, .85);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, .16);
}
.input.has-error, .textarea.has-error, .select.has-error { border-color: var(--danger); }

.field-hint { font-size: .8rem; color: var(--text-dim); }
.field-error { font-size: .82rem; color: #FF8E98; display: flex; align-items: center; gap: .35rem; }

.field-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* checkbox / radio cards */
.opt-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt {
  position: relative; display: flex; align-items: center; gap: .6rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: rgba(4, 8, 32, .5);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
  font-size: .9rem;
}
.opt:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .opt-box {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.opt input[type="radio"] ~ .opt-box { border-radius: 50%; }
.opt .opt-box::after {
  content: ""; width: 9px; height: 9px; border-radius: 3px;
  background: #fff; transform: scale(0); transition: transform .2s var(--ease-back);
}
.opt input[type="radio"] ~ .opt-box::after { border-radius: 50%; }
.opt input:checked ~ .opt-box { background: var(--blue-500); border-color: var(--blue-500); }
.opt input:checked ~ .opt-box::after { transform: scale(1); }
.opt:has(input:checked) { border-color: var(--blue-500); background: rgba(47,107,255,.12); }
.opt:has(input:focus-visible) { outline: 2px solid var(--blue-400); outline-offset: 2px; }

/* ---------------------------------------------------------------- alert -- */
.alert {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .9rem 1.1rem; margin-bottom: 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .92rem;
}
.alert--success { border-color: rgba(34,197,139,.42); background: rgba(34,197,139,.12); color: #A6F0D2; }
.alert--error   { border-color: rgba(255,71,87,.42);  background: rgba(255,71,87,.12);  color: #FFC0C6; }
.alert--info    { border-color: rgba(47,107,255,.42); background: rgba(47,107,255,.12); color: var(--ice-100); }
.alert--warning { border-color: rgba(255,176,32,.42); background: rgba(255,176,32,.12); color: #FFE0A8; }

/* -------------------------------------------------------------- ratings -- */
.stars { display: inline-flex; gap: 2px; color: var(--warning); }
.stars svg { fill: currentColor; stroke: none; }

/* -------------------------------------------------------------- loaders -- */
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------- animation primitives -- */
@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(47,107,255,.55); }
  70%  { box-shadow: 0 0 0 16px rgba(47,107,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,107,255,0); }
}
@keyframes shimmer { to { background-position: 200% 0; } }

/*
 * Scroll reveal. The delay comes from --reveal-delay, which site.js sets per
 * batch so items entering together ripple in reading order. The data-delay
 * attributes stay as a no-JS-free fallback for hand-authored ordering.
 */
/*
 * The reveal uses the individual `translate` and `scale` properties rather
 * than `transform`. They compose independently, which leaves `transform` free
 * for the pointer-tilt on cards — otherwise the two would overwrite each other
 * and whichever selector won would cancel the other effect entirely.
 * Browsers without them simply fade in, which is a fine floor.
 */
.reveal {
  opacity: 0;
  translate: 0 22px;
  scale: .985;
  transition:
    opacity   .7s var(--ease-out-soft) var(--reveal-delay, 0ms),
    translate .8s var(--ease-out-soft) var(--reveal-delay, 0ms),
    scale     .8s var(--ease-out-soft) var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; translate: none; scale: none; }
.reveal[data-delay="1"] { --reveal-delay: .07s; }
.reveal[data-delay="2"] { --reveal-delay: .14s; }
.reveal[data-delay="3"] { --reveal-delay: .21s; }
.reveal[data-delay="4"] { --reveal-delay: .28s; }
.reveal[data-delay="5"] { --reveal-delay: .35s; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-md);
}

/* ------------------------------------------------------------ reduced -- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; translate: none; scale: none; }
}
