/*
  The Great Web — editorial system.

  Four colours, from the supplied palette. Everything below resolves through
  them; if a hex appears outside this block it is a bug.

  Shape language is the inverse of a soft UI kit: square corners, hairline
  rules, full-bleed tiles, type doing the work. Nothing is a pill.
*/
:root {
  --slate:  #020202;   /* page ground                */
  --atoll:  #1f2634;   /* raised surface             */
  --candy:  #b2d5e5;   /* the one accent             */
  --ice:    #f4f7f8;   /* primary text / light tiles */

  --muted:  #7a92a2;   /* secondary text — 6.4:1 on slate, 4.7:1 on atoll */
  --line:   #232a37;   /* hairline                   */
  --well:   #10151d;   /* inputs, recessed           */

  --ok:     #6fd8a8;
  --bad:    #ff8a94;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

/*
  Text on a candy fill is ALWAYS slate. Ice on candy is 1.44:1 — invisible.
  This is the single easiest way to break the palette.
*/

* { box-sizing: border-box; }

/* The whole site sits inside a candy frame: body is the border, and
   .page-frame is the dark rounded page. overflow:clip (not hidden) keeps
   position:sticky working inside. The default scrollbar is hidden — the
   frame reads as a device bezel and the bar would puncture it. */
html {
  scrollbar-width: none;
  overscroll-behavior: none;   /* no macOS rubber-band past the bezel */
  background: var(--candy);    /* if a browser still bounces, it shows candy */
}
html::-webkit-scrollbar { width: 0; height: 0; display: none; }

:root {
  --frame: clamp(.6rem, 1.2vw, 1.25rem);
  --frame-r: clamp(1.1rem, 2vw, 2rem);
}

body {
  background: var(--candy);
  color: var(--ice);
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--frame);
}

/* the bezel is FIXED to the viewport so the candy border never scrolls
   away — candy fills everything outside the rounded window */
body::after {
  content: "";
  position: fixed;
  inset: var(--frame);
  border-radius: var(--frame-r);
  box-shadow: 0 0 0 100vmax var(--candy);
  pointer-events: none;
  z-index: 40;
}

.page-frame {
  background: var(--slate);
  border-radius: var(--frame-r);
  overflow: clip;
  flex: 1;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .display {
  font-family: Archivo, Inter, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .95;
  text-wrap: balance;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.muted { color: var(--muted); }
.accent { color: var(--candy); }
.wrap { max-width: 78rem; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }

/* ── tiles ─────────────────────────────────────────────────────────────── */
/* Four grounds. Mixing them in one grid is the whole look. */
.tile { position: relative; overflow: hidden; border-radius: 0; --scene-accent: var(--candy); }
/* graphics recolour their "alive" parts per tile so they stay visible */
.tile-ice { --scene-accent: #3f7693; }
.tile-candy { --scene-accent: var(--slate); }
.tile-slate { background: var(--slate); color: var(--ice); box-shadow: inset 0 0 0 1px var(--line); }
.tile-atoll { background: var(--atoll); color: var(--ice); }
.tile-candy { background: var(--candy); color: var(--slate); }
.tile-ice   { background: var(--ice);   color: var(--slate); }
.tile-candy .muted { color: color-mix(in srgb, var(--slate) 62%, transparent); }
.tile-ice   .muted { color: color-mix(in srgb, var(--slate) 58%, transparent); }

.tile-hover { transition: transform .4s cubic-bezier(.22,.61,.36,1), filter .4s ease; }
.tile-hover:hover { transform: translateY(-4px); }

/* ── rules ─────────────────────────────────────────────────────────────── */
.rule { height: 1px; background: var(--line); border: 0; }
.rule-ice { height: 1px; background: color-mix(in srgb, var(--slate) 16%, transparent); border: 0; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.6rem;
  font-weight: 600;
  font-size: .875rem;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
/* The primary action is the accent — on a near-black page it is the one
   bright thing, so it does not need to shout twice. */
.btn-primary, .btn-ink { background: var(--candy); color: var(--slate); }
.btn-primary:hover, .btn-ink:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ice); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--atoll); }
.btn-invert { background: var(--ice); color: var(--slate); }
.btn-invert:hover { transform: translateY(-2px); }
.btn-slate { background: var(--slate); color: var(--ice); }
.btn-slate:hover { transform: translateY(-2px); }

/* ── tags ──────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
}
.tag-accent { background: var(--candy); color: var(--slate); box-shadow: none; }

.chip {
  padding: .6rem 1.1rem;
  font-size: .8125rem;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.chip:hover { color: var(--ice); background: var(--atoll); }
.chip[aria-pressed="true"] { background: var(--candy); color: var(--slate); box-shadow: none; }

/* ── form ──────────────────────────────────────────────────────────────── */
.field {
  width: 100%;
  padding: .95rem 1.1rem;
  background: var(--well);
  color: var(--ice);
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  font: inherit;
  font-size: .9375rem;
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color .16s ease;
}
.field::placeholder { color: var(--muted); }
.field:focus { outline-color: var(--candy); }
select.field { appearance: none; }
/* Native <option> does not reliably inherit the tile it sits on — some
   platforms paint it with the select's colours, others with the OS popup's.
   Set both explicitly so the dropdown is legible either way. */
.field option { background: var(--well); color: var(--ice); }
/* forms sitting on a light tile invert */
.tile-ice .field, .tile-candy .field {
  background: color-mix(in srgb, var(--slate) 6%, transparent);
  color: var(--slate);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--slate) 16%, transparent);
}
.tile-ice .field::placeholder, .tile-candy .field::placeholder {
  color: color-mix(in srgb, var(--slate) 50%, transparent);
}
.tile-ice .field option, .tile-candy .field option { background: var(--ice); color: var(--slate); }

/* ── link underline that draws in ──────────────────────────────────────── */
.ulink {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .35s cubic-bezier(.22,.61,.36,1);
}
.ulink:hover { background-size: 100% 1px; }

/* ── graphics ──────────────────────────────────────────────────────────── */
.seal { animation: spin 22s linear infinite; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }

.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(currentColor .5px, transparent .5px);
  background-size: 7px 7px;
  color: var(--line);
}

/* ── blueprint washes ──────────────────────────────────────────────────── */
/* A faint street-grid over a dark tile. Metaphor, not decoration. */
.bp {
  background-image:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--ice) 4%, transparent) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(0deg,  color-mix(in srgb, var(--ice) 4%, transparent) 0 1px, transparent 1px 36px);
}
/* Same grid as a section backdrop, masked so it blooms behind the graphic. */
.bp-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--ice) 6%, transparent) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg,  color-mix(in srgb, var(--ice) 6%, transparent) 0 1px, transparent 1px 42px);
  -webkit-mask-image: radial-gradient(58rem 30rem at 72% 22%, #000, transparent 68%);
          mask-image: radial-gradient(58rem 30rem at 72% 22%, #000, transparent 68%);
}

/* trade icons on /for/ tiles */
.trade-ico { color: var(--muted); transition: color .25s ease, transform .25s ease; }
.group:hover .trade-ico { color: var(--ice); transform: translateY(-2px); }

/* the category marker on /for/ tiles — pings like a map pin on hover */
.node-chip { position: relative; }
.group:hover .node-chip::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  animation: chip-ping 1.1s ease-out infinite;
}
@keyframes chip-ping { from { opacity: .8; scale: .6; } to { opacity: 0; scale: 1.5; } }

/* ── the mad-lib brief ─────────────────────────────────────────────────── */
/* One big sentence with blanks. Dark ground, candy answers. */
.madlib {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 600;
  line-height: 2.15;
  letter-spacing: -.01em;
  color: var(--ice);
}
.mfield {
  display: inline-block;
  background: transparent;
  border: 0;
  border-bottom: 2px solid color-mix(in srgb, var(--candy) 30%, transparent);
  color: var(--candy);
  font: inherit;
  padding: 0 .15em;
  margin: 0 .05em;
  max-width: 100%;
  min-width: 5ch;
  field-sizing: content;
  outline: none;
  border-radius: 0;
  transition: border-color .2s ease;
}
.mfield::placeholder { color: var(--muted); font-weight: 500; }
.mfield:focus { border-color: var(--candy); }
.mfield:not(:placeholder-shown) { border-color: var(--candy); }
.mfield-wide { min-width: 12ch; }
/* Chrome autofill paints a white box over the dark theme; repaint it. */
.mfield:-webkit-autofill,
.mfield:-webkit-autofill:hover,
.mfield:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--candy);
  -webkit-box-shadow: 0 0 0 1000px var(--atoll) inset;
          box-shadow: 0 0 0 1000px var(--atoll) inset;
  caret-color: var(--candy);
  transition: background-color 999999s ease-out;
}

/* budget: inline choices inside the sentence — the native select popup
   cannot be themed, so we do not use one */
.mchoice {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2em .35em;
  vertical-align: baseline;
}
.mopt { position: relative; }
.mopt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mopt span {
  display: inline-block;
  cursor: pointer;
  padding: 0 .35em;
  font-size: .6em;
  font-weight: 600;
  line-height: 1.9;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.mopt:hover span { color: var(--ice); }
.mopt input:checked + span { color: var(--candy); border-color: var(--candy); }
.mopt input:focus-visible + span { outline: 2px solid var(--candy); outline-offset: 3px; }
.merr {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--bad);
  margin: -.6em 0 .4em;
}

@media (prefers-reduced-motion: reduce) {
  .seal { animation: none; }
  .mfield { transition: none; }
  .group:hover .node-chip::before { animation: none; opacity: .5; }
  .tile-hover, .btn, .ulink { transition: none; }
  .tile-hover:hover, .btn:hover { transform: none; }
}

/* ── 2025 home rework — pill nav + rounded surfaces (AI-agency references).
   Same four colours, same type; only the shape language softens. ─────────── */
.pill-nav { background: var(--ice); color: var(--slate); border-radius: 999px; }
.pill-nav a { color: color-mix(in srgb, var(--slate) 60%, transparent); font-weight: 500; transition: color .18s ease; }
.pill-nav a.on, .pill-nav a:hover { color: var(--slate); }

.chip-btn {
  display: inline-flex; align-items: center; gap: .85rem;
  background: var(--ice); color: var(--slate);
  border-radius: 999px; padding: .4rem 1.5rem .4rem .4rem;
  font-weight: 600; font-size: .875rem; white-space: nowrap;
  transition: transform .2s ease;
}
.chip-btn:hover { transform: translateY(-2px); }
.chip-btn .glyph {
  width: 2.4rem; height: 2.4rem; border-radius: 1rem; flex: none;
  background: var(--slate); color: var(--ice);
  display: inline-flex; align-items: center; justify-content: center;
}
.chip-btn.candy { background: var(--candy); color: var(--slate); }
.chip-btn.candy .glyph { background: var(--slate); color: var(--candy); }

/* rounded variants, scoped so the rest of the studio keeps its square edges */
.ai-round .tile { border-radius: 1.75rem; }
.ai-round .btn { border-radius: 999px; }
.ai-round .chip { border-radius: 999px; }
.rd { border-radius: 1.75rem; }

/* numbered chips on the capability cards */
.cap-num { font-family: "JetBrains Mono", monospace; font-size: .6875rem; letter-spacing: .12em;
  padding: .35rem .7rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.cap-tile { background: color-mix(in srgb, var(--atoll) 46%, var(--slate));
  border-radius: 1.4rem; box-shadow: inset 0 0 0 1px var(--line); }

/* bento stat cards */
.dash-card { border-radius: 1.75rem; box-shadow: none;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); }
/* only the tick ring spins — the number stays upright */
.burst { animation: burst-spin 24s linear infinite;
  transform-box: fill-box; transform-origin: center; }
.seal-rev { animation: burst-rev 36s linear infinite; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .burst, .seal-rev { animation: none; } }
@keyframes burst-spin { to { transform: rotate(360deg); } }
@keyframes burst-rev { to { transform: rotate(-360deg); } }

/* framed hero details */
.news-pill { display: inline-flex; align-items: center; gap: .8rem;
  background: var(--atoll); color: var(--ice); border-radius: 999px;
  padding: .45rem 1.1rem .45rem .45rem; font-size: .875rem; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s ease; }
.news-pill:hover { transform: translateY(-2px); }
.chip-new { background: var(--candy); color: var(--slate); border-radius: 999px;
  padding: .25rem .8rem; font-size: .75rem; font-weight: 700; }

