/* Arcvale Apps site. Self-hosted Geist, no external requests, no scripts, no trackers.
   Every colour lives in the two token blocks below (light, then dark). Swap the palette there only. */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ================= Colour tokens: light (default) ================= */
/* Final Arcvale brand (2026-11-11): developer icon g1, header GH3. See design/brand/arcvale/final/README.md */
:root {
  color-scheme: light;

  /* Brand */
  --logo: #5b2eea; /* violet: ONLY the whale mark and the word "Arcvale" (founder, 2026-11-11) */
  --brand: #111114; /* neutral ink for links and accents: the site is white/black/grey */
  --brand-strong: #000000; /* hover */
  --brand-tint: #f4f4f6;
  --accent-gradient: linear-gradient(135deg, #111114, #111114); /* neutral */

  /* Page */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f6f8;
  --ink: #111114; /* headings */
  --text: #2b2b30; /* body */
  --muted: #5f5f66; /* secondary, 6.3:1 on white */
  --line: #ececf0;
  --num: #8a8a93;
  --link: var(--brand);
  --link-hover: var(--brand-strong);
  --focus: var(--brand);

  /* Header bar on legal pages: plain white (founder, 2026-11-11) */
  --bar-from: #ffffff;
  --bar-to: #ffffff;
  --bar-sheen: rgba(255, 255, 255, 0);
  --bar-edge: #ececf0;
  --nav-hover: rgba(0, 0, 0, 0.05);
  --nav-current: rgba(0, 0, 0, 0.07);

  /* Hero: plain white with the faint whale and a white card (founder, 2026-11-11) */
  --hero-from: #ffffff;
  --hero-to: #ffffff;
  --hero-edge: #ececf0;
  --hero-shadow: #000000; /* big faint whale, neutral grey */
  --hero-shadow-opacity: 0.035;
  --hero-mark: var(--logo);
  --hero-word-1: var(--logo); /* "Arcvale" */
  --hero-word-2: #111114; /* "Apps" */
  --hero-tagline: #5f5f66;
  --card-glass: rgba(255, 255, 255, 0.7);
  --card-glass-fallback: rgba(255, 255, 255, 0.8);
  --card-edge: #ececf0;
  --card-shadow: rgba(20, 18, 40, 0.08);
  --card-shadow-near: rgba(20, 18, 40, 0.05);

  /* Components */
  --callout-from: #f7f7f9;
  --callout-to: #f7f7f9;
  --callout-text: var(--ink);
  --callout-icon: var(--brand);
  --callout-edge: #ececf0;
  --status-ring: rgba(0, 0, 0, 0.12);
  --icon-shadow: rgba(20, 18, 40, 0.18);
  --skip-bg: var(--ink);
  --skip-text: #ffffff;

  /* Non-colour tokens */
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --measure: 68ch;
  --radius-xl: 32px;
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --glass-blur: 18px;
}

/* ================= Colour tokens: dark ================= */


/* ================= Base ================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--skip-bg);
  color: var(--skip-text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================= Header bar (legal pages) ================= */
.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(115deg, transparent 40%, var(--bar-sheen) 58%, transparent 74%),
    linear-gradient(135deg, var(--bar-from) 0%, var(--bar-to) 100%);
  border-bottom: 1px solid var(--bar-edge);
}

.sitebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.sitebar-end {
  justify-content: flex-end;
}

.wordmark-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--hero-word-2);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-link svg {
  width: 46px;
  height: auto;
  color: var(--hero-mark);
}
.wordmark-link .word-1 {
  color: var(--hero-word-1);
}
.wordmark-link:hover {
  color: var(--hero-word-2);
}
.wordmark-link:hover .word-2 {
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-underline-offset: 4px;
}

.sitenav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sitenav a {
  display: block;
  padding: 8px 12px;
  white-space: nowrap;
  overflow-wrap: normal;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.sitenav a:hover {
  color: var(--ink);
  background: var(--nav-hover);
}
.sitenav a[aria-current='page'] {
  color: var(--ink);
  background: var(--nav-current);
}

/* ================= Home: hero (echoes header GH3) ================= */
.glass.hero {
  overflow: hidden;
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  border-bottom: 1px solid var(--hero-edge);
}

.hero-shadow {
  position: absolute;
  z-index: -1;
  width: max(1040px, 92vw);
  max-width: none;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  color: var(--hero-shadow);
  opacity: var(--hero-shadow-opacity);
  pointer-events: none;
}

.hero-body {
  display: flex;
  justify-content: center;
  padding-block: clamp(40px, 8vh, 88px) clamp(72px, 13vh, 132px);
}

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 760px);
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  text-align: center;
  background: var(--card-glass-fallback);
  border: 1.5px solid var(--card-edge);
  border-radius: var(--radius-xl);
  box-shadow:
    0 2px 6px var(--card-shadow-near),
    0 30px 70px -24px var(--card-shadow);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hero-card {
    background: var(--card-glass);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  }
}

.hero-mark {
  width: clamp(96px, 11vw, 136px);
  height: auto;
  margin-bottom: clamp(20px, 3vw, 32px);
  color: var(--hero-mark);
}

.hero-title {
  margin: 0;
  color: var(--hero-word-2);
  font-size: clamp(2.625rem, 8.4vw, 5.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}
.hero-title .word-1 {
  color: var(--hero-word-1);
}

.hero-tagline {
  margin: clamp(14px, 1.8vw, 22px) 0 0;
  color: var(--hero-tagline);
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  line-height: 1.4;
  letter-spacing: -0.005em;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-card {
    animation: hero-in 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  @keyframes hero-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ================= Home: studio intro + Quarry ================= */
.studio {
  padding: clamp(56px, 8vw, 96px) 0 0;
}

.lead {
  max-width: 34ch;
  margin: 0 0 clamp(28px, 4vw, 44px);
  color: var(--ink);
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 72px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 56px);
}

.app-icon {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  margin-bottom: 28px;
  box-shadow: 0 12px 32px -12px var(--icon-shadow);
}

.app h2 {
  margin: 0;
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
}

.app-pitch {
  margin: 14px 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
  max-width: 36ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 8px 16px 8px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}
.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 0 3px var(--status-ring);
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
}
.features li {
  margin: 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.features li:first-child {
  border-top: 0;
  padding-top: 4px;
}
.features h3 {
  margin: 0 0 4px;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.features p {
  margin: 0;
  color: var(--muted);
}
.pro {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: 2px;
}

.privacy-line {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 8px 0 0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--callout-from), var(--callout-to));
  box-shadow: inset 0 0 0 1px var(--callout-edge);
  color: var(--callout-text);
  font-weight: 600;
  line-height: 1.5;
}
.privacy-line svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--callout-icon);
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.app-links a {
  font-weight: 600;
}

/* ================= Home: contact ================= */
.contact {
  padding: clamp(56px, 8vw, 96px) 0;
}
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(16px, 5vw, 72px);
  align-items: baseline;
  /* line the columns up with the text inside the Quarry panel above */
  padding-inline: calc(24px + clamp(24px, 5vw, 56px) + 1px);
}
.contact h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
}
.contact p {
  margin: 0 0 8px;
  color: var(--muted);
}
.email {
  display: inline-block;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* ================= Footer ================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}
.site-footer p {
  margin: 0;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--ink);
}

/* ================= Legal pages ================= */
.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, var(--measure));
  justify-content: center;
  gap: 72px;
  padding-top: 56px;
  padding-bottom: 72px;
}

.legal {
  min-width: 0;
}

.legal h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 2.875rem);
  letter-spacing: -0.03em;
}

.legal .updated {
  margin: 10px 0 32px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal > p,
.legal section > p {
  margin: 0 0 1.1em;
}

.legal ul {
  padding-left: 1.25em;
  margin: 0 0 1.1em;
}
.legal li {
  margin: 0.5em 0;
}
.legal li::marker {
  color: var(--num);
}
.legal li ul {
  margin: 0.5em 0;
}

.summary {
  position: relative;
  overflow: hidden;
  margin: 32px 0 40px;
  padding: 24px 28px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.summary::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent-gradient);
}
.legal .summary p {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.legal .summary ul {
  margin: 0;
}

.legal section {
  padding-top: 8px;
}

.legal h2 {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.3125rem, 2.4vw, 1.5rem);
  letter-spacing: -0.02em;
  scroll-margin-top: 24px;
}
.legal h2 .num {
  flex: none;
  min-width: 1.6em;
  color: var(--num);
  font-variant-numeric: tabular-nums;
}

.to-top {
  margin: 20px 0 0;
  font-size: 0.875rem;
}
.legal .to-top a {
  color: var(--muted);
}
.legal .to-top a:hover {
  color: var(--ink);
}

/* Table of contents */
.toc-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc li {
  margin: 0;
}
.toc a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.9063rem;
  line-height: 1.45;
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
  border-left-color: var(--brand);
}

.toc-side {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 4px 4px 4px 0;
}

.toc-mobile {
  display: none;
  margin: 0 0 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.toc-mobile summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.toc-mobile summary::-webkit-details-marker {
  display: none;
}
.toc-mobile summary::after {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}
.toc-mobile[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.toc-mobile ol {
  padding: 0 14px 14px;
}

@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: minmax(0, var(--measure));
    padding-top: 40px;
  }
  .toc-side {
    display: none;
  }
  .toc-mobile {
    display: block;
  }
}

/* ================= Small screens ================= */
@media (max-width: 820px) {
  .app,
  .contact-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-inner {
    padding-inline: 24px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }
  .container,
  .contact-inner {
    padding-inline: 16px;
  }
  .sitebar {
    min-height: 60px;
  }
  .wordmark-link svg {
    width: 38px;
  }
  .sitebar {
    gap: 8px;
  }
  .wordmark-link {
    gap: 8px;
    font-size: 1rem;
  }
  .sitenav ul {
    gap: 0;
  }
  .sitenav a {
    padding: 8px 9px;
    font-size: 0.875rem;
  }
  .hero-body {
    padding-block: 28px 72px;
  }
  .hero-card {
    border-radius: 26px;
  }
  .hero-shadow {
    width: 1000px;
    top: 52%;
    transform: translate(-54%, -50%);
  }
  .app {
    border-radius: 22px;
    padding: 24px 20px;
  }
  .app-icon {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    margin-bottom: 22px;
  }
  .summary {
    padding: 20px 20px 16px 24px;
  }
  .legal h2 {
    margin-top: 40px;
  }
}

/* Stacked app cards on the home page. */
.app + .app {
  margin-top: clamp(20px, 3vw, 32px);
}
