/* Inter and JetBrains Mono are self-hosted under the SIL Open Font License. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --background: #000000;
  --surface: #141414;
  --surface-soft: #0c0c0c;
  --foreground: #ffffff;
  --text: #ededed;
  --muted: #8a8a8a;
  --faint: #4a4a4a;
  --border: #222222;
  --line: #333333;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.4, .5, 1);
  font-family: var(--font-sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-size: 13px; line-height: 1.6; letter-spacing: .01em; }
html.js body { overflow: hidden; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--foreground); outline-offset: 4px; border-radius: 3px; }
::selection { background: var(--foreground); color: var(--background); }
h1, h2, p, figure { margin: 0; }
svg, img { display: block; }
.muted { color: var(--muted); }
.name-dot { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.symbol-defs { position: absolute; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 50; padding: 8px 16px; border-radius: 999px; background: var(--foreground); color: var(--background); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* The stage: the mark, whose rings are the links to the windows, and a name below it. */
.stage { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 45%, #0b0b0b 0, var(--background) 55%); }
.stage:focus { outline: none; }
/* Fingers drag through the mark rather than scrolling the page; pinch zoom still works. */
.stage { touch-action: pinch-zoom; }
.launcher { display: flex; flex-direction: column; align-items: center; text-align: center; animation: fade-in 600ms var(--ease-out) both; }
.mark-nav { position: relative; width: min(78vmin, 680px, 100svh - 200px); aspect-ratio: 1147 / 1138; color: var(--foreground); animation: mark-in 700ms var(--ease-out) both; }
.mark { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mark-vector { fill: currentColor; pointer-events: none; }
.field { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.mark-nav.is-live .mark-vector, .mark-nav.is-live .zone text { visibility: hidden; }
.zone { cursor: pointer; outline: none; }
.label-arc { fill: none; stroke: none; pointer-events: none; }
.zone-fill { fill: transparent; transition: fill 220ms var(--ease-out); }
.zone text { fill: var(--foreground); font-family: var(--font-sans); font-size: 40px; font-weight: 500; letter-spacing: .01em; text-anchor: middle; dominant-baseline: central; transition: fill 220ms var(--ease-out); animation: label-in 700ms var(--ease-out) both; }
.zone-blog text { animation-delay: 700ms; }
.zone-contact text { animation-delay: 800ms; }
.zone-overview text { animation-delay: 900ms; }
.zone:focus-visible .zone-fill { fill: var(--background); }
/* Only real pointers trigger hover, so a tap on an iPad or phone does not leave a ring lit. */
@media (hover: hover) {
  .zone:hover .zone-fill { fill: var(--background); }
}
.zone:focus-visible text { text-decoration: underline; text-underline-offset: .2em; }
@keyframes mark-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes label-in { from { opacity: 0; } to { opacity: 1; } }
.launcher-name { margin-top: 32px; font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; color: var(--foreground); }
.launcher-line { margin-top: 8px; font-size: 14px; color: var(--muted); }
.launcher-line a { color: var(--text); transition: color 180ms ease; }
.launcher-line a:hover { color: var(--foreground); }
/* Opacity only: the canvas measures the mark's position, so it must not move while fading in. */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Windows */
.window { width: min(100vw - 32px, 720px); max-width: none; max-height: min(100vh - 32px, 100svh - 32px); margin: auto; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--background); color: var(--text); box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04); overflow: hidden; }
.window[open] { display: flex; flex-direction: column; animation: window-in 220ms var(--ease-out); }
.window:focus, .window:focus-visible { outline: none; }
.window#contact { width: min(100vw - 32px, 480px); }
.window::backdrop { background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@keyframes window-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.window-frame { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.window-bar { display: flex; flex: none; align-items: center; gap: 12px; height: 44px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.window-dots { display: flex; gap: 6px; }
.window-dots span { width: 9px; height: 9px; border-radius: 50%; background: #2a2a2a; }
.window-title { flex: 1; text-align: center; font-size: 12px; font-weight: 500; color: var(--muted); }
.window-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; transition: color 180ms ease, background 180ms ease; }
.window-close:hover { color: var(--foreground); background: var(--surface); }
.window-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 44px; }
.window-body:focus { outline: none; }

/* Overview */
.overview { padding: 44px 0 48px; text-align: center; }
h1 { font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -.02em; color: var(--foreground); }
.fous-link { display: inline-flex; align-items: center; gap: .22em; transition: color 180ms ease; }
.fous-mark { width: .72em; height: .72em; }
.fous-link:hover { color: var(--muted); }
.fous-link .name-dot { margin-left: -.22em; }

.overview-details { max-width: 460px; margin: 18px auto 0; }
.project-description { font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.project-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 32px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background 180ms ease, transform 180ms var(--ease-out); }
.button span[aria-hidden] { transition: transform 180ms var(--ease-out); }
.button:hover span[aria-hidden] { transform: translate(2px, -2px); }
.button-primary { background: var(--foreground); color: var(--background); }
.button-primary:hover { background: #d9d9d9; }

/* How Fous works: three steps as cards, like the tool cards on fous.com. */
.flow { margin-top: 36px; text-align: left; }
.flow-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 8px; }
.flow-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 192px; padding: 42px 18px 24px; border-radius: 12px; background: var(--surface); }
.flow-stage { position: absolute; top: 14px; left: 16px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.flow-window { width: 100%; max-width: 172px; border: 1px solid var(--line); border-radius: 8px; background: var(--background); overflow: hidden; }
.flow-window-bar { display: flex; gap: 4px; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.flow-window-bar span { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.flow-window-url { display: block; margin: 8px 8px 6px; padding: 5px 8px; border-radius: 999px; background: var(--surface); font-size: 11px; line-height: 1.3; color: var(--text); text-align: center; }
.flow-window-lines { display: flex; flex-direction: column; gap: 5px; padding: 4px 12px 12px; }
.flow-window-lines span { height: 4px; border-radius: 2px; background: #1f1f1f; }
.flow-window-lines span:nth-child(1) { width: 82%; }
.flow-window-lines span:nth-child(2) { width: 58%; }
.flow-window-lines span:nth-child(3) { width: 70%; }
.flow-arrow { display: grid; place-items: center; width: 22px; color: var(--muted); }
.flow-arrow svg { width: 18px; height: 18px; }
.flow-logo { width: 56px; height: 56px; color: var(--text); }
.flow-tools { display: flex; flex-direction: column; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.flow-tools li { padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--background); font-size: 12px; line-height: 1.4; color: var(--text); }
.flow-caption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-top: 14px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-align: center; }

/* Contact */
.contact { display: grid; gap: 20px; padding: 32px 0 36px; }
.contact-heading { padding: 0; }
h2 { font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--foreground); }
.contact-heading p { margin-top: 4px; color: var(--muted); }
.contact-list { width: 100%; list-style: none; margin: 0; padding: 0; }
.contact-list li + li { border-top: 1px solid var(--border); }
.contact-list a { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 15px 0; }
.contact-icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--text); }
.contact-value { min-width: 0; margin-left: auto; overflow-wrap: anywhere; color: var(--muted); transition: color 180ms ease; }
.contact-arrow { color: var(--faint); transition: transform 180ms var(--ease-out), color 180ms ease; }
.contact-list a:hover .contact-value { color: var(--foreground); }
.contact-list a:hover .contact-arrow { color: var(--foreground); transform: translate(2px, -2px); }

/* Without JavaScript the windows simply follow the mark as ordinary sections. */
html.no-js .stage { position: static; min-height: 100svh; }
html.no-js .window, html.no-js .window#contact { display: block; position: static; width: auto; max-width: 1120px; max-height: none; margin: 0 auto 24px; }
html.no-js .window-close { display: none; }

@media (max-width: 699px) {
  body { font-size: 14px; }
  .stage { padding: 20px; }
  .mark-nav { width: min(92vw, 440px, 100svh - 180px); }
  .zone text { font-size: 58px; }
  .window, .window#contact { width: 100vw; height: 100svh; max-height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
  .window-body { padding: 0 22px; }
  .overview { padding: 28px 0 44px; }
  h1 { font-size: 34px; }
  .overview-details { margin-top: 16px; }
  .project-description { font-size: 16px; }
  .button { height: 40px; padding: 0 18px; font-size: 14px; }
  .flow { margin-top: 30px; }
  .flow-steps { grid-template-columns: 1fr; gap: 6px; }
  .flow-step { min-height: 150px; padding: 40px 18px 22px; }
  .flow-arrow { width: auto; height: 22px; }
  .flow-arrow svg { transform: rotate(90deg); }
  .contact { padding: 28px 0 40px; }
  .contact-list a { min-height: 58px; }
}

@media (max-width: 360px) {
  .window-body { padding: 0 18px; }
  h1 { font-size: 30px; }
  .contact-list a { gap: 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
