/* Nocturne — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */

:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9; 
  --color-accent-2: #a7a1db; 
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-500: #968ae0;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  --color-accent-2-100: #f5f4ff;
  --color-accent-2-200: #e7e5fe;
  --color-accent-2-300: #d2cefd;
  --color-accent-2-400: #b5afe8;
  --color-accent-2-500: #9690c9;
  --color-accent-2-600: #7972a9;
  --color-accent-2-700: #5c5783;
  --color-accent-2-800: #423e5d;
  --color-accent-2-900: #2b293a;

    --color-section: #262a60;
  --color-section-glow: #353b80;
  --color-section-ghost: #4c5397;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0,0,0,0.65);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.lighten{mix-blend-mode:lighten;background-color:transparent}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
/* Rules fade to transparent at both ends instead of stopping cleanly — a
   Nocturne signature. The ramp is 48px an end (one deck baseline unit),
   painted from the same divider token. Freestanding rules fade; box
   outlines, in-control separators, and short accent marks stay solid. */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-accent-2 { background: var(--color-accent-2-800); color: var(--color-accent-2-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: none;
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid transparent; /* keeps layout; the row paints the fading rule */
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid transparent;
}
/* Row rules as row-level strips so the end-fade spans the row, not each cell. */
.table thead tr {
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr {
  background: linear-gradient(to right,
    transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
    color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr:hover {
  /* the hover tint layers over the row rule, which keeps painting */
  background:
    linear-gradient(color-mix(in srgb, var(--color-text) 4%, transparent),
                    color-mix(in srgb, var(--color-text) 4%, transparent)) no-repeat 0 0 / 100% 100%,
    linear-gradient(to right,
      transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
      color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* ==========================================================================
   Dorkish site styles
   ========================================================================== */
:root {
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --rule: linear-gradient(to right, transparent, var(--color-divider) 48px, var(--color-divider) calc(100% - 48px), transparent);
  --gutter: 96px;
}
html { scroll-behavior: smooth; background: var(--color-bg); }
body {
  background: radial-gradient(900px 520px at 0% 0%, var(--color-accent-900), transparent 70%) no-repeat, var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
a:hover { color: var(--color-accent-300); }
.mono { font-family: var(--font-mono); }
.wrap { max-width: 1280px; margin: 0 auto; }
.section { padding: 0 var(--gutter) 104px; scroll-margin-top: 24px; }
.kicker { font-family: var(--font-mono); font-size: 13px; color: var(--color-accent); }
.section-title { font-size: 44px; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.muted { color: var(--color-neutral-400); }
.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 8px; z-index: 10; }

/* nav */
.site-nav { display: flex; align-items: center; gap: 28px; padding: 22px var(--gutter); }
.brand { font-family: var(--font-mono); font-size: 19px; font-weight: 500; color: var(--color-text); text-decoration: none; margin-right: auto; display: flex; align-items: baseline; }
.brand:hover { color: var(--color-text); }
.brand-cursor { color: var(--color-accent); animation: dk-blink 1.1s steps(1) infinite; }
.nav-link { color: var(--color-neutral-300); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--color-accent); }

/* availability */
.status { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; color: var(--color-neutral-400); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--color-accent-400); animation: dk-pulse 2s ease-out infinite; }
.status[data-status="limited"] .status-dot { background: var(--color-accent-2-600); }
.status[data-status="booked"] .status-dot { background: var(--color-neutral-600); animation: none; }

/* hero */
.hero { padding: 96px var(--gutter) 88px; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 72px; align-items: end; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: 76px; line-height: 1.02; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.hero-lede { font-size: 20px; line-height: 1.5; color: var(--color-neutral-300); margin: 0; max-width: 600px; text-wrap: pretty; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-lg { font-size: 15px; padding: 11px 18px; }
.config { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.5; background: color-mix(in srgb, var(--color-surface) 70%, transparent); box-shadow: var(--shadow-sm); border-radius: var(--radius-md); padding: 22px 24px; display: grid; grid-template-columns: auto 1fr; column-gap: 22px; row-gap: 10px; margin: 0; }
.config dt { color: var(--color-accent-400); }
.config dd { margin: 0; }
.config-comment { grid-column: 1 / -1; color: var(--color-neutral-600); }

/* white label */
.fade-rule { height: 1px; background: var(--rule); margin-bottom: 48px; }
.wl-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 40px; }
.wl-grid h2 { font-size: 26px; margin: 0; }
.wl-grid h2 span { color: var(--color-accent); }
.wl-item { display: flex; flex-direction: column; gap: 8px; }
.wl-item h3 { margin: 0; font-size: 16px; }
.wl-item p { margin: 0; font-size: 15px; color: var(--color-neutral-400); text-wrap: pretty; }

/* services */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 36px; }
.section-head > div { display: flex; flex-direction: column; gap: 10px; }
.section-head > p { margin: 0; max-width: 420px; font-size: 15px; color: var(--color-neutral-400); text-wrap: pretty; }
.service-list { list-style: none; margin: 0; padding: 0; }
.service { display: grid; grid-template-columns: 72px minmax(0,1fr) minmax(0,1.4fr); gap: 32px; padding: 26px 0; background: var(--rule) no-repeat top / 100% 1px; }
.service:last-child { background: var(--rule) no-repeat top / 100% 1px, var(--rule) no-repeat bottom / 100% 1px; }
.service-num { font-family: var(--font-mono); font-size: 14px; color: var(--color-neutral-600); padding-top: 4px; }
.service-name { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.service h3 { margin: 0; font-size: 24px; }
.service p { margin: 0; font-size: 16px; color: var(--color-neutral-300); text-wrap: pretty; }
.hire-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 48px; }
.hire-grid .card { padding: 22px 24px; gap: 8px; }
.hire-grid .card-kicker { font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: none; font-size: 12px; }
.hire-grid .card-title { font-size: 20px; margin: 0; }
.hire-grid .card-body { font-size: 15px; }

/* stack */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: 64px; align-items: start; }
.split-head { display: flex; flex-direction: column; gap: 10px; }
.split-head p { margin: 6px 0 0; font-size: 15px; color: var(--color-neutral-400); max-width: 340px; text-wrap: pretty; }
.terminal { font-family: var(--font-mono); background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 18px; font-size: 12px; color: var(--color-neutral-500); box-shadow: inset 0 -1px 0 var(--color-neutral-800); }
.terminal-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--color-neutral-700); }
.terminal-bar span { margin-left: 10px; }
.stack { padding: 22px 24px; display: grid; grid-template-columns: 150px minmax(0,1fr); row-gap: 18px; column-gap: 20px; font-size: 14px; align-items: baseline; margin: 0; }
.stack dt { color: var(--color-accent-400); }
.stack dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* about */
.about { align-items: center; }
.portrait { aspect-ratio: 4 / 5; border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait.is-missing { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--color-surface) 0 10px, var(--color-neutral-900) 10px 20px); mix-blend-mode: normal; }
.portrait.is-missing img { display: none; }
.portrait.is-missing::after { content: "assets/img/alex.jpg"; font-family: var(--font-mono); font-size: 12px; color: var(--color-neutral-500); }
.about-copy { display: flex; flex-direction: column; gap: 18px; }
.about-copy p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--color-neutral-300); max-width: 620px; text-wrap: pretty; }

/* contact */
.contact { margin: 0 40px 40px; padding: 72px 56px; border-radius: var(--radius-lg); background: radial-gradient(700px 400px at 100% 100%, var(--color-accent-900), transparent 70%), var(--color-surface); box-shadow: var(--shadow-sm); display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 64px; scroll-margin-top: 24px; }
.contact-intro { display: flex; flex-direction: column; gap: 18px; }
.contact-intro > p { margin: 0; font-size: 16px; color: var(--color-neutral-300); max-width: 380px; }
.contact-meta { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; font-family: var(--font-mono); font-size: 14px; }
.contact-meta .status { font-size: 14px; color: var(--color-text); }
.contact-meta a { text-decoration: none; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.contact-form legend { display: block; font-size: 12px; margin-bottom: 5px; padding: 0; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.contact-form textarea.input { min-height: 130px; }
.seg { flex-wrap: wrap; }
.form-sent { display: flex; flex-direction: column; gap: 10px; justify-content: center; font-family: var(--font-mono); }
.form-sent[hidden] { display: none; }
.form-sent span { color: var(--color-accent); font-size: 14px; }
.form-sent h3 { margin: 0; font-family: var(--font-heading); }
.form-sent p { margin: 0; color: var(--color-neutral-400); font-size: 14px; }

/* footer */
.site-footer { padding: 8px var(--gutter) 40px; display: flex; justify-content: space-between; gap: 24px; font-size: 13px; color: var(--color-neutral-500); font-family: var(--font-mono); }

@keyframes dk-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes dk-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-cursor, .status-dot { animation: none; }
}

/* responsive */
@media (max-width: 1100px) {
  :root { --gutter: 56px; }
  .hero { grid-template-columns: 1fr; gap: 48px; align-items: start; }
  .hero h1 { font-size: 60px; }
  .config { max-width: 520px; }
  .wl-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .wl-grid h2 { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  :root { --gutter: 28px; }
  .site-nav { gap: 18px; }
  .nav-link { display: none; }
  .hero { padding-top: 56px; padding-bottom: 64px; }
  .hero h1 { font-size: 46px; }
  .hero-lede { font-size: 18px; }
  .section { padding-bottom: 80px; }
  .section-title { font-size: 34px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .wl-grid, .hire-grid, .split { grid-template-columns: 1fr; gap: 28px; }
  .service { grid-template-columns: 40px minmax(0,1fr); gap: 12px 16px; }
  .service p { grid-column: 2; }
  .service h3 { font-size: 21px; }
  .stack { grid-template-columns: 1fr; row-gap: 10px; }
  .stack dd { margin-bottom: 10px; }
  .portrait { max-width: 360px; }
  .contact { margin: 0 12px 24px; padding: 44px 22px; grid-template-columns: 1fr; gap: 36px; }
  .contact-form { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 8px; }
}
