/* Oryx Studio: one stylesheet for the studio site and every app page.
   System fonts only (nothing is fetched from other hosts), light and dark from the OS setting, no scripts.

   Identity (Docs/BRAND.md): bone and ink with sand, New York for display, SF for text. The mark is an oryx head-on:
   two long horns, one lit (bone or ink) and one in sand, over a shield with the dark blaze down its face. */

:root {
  color-scheme: light dark;
  --bg: #f4efe6;            /* bone */
  --surface: #fbf8f2;
  --panel: #ece5d8;
  --ink: #121418;
  --muted: #5f5a51;         /* 6.0:1 on bone */
  --rule: #e0d7c6;
  --sand: #c9a36a;          /* decoration: the shaded horn, rules, glows */
  --sand-text: #7e5b20;     /* sand as text on bone: 5.4:1 */
  --accent: var(--sand-text);
  --tile: #121418;          /* the mark's own tile, dark in both themes */
  --mark-lit: var(--ink);
  --mark-shade: #a07a3c;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 22px;
  --shadow: 0 1px 2px rgb(18 20 24 / 0.05), 0 14px 32px -18px rgb(18 20 24 / 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #15181c;
    --panel: #1b1f24;
    --ink: #f1ece2;
    --muted: #a39e94;       /* 7.2:1 on night */
    --rule: #262a30;
    --sand-text: #d9b677;   /* 9.9:1 */
    --tile: #1b1f24;
    --mark-lit: #f4efe6;
    --mark-shade: #c9a36a;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 18px 40px -22px rgb(0 0 0 / 0.7);
  }
}

/* Each app keeps its own color on its pages and cards (light, then dark). */
[data-app="aloft"] { --accent: #1f4d36; --app: #2f6a4b; }
[data-app="sheer"] { --accent: #2a58d6; --app: #3d63f0; }
[data-app="mach"]  { --accent: #6a45b0; --app: #7b55d6; }
@media (prefers-color-scheme: dark) {
  [data-app="aloft"] { --accent: #7fc79c; }
  [data-app="sheer"] { --accent: #8eaaff; }
  [data-app="mach"]  { --accent: #b9a0f2; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
strong { font-weight: 600; }
code { font: 0.88em var(--mono); background: var(--panel); padding: 0.08em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow); }

.wrap { max-width: 70rem; margin: 0 auto; }
.narrow { max-width: 42rem; margin: 0 auto; }

/* ── The mark ─────────────────────────────────────────────── */
.mark { display: block; overflow: visible; }
.mark path { stroke-width: 1.6; stroke-linejoin: round; }
.mark .horn-l { fill: var(--mark-shade); stroke: var(--mark-shade); }
.mark .horn-r, .mark .ear-l, .mark .ear-r, .mark .head { fill: var(--mark-lit); stroke: var(--mark-lit); }
.mark .blaze { fill: var(--bg); stroke: var(--bg); }
/* On its tile the mark is always the dark-theme version. */
.tile { background: var(--tile); border-radius: 23%; display: grid; place-items: center; }
.tile .mark { --mark-lit: #f4efe6; --mark-shade: #c9a36a; }
.tile .mark .blaze { fill: var(--tile); stroke: var(--tile); }
@media (prefers-color-scheme: dark) { .tile { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); } }

/* ── Site header ──────────────────────────────────────────── */
.site-header {
  max-width: 70rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.wordmark { font: 600 1.3rem/1 var(--serif); letter-spacing: -0.01em; white-space: nowrap; }
.wordmark span { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; justify-content: flex-end; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 340px) { .wordmark span { display: none; } }

/* ── Studio hero ──────────────────────────────────────────── */
.hero {
  padding: clamp(36px, 9vw, 104px) 0 clamp(36px, 7vw, 72px);
  display: grid; gap: clamp(28px, 5vw, 56px); align-items: center;
}
@media (min-width: 860px) { .hero { grid-template-columns: 1.35fr 1fr; } }
.hero-text { display: grid; gap: 22px; justify-items: start; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--sand-text); margin: 0; }
[data-app] .eyebrow { color: var(--accent); }
.display {
  font: 600 clamp(2.4rem, 7.2vw, 4.4rem)/1.04 var(--serif);
  letter-spacing: -0.02em; margin: 0; max-width: 15ch;
}
.lede { font-size: clamp(1.05rem, 2.3vw, 1.25rem); line-height: 1.55; color: var(--muted); margin: 0; max-width: 34rem; }
.hero-art { justify-self: center; position: relative; width: min(100%, 360px); aspect-ratio: 1; }
/* Phones and narrow windows: a small tile above the headline, not a screenful of mark. */
@media (max-width: 859px) {
  .hero-art { order: -1; justify-self: start; width: 120px; }
  .hero-art::before { filter: blur(18px); }
}
.hero-art .tile { width: 100%; height: 100%; box-shadow: var(--shadow); }
.hero-art .mark { width: 74%; height: 74%; }
/* A low sand glow behind the tile, like light on the horns. */
.hero-art::before {
  content: ""; position: absolute; inset: 14% 10% -6%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sand) 38%, transparent), transparent);
  filter: blur(28px); z-index: -1;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: clamp(24px, 5vw, 48px) 0; }
.section-head { display: grid; gap: 8px; margin: 0 0 22px; }
.section-title { font: 600 clamp(1.6rem, 4vw, 2.2rem)/1.15 var(--serif); letter-spacing: -0.01em; margin: 0; }
.section-sub { color: var(--muted); margin: 0; max-width: 36rem; }

/* ── App cards ────────────────────────────────────────────── */
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .apps { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; display: grid; gap: 14px; align-content: start;
  position: relative; overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease;
}
/* The app's color as a soft wash in the card's corner. */
.card::before {
  content: ""; position: absolute; inset: -40% -40% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--app, var(--sand)) 22%, transparent), transparent);
  pointer-events: none;
}
.card-head { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 64px; height: 64px; border-radius: 22.5%; flex: none; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06), 0 8px 18px -10px rgb(0 0 0 / 0.45); }
.card .kind { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 0 0 2px; }
.card h3 { font: 600 1.7rem/1.1 var(--serif); margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* the whole card is the app link */
.card p { margin: 0; color: var(--muted); }
.platforms { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.platforms li, .platforms span { font-size: 12.5px; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 10px; background: var(--bg); }
.card-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; margin-top: 2px; }
.card-links a { position: relative; z-index: 1; color: var(--accent); }
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); }

/* ── Principles ───────────────────────────────────────────── */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principles li { border-top: 2px solid var(--sand); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.principles h3 { font: 600 1.15rem/1.25 var(--serif); margin: 0; }
.principles p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ── Closing note ─────────────────────────────────────────── */
.note {
  margin: clamp(24px, 5vw, 48px) 0 clamp(40px, 7vw, 80px); padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius); background: var(--panel); display: grid; gap: 18px; align-items: center;
}
@media (min-width: 720px) { .note { grid-template-columns: auto 1fr; } }
.note .tile { width: 72px; height: 72px; }
.note .mark { width: 76%; height: 76%; }
.note p { margin: 0; font: 400 clamp(1.1rem, 2.4vw, 1.35rem)/1.45 var(--serif); }

/* ── App page ─────────────────────────────────────────────── */
.app-hero { padding: clamp(28px, 7vw, 72px) 0 clamp(20px, 4vw, 36px); display: grid; gap: 16px; justify-items: start; }
.app-hero .app-icon { width: 104px; height: 104px; }
.app-hero h1 { font: 600 clamp(2.6rem, 8vw, 3.8rem)/1.03 var(--serif); letter-spacing: -0.02em; margin: 0; }
.made-by { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); text-decoration: none; }
.made-by .mark { width: 18px; height: 18px; }
.made-by:hover { color: var(--ink); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.facts li { font-size: 13px; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 11px; background: var(--surface); }
.prose { display: grid; gap: 2rem; padding-bottom: clamp(40px, 7vw, 72px); }
.prose h2 { font: 600 1.5rem/1.25 var(--serif); margin: 0 0 0.6rem; }
.prose p, .prose ul { margin: 0 0 0.75rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--accent); }
.callout { background: var(--panel); border-radius: 16px; padding: 1.25rem 1.4rem; }
.callout > :last-child { margin-bottom: 0; }
.button {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px;
  color: var(--bg); background: var(--accent); padding: 10px 18px; border-radius: 999px;
}
.button:hover { filter: brightness(1.08); }

/* ── Policy pages (one reading column, summary panel, hairline sections) ── */
.policy { display: grid; gap: 2.25rem; padding: clamp(24px, 6vw, 56px) 0 clamp(40px, 7vw, 72px); line-height: 1.65; font-size: 16.5px; }
.policy header { display: grid; gap: 0.5rem; }
.policy h1 { font: 600 clamp(2.1rem, 6vw, 2.9rem)/1.1 var(--serif); margin: 0; }
.policy h2 { font: 600 1.45rem/1.25 var(--serif); margin: 0 0 0.5rem; }
.policy h3 { font: 600 1rem/1.4 var(--sans); margin: 1.1rem 0 0.25rem; }
.policy p, .policy ul { margin: 0 0 0.75rem; }
.policy ul { padding-left: 1.2rem; }
.policy li { margin-bottom: 0.35rem; }
.policy li::marker { color: var(--accent); }
.policy section { border-top: 1px solid var(--rule); padding-top: 1.75rem; }
.policy section > :last-child { margin-bottom: 0; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.summary { background: var(--panel); border-radius: 16px; padding: 1.25rem 1.4rem; }
.summary ul { margin: 0; }
.back { font-size: 15px; text-decoration: none; }
.back::before { content: "← "; }
.table-wrap { overflow-x: auto; margin: 0 0 0.75rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
td:first-child { font-weight: 600; min-width: 9rem; }
@media (max-width: 560px) {
  /* Phone: each row becomes a small card so nothing scrolls sideways. */
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { border-bottom: 1px solid var(--rule); padding: 0.6rem 0; }
  td { border: 0; padding: 0.2rem 0; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
}
.policy-footer { color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.policy-footer p { margin: 0 0 0.5rem; }

/* ── Site footer ──────────────────────────────────────────── */
.site-footer {
  max-width: 70rem; margin: 0 auto; border-top: 1px solid var(--rule);
  padding: 26px 0 max(34px, env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center;
  font-size: 14px; color: var(--muted);
}
.site-footer .brand .mark { width: 22px; height: 22px; }
.site-footer .wordmark { font-size: 1.05rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer .brand { color: var(--ink); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }

/* ── 404 ──────────────────────────────────────────────────── */
.lost { min-height: 50vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 48px 0; }
.lost .tile { width: 84px; height: 84px; }
.lost .mark { width: 76%; height: 76%; }
.lost h1 { font: 600 2rem/1.2 var(--serif); margin: 0; }
.lost p { margin: 0; color: var(--muted); }
