/* Spirited Code — a night on the playa that ends at sunrise. */

:root {
  --navy: #04345c;           /* brand */
  --cyan: #9cf8fe;           /* brand */
  --night: #021a30;
  --night-2: #03284a;
  --dusk: #0a4776;
  --ember: #ffb07a;          /* art cars and sunrise only */
  --ember-deep: #e2764a;

  --text: #d7ecf2;
  --text-soft: #97b9ca;
  --heading: #f3fcfd;
  --line: rgb(156 248 254 / 0.16);

  /* Daylight pages (support, privacy, terms) */
  --mist: #eef5f7;
  --paper: #fbfdfd;
  --ink: #0b2a45;
  --ink-soft: #46627a;
  --rule: #cfdde4;
  --link: #075f86;

  --font-display: "Kreon", "Rockwell", "Roboto Slab", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "Cascadia Mono", monospace;

  --wide: 76rem;
  --gutter: clamp(1.1rem, 4.5vw, 3rem);
  --radius-pill: 999px;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--heading); font-weight: 600; text-wrap: balance; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  padding: 0.5rem 1rem; border-radius: 6px;
  background: var(--cyan); color: var(--navy);
}
.skip-link:focus { top: 1rem; }

/* ------------------------------------------------------------ brand marks */

.brand-icon, .brand-wordmark, .hero-icon {
  display: block;
  background: currentColor;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.brand-icon, .hero-icon { --mark: url("/assets/img/icon.svg"); aspect-ratio: 324.45 / 204.9; }
.brand-wordmark { --mark: url("/assets/img/wordmark.svg"); aspect-ratio: 461.73 / 60.49; }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(2 26 48 / 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner, .footer-inner, .section-inner {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

.brand { display: flex; align-items: center; gap: 0.8rem; color: var(--cyan); text-decoration: none; }
.brand .brand-icon { height: 2.1rem; }
.brand .brand-wordmark { height: 1.15rem; }

.site-nav { display: flex; gap: clamp(0.9rem, 2.4vw, 2rem); font-size: 0.98rem; }
.site-nav a { color: var(--text); text-decoration: none; padding-block: 0.3rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--heading); box-shadow: inset 0 -2px 0 var(--cyan); }

/* ------------------------------------------------------------ buttons */

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.button-primary { background: var(--cyan); color: var(--navy); }
.button-primary:hover { background: #fff; box-shadow: 0 0 0 4px rgb(156 248 254 / 0.25); }
.button-ghost { color: var(--cyan); box-shadow: inset 0 0 0 1.5px rgb(156 248 254 / 0.6); }
.button-ghost:hover { background: rgb(156 248 254 / 0.1); box-shadow: inset 0 0 0 1.5px var(--cyan); }

/* ------------------------------------------------------------ hero: the playa at night */

.hero {
  --horizon: 0.78;
  position: relative;
  overflow: hidden;
  min-height: clamp(34rem, 88svh, 52rem);
  display: grid;
  background:
    radial-gradient(ellipse 60% 40% at 72% 74%, rgb(156 248 254 / 0.12), transparent 70%),
    linear-gradient(to bottom, var(--night) 0%, var(--night-2) 55%, var(--navy) 74%, #032c4f 100%);
}

.playa {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.25;
  color: rgb(156 248 254 / 0.42);
  white-space: pre;
  user-select: none;
  pointer-events: none;
}
.playa .s { color: rgb(220 252 255 / 0.9); }
.playa .r { color: rgb(156 248 254 / 0.3); }
.playa .g { color: rgb(156 248 254 / 0.22); }
.playa .n { color: rgb(156 248 254 / 0.55); }
.playa .e { color: var(--ember); text-shadow: 0 0 6px var(--ember-deep); }

/* Keep the headline readable over the starfield. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 60% at 22% 42%, rgb(2 26 48 / 0.78), transparent 72%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
}

.hero-text { align-self: center; padding-block: 4rem 6rem; max-width: 36rem; }

.hero-title {
  margin: 0 0 1.4rem;
  font-size: clamp(3rem, 7.4vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  font-weight: 650;
}

.hero-lede { margin: 0 0 2rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text); max-width: 32rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* The Man stands on the horizon. */
.hero-mark {
  position: relative;
  filter: drop-shadow(0 0 14px rgb(156 248 254 / 0.55)) drop-shadow(0 0 40px rgb(156 248 254 / 0.25));
}
.hero-icon {
  position: absolute;
  left: 50%;
  bottom: calc((1 - var(--horizon)) * 100% - 0.2rem);
  width: min(100%, 23rem);
  translate: -50% 0;
  color: var(--cyan);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-icon { animation: materialize 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s both; }
  .hero-text > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.12s; }
  .hero-text > :nth-child(3) { animation-delay: 0.24s; }
}

@keyframes materialize {
  from { clip-path: inset(100% 0 0 0); opacity: 0.2; }
  60% { opacity: 1; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes rise { from { opacity: 0; transform: translateY(0.8rem); } }

/* ------------------------------------------------------------ sections: the sky slowly brightens */

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.build { background: #032c4f; }
.approach { background: linear-gradient(to bottom, #032c4f, var(--navy)); }
.hire { background: linear-gradient(to bottom, var(--navy), #073f6b); }

.section-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2, .hire-intro h2 { margin: 0 0 0.8rem; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.05; }
.section-head p { margin: 0; color: var(--text-soft); font-size: 1.2rem; }

.lede { font-size: 1.25rem; line-height: 1.55; color: var(--text); }

/* What we build */
.offerings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.offering { padding: 2.5rem 2rem 0.5rem 0; }
.offering + .offering { padding-left: 2rem; border-left: 1px solid var(--line); }

.ascii {
  margin: 0 0 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--cyan);
  text-shadow: 0 0 10px rgb(156 248 254 / 0.35);
  overflow: hidden;
  /* Same height for every illustration so the titles line up. */
  min-height: calc(8 * 1.2em);
  display: flex;
  align-items: flex-end;
}
.offering h3 { margin: 0 0 0.6rem; font-size: 1.6rem; line-height: 1.15; }
.offering p { margin: 0; color: var(--text-soft); }

/* Approach */
.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.approach-statement {
  margin: 0;
  position: sticky;
  top: 6rem;
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.08;
  font-weight: 500;
}
.approach-body .lede { margin-top: 0.4rem; }

.principles { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.75rem; }
.principles li { position: relative; padding-left: 2.4rem; }
/* The asterisk at the heart of the logo, as a bullet. */
.principles li::before {
  content: "*";
  position: absolute;
  left: 0;
  top: -0.3rem;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 10px rgb(156 248 254 / 0.5);
}
.principles h3 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.principles p { margin: 0; color: var(--text-soft); }

/* Work with us */
.hire-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}
.hire-intro p { max-width: 36rem; }
.hire-intro p:not(.lede) { color: var(--text-soft); }

.services {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgb(2 26 48 / 0.35);
}
.services-title { margin: 0 0 1.25rem; font-size: 1.4rem; }
.services dl { margin: 0; display: grid; gap: 1.25rem; }
.services dl > div + div { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.services dt { font-weight: 700; color: var(--heading); }
.services dd { margin: 0.2rem 0 0; color: var(--text-soft); }

/* ------------------------------------------------------------ dawn */

.dawn {
  position: relative;
  overflow: hidden;
  padding-top: clamp(5rem, 11vw, 8.5rem);
  background:
    radial-gradient(ellipse 55% 42% at 50% 100%, rgb(255 176 122 / 0.5), transparent 70%),
    linear-gradient(to bottom, #073f6b 0%, #0d5282 55%, #3d6f8e 85%, #8a8a86 100%);
  text-align: center;
}
.dawn-inner { position: relative; z-index: 1; max-width: 42rem; }
.dawn h2 { margin: 0 0 1rem; font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.05; }
.dawn p { margin: 0 auto 2rem; font-size: 1.2rem; max-width: 34rem; }

.sunrise .c1 { color: #ffd4a8; text-shadow: 0 0 10px var(--ember); }
.sunrise .c2 { color: var(--ember); }
.sunrise .c3 { color: rgb(255 176 122 / 0.55); text-shadow: none; }

.sunrise {
  margin: 2.5rem 0 0;
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.05vw, 14px);
  line-height: 1.15;
  color: var(--ember);
  text-shadow: 0 0 8px rgb(226 118 74 / 0.8);
  white-space: pre;
  overflow: hidden;
  user-select: none;
}

/* ------------------------------------------------------------ footer */

.site-footer { background: var(--night); border-top: 1px solid var(--line); font-size: 0.95rem; }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 3rem;
  align-items: center;
  padding-block: 2.5rem 3rem;
}
.footer-brand { display: flex; align-items: center; gap: 1rem; color: var(--cyan); }
.footer-brand .brand-icon { height: 2.6rem; }
.footer-name { margin: 0; font-weight: 700; color: var(--heading); }
.footer-tagline { margin: 0; font-family: var(--font-display); font-size: 1.05rem; color: var(--cyan); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem 1.6rem; }
.footer-nav a { color: var(--text); text-decoration: none; }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: var(--cyan); text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 0.88rem; }

/* ------------------------------------------------------------ daylight pages */

main:has(> .doc) {
  background: var(--mist);
  color: var(--ink);
  color-scheme: light;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}

.doc { max-width: 44rem; margin-inline: auto; }
.doc h1, .doc h2, .doc h3 { color: var(--ink); }
.doc-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--ink); }
.doc-title { margin: 0 0 0.6rem; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; }
.doc-summary { margin: 0; color: var(--ink-soft); }

.doc .prose { font-size: 1.08rem; }
.doc .prose h2 { margin: 2.4em 0 0.6em; font-size: 1.6rem; line-height: 1.2; }
.doc .prose h3 { margin: 1.8em 0 0.4em; font-size: 1.25rem; }
.doc .prose p, .doc .prose ul, .doc .prose ol { margin: 0 0 1.1em; }
.doc .prose li { margin-bottom: 0.4em; }
.doc .prose li::marker { color: var(--link); }
.doc a { color: var(--link); }
.doc .prose strong { color: var(--ink); }

.doc .prose .callout {
  margin: 0 0 2em;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--navy);
  border-radius: 0.5rem;
}
.doc .prose .callout p:last-child { margin-bottom: 0; }

.doc .prose code { font-family: var(--font-mono); font-size: 0.9em; }

.not-found-art {
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--navy);
}

/* ------------------------------------------------------------ small screens */

@media (max-width: 62rem) {
  .offerings { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .offering, .offering + .offering { padding: 2rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .approach-grid, .hire-grid { grid-template-columns: minmax(0, 1fr); }
  .approach-statement { position: static; }
}

@media (max-width: 48rem) {
  .site-nav a[href="/#build"], .site-nav a[href="/#approach"] { display: none; }
  .brand .brand-wordmark { height: 0.95rem; }
  .hero { --horizon: 0.8; min-height: 40rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-text { padding-block: 3rem 13rem; }
  .hero-mark { position: absolute; inset: 0; }
  .hero-icon { width: 11rem; left: 72%; }
  .hero::after { background: linear-gradient(to bottom, rgb(2 26 48 / 0.6), transparent 70%); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 30rem) {
  .brand .brand-wordmark { display: none; }
}
