/* Studio landing page and /privacy. Dark only (ROADMAP-019).
   Colours, radii and spacing are the values in DESIGN.md. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg-canvas: #0b0b0a;
  --bg-card: #131316;
  --bg-elevated: #1a1a1f;
  --grid-dot: #2c2b26;
  --text-name: #ece9e2;
  --text-type: #7d7a73; /* On bg-canvas only: 4.33:1 on bg-card is under AA. */
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #8a8a92;
  --border: #1a1a1f;
  --border-accent: #2a2a31;
  --border-bright: #3f3f46;
  --image-edge: rgba(255, 255, 255, 0.06);
  --accent: #ca8a04;
  --accent-bright: #eab308;
  --accent-ink: #18120a;

  --rounded-md: 10px;
  --rounded-lg: 14px;
  --rounded-xl: 20px;
  --rounded-pill: 999px;

  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;

  --page-width: 1200px;
  --page-gutter: var(--space-2xl);
  --header-height: 64px;

  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-padding-top: calc(var(--header-height) + var(--space-lg));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-name);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
  font-weight: 400;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-bright);
}

a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

code {
  font-family: var(--font-mono);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-canvas);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  max-width: calc(var(--page-width) + 2 * var(--page-gutter));
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-name);
  font-size: 15px;
  font-weight: 500;
}

.brand:hover {
  color: var(--text-name);
}

.brand img {
  display: block;
  width: 28px;
  height: 28px;
}

.site-nav {
  display: flex;
  gap: var(--space-xl);
  margin-left: auto;
  font-size: 14px;
}

.site-nav a {
  color: var(--text-secondary);
}

.site-nav a:hover {
  color: var(--text-primary);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--rounded-pill);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.button-small {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: var(--accent-bright);
  color: var(--accent-ink);
}

.button-grey {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}

.button-grey:hover {
  background: var(--border-accent);
  color: var(--text-primary);
}

/* Page */

.page {
  max-width: calc(var(--page-width) + 2 * var(--page-gutter));
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* Hero */

.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero h1 {
  max-width: 24em;
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 38em;
  margin-top: var(--space-lg);
  color: var(--text-secondary);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.hero-notes {
  max-width: 60em;
  margin-top: var(--space-lg);
  color: var(--text-type);
  font-size: 14px;
}

.hero-notes p + p {
  margin-top: 4px;
}

/* Images. A placeholder holds the place of an image from the owner's campaign
   Project, at the image's final size (ROADMAP-019). */

.placeholder {
  background: var(--bg-elevated);
  border-radius: var(--rounded-md);
  box-shadow: inset 0 0 0 1px var(--image-edge);
}

.showcase {
  padding: var(--space-3xl);
  background-color: var(--bg-canvas);
  background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.5px);
  background-position: center;
  background-size: 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--rounded-xl);
}

.showcase-image {
  aspect-ratio: 16 / 10;
}

/* Feature rows */

.features {
  display: grid;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-3xl);
  padding: var(--space-3xl);
  background: var(--bg-card);
  border-radius: var(--rounded-xl);
}

.feature:nth-child(even) .feature-image {
  order: -1;
}

.feature-text {
  font-size: 22px;
  line-height: 1.36;
  letter-spacing: -0.01em;
}

.feature-text h2,
.feature-text p {
  display: inline;
  font-size: inherit;
}

.feature-text p {
  color: var(--text-muted);
}

.feature-image {
  aspect-ratio: 4 / 3;
}

/* Download */

.download {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
  padding: var(--space-3xl);
  background: var(--bg-card);
  border-radius: var(--rounded-xl);
}

.download-icon {
  display: block;
  width: 88px;
  height: 88px;
}

.download h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.download-details {
  margin-top: var(--space-sm);
  color: var(--text-secondary);
  font-size: 15px;
}

.download-check {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 12px;
}

/* Footer */

.site-footer {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-top: 1px solid var(--border);
  color: var(--text-type);
  font-size: 13px;
}

.site-footer p {
  max-width: 76em;
}

.site-footer p + p {
  margin-top: var(--space-sm);
}

/* Privacy */

.prose {
  max-width: 40em;
  padding: var(--space-3xl) 0;
}

.prose h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin-top: var(--space-2xl);
  font-size: 16px;
  font-weight: 500;
}

.prose p {
  margin-top: var(--space-sm);
  color: var(--text-secondary);
}

.prose code {
  font-size: 0.875em;
}

.prose .updated {
  margin-top: var(--space-2xl);
  color: var(--text-type);
  font-size: 14px;
}

/* Tablet: rows and the Download block stack. */

@media (max-width: 860px) {
  :root {
    --page-gutter: var(--space-xl);
  }

  .feature {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: var(--space-2xl);
  }

  .feature:nth-child(even) .feature-image {
    order: 0;
  }

  .download {
    grid-template-columns: auto 1fr;
    padding: var(--space-2xl);
  }

  .download .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Phone: Download goes below Open Studio (owner, 2026-11-05). */

@media (max-width: 520px) {
  :root {
    --page-gutter: var(--space-lg);
    --header-height: 56px;
  }

  .site-header-inner {
    gap: var(--space-md);
  }

  .site-nav {
    gap: var(--space-md);
    font-size: 13px;
  }

  .hero {
    padding-top: var(--space-xl);
  }

  .hero h1,
  .prose h1 {
    font-size: 27px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .showcase {
    padding: var(--space-lg);
    border-radius: var(--rounded-lg);
  }

  .feature,
  .download {
    padding: var(--space-xl);
    border-radius: var(--rounded-lg);
  }

  .feature-text {
    font-size: 19px;
  }

  .download {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .download-icon {
    width: 64px;
    height: 64px;
  }

  .download .button {
    justify-self: stretch;
  }
}

/* Narrow phone: the header has room for the name and the pill only. */

@media (max-width: 380px) {
  .site-nav {
    display: none;
  }

  .site-header-inner .button {
    margin-left: auto;
  }
}
