/* tenebrae-studio-site: the one stylesheet, for site/index.html.
   Linked as styles.css?v=<first 8 hex of sha256(this file)>; tests/test_site.py
   fails when the hash no longer matches, so a CSS change cannot ship behind
   the 30-day immutable cache with a stale link. site/hero.js is cache-busted
   the same way, same rule, separate hash.

   Font sizes are rem: the same pixels at the browser default of 16px, and
   they follow a reader's own font-size setting. Other spacing (padding,
   margin, gap, widths) stays in px, matching this file's existing
   convention and the design handoff's own units. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #f2f2f2;
  --muted: #9a9a9a;
  --body: #b4b4b4;
  --line: #f2f2f2;
  --hairline: #2a2a2a;
  --numeral: #5a5a62;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Self-hosted (CSP is default-src 'self'; no Google Fonts at runtime).
   Latin subset, WOFF2. License: assets/fonts/OFL.txt. */
@font-face {
  font-family: Cinzel;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(/assets/fonts/cinzel-400.woff2) format("woff2");
}
@font-face {
  font-family: Cinzel;
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url(/assets/fonts/cinzel-500.woff2) format("woff2");
}

/* ── Hero ── */

.hero { position: relative; height: 125vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #000; }
.hero-canvas { position: absolute; inset: 0; }
nav.top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
nav.top a {
  color: inherit;
  text-decoration: none;
  padding: 10px 0;
  margin: -10px 0;
}
nav.top a:hover { color: var(--fg); }
.hero-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  pointer-events: none;
}
h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.wordmark {
  position: relative;
  font-family: Cinzel, "Trajan Pro", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 7.5vw, 7rem);
  letter-spacing: 0.22em;
  margin-right: -0.2em; /* optical centering of the trailing tracking */
  line-height: 1;
  background-image:
    radial-gradient(90px 220px at var(--sx, 50%) var(--sy, 40%), #fff 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, #ececf1 0%, #c4c4cb 42%, #6c6c76 50%, #dcdce2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 30px rgba(0, 0, 0, .8));
}
@supports not (background-clip: text) {
  .wordmark { color: #d4d4da; background: none; }
}
.tagline {
  font-size: clamp(0.6875rem, 1.1vw, 0.8125rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #c9c9c9;
  font-weight: 400;
}
.pitch {
  margin: 6px 0 0;
  max-width: 560px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.cue {
  margin-top: 14px;
  width: 1px;
  height: 36px;
  background: linear-gradient(#f2f2f2, transparent);
}

/* Entrance motion: the hero's only animation. Decorative, so reduced motion
   (below) drops it with nothing lost; hero.js separately freezes the shader
   itself to a single frame under the same preference. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0%, 100% { transform: scaleY(.2); opacity: .2; } 50% { transform: scaleY(1); opacity: .8; } }
h1     { animation: rise 1.6s cubic-bezier(.2,.7,.2,1) .3s both; }
.pitch { animation: rise 1.6s cubic-bezier(.2,.7,.2,1) .7s both; }
.cue   { transform-origin: top; animation: cue 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  h1, .pitch, .cue { animation: none; }
}

/* ── Content column ── */

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 72px;
  position: relative; /* paints over the sticky hero as it scrolls up */
  background: #000;
}
.content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#privacy, #accessibility { gap: 16px; }
.content h2 {
  font-family: Cinzel, "Trajan Pro", Georgia, serif;
  font-weight: 400;
  font-size: 1.375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.content h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #f2f2f2, transparent);
}
.content > p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
}

/* ── Projects cards ── */

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px; /* the 1px gap on a hairline background draws the grid lines */
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.app {
  background: #000;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app:hover { background: #070708; }
.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}
.app h3 {
  margin: 0;
  font-family: Cinzel, "Trajan Pro", Georgia, serif;
  font-weight: 500;
  font-size: 1.1875rem;
  letter-spacing: 0.06em;
}
.app .status {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  border: 1px solid #6a6a6a;
  padding: 4px 9px;
  line-height: 1.4;
}
.app p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--body);
}
.app .links {
  font-size: 0.875rem;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.app .tip { font-size: 0.78125rem; color: var(--muted); }

/* ── How it works ── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px 32px;
}
.steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.numeral {
  font-family: Cinzel, "Trajan Pro", Georgia, serif;
  font-weight: 400;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--numeral);
  width: 52px;
}
.steps p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--body);
}
.steps p strong { color: var(--fg); display: block; margin-bottom: 4px; }

/* ── FAQ ── */

.faq { display: flex; flex-direction: column; gap: 0; }
.faq-item { padding: 18px 0; border-top: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }
.faq-item h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.faq-item p { margin: 0; font-size: 0.9375rem; line-height: 1.65; color: var(--body); }

/* ── Form ── */

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
}
.field {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}
.field:last-of-type { border-bottom: none; }
label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 18px 0;
}
textarea, input[type="email"] {
  background: transparent;
  border: none;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  padding: 8px 18px 16px;
  width: 100%;
}
textarea { resize: vertical; min-height: 150px; }
textarea:focus-visible, input[type="email"]:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}
textarea::placeholder, input::placeholder { color: #7a7a7a; }
.row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}
button {
  background: var(--fg);
  color: #000;
  border: none;
  padding: 18px 32px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
button:hover { background: #cfcfcf; }
button:disabled { opacity: 0.5; cursor: default; }
#status {
  font-size: 0.75rem;
  color: var(--muted);
  align-self: center;
  padding: 0 18px;
  text-align: right;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ── Skip link, focus, footer, user preferences ── */

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  padding: 10px 14px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--fg);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
main[tabindex]:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
main a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}
main a:hover { color: var(--muted); }
footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
footer a:hover { color: var(--fg); }

/* Increase Contrast: the muted grey and body text come up. There IS an
   effect now: reduced motion is handled separately, by hero.js (freezes the
   shader to one frame) and the prefers-reduced-motion rule above (drops the
   entrance/cue keyframes). */
@media (prefers-contrast: more) {
  :root { --muted: #d6d6d6; --body: #dcdcdc; }
  textarea::placeholder, input::placeholder { color: #bdbdbd; }
}
