/* Layout: a studio catalogue. A short hero, then one chapter per product, each led by
   real screenshots in device frames, then the platform, principles and contact.
   Fonts are self-hosted (CSP allows 'self' only); OFL licences sit next to the files. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* Brand: ink from the logo tile; signal blue from the logo's note, the apps' accent (#007AFF in the
     Percussiva design kit). Text uses a darker shade of that blue, #0066cc, readable at 5.2:1. */
  --ink: #0e1525;
  --signal: #007aff;
  /* Neutrals lean slightly blue, toward the ink. */
  --bg: #f7f8fb;
  --bg-deep: #eef1f6;
  --surface: #ffffff;
  --text: #0e1525;
  --muted: #566074;
  --line: #e1e5ee;
  --accent: #0066cc;
  --accent-soft: #e6f0fb;
  /* Product accents, taken from each app's own theme. */
  --riffscope: #2563eb;
  --percussiva: #b45309;
  --gotrips: #15803d;
  --frame: #10141f;
  --shadow: 0 1px 2px rgb(14 21 37 / 0.05), 0 18px 40px -12px rgb(14 21 37 / 0.18);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 2.875rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.8vw, 4.25rem);

  --max: 1180px;
  --gutter: 24px;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --bg-deep: #0f1528;
    --surface: #141b30;
    --text: #e9edf6;
    --muted: #9aa5bd;
    --line: #232c45;
    --accent: #0a84ff;
    --accent-soft: #0c1d36;
    --riffscope: #6b9bff;
    --percussiva: #f0a24a;
    --gotrips: #4ade80;
    --frame: #05070d;
    --shadow: 0 18px 40px -16px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-deep: #0f1528;
  --surface: #141b30;
  --text: #e9edf6;
  --muted: #9aa5bd;
  --line: #232c45;
  --accent: #0a84ff;
  --accent-soft: #0c1d36;
  --riffscope: #6b9bff;
  --percussiva: #f0a24a;
  --gotrips: #4ade80;
  --frame: #05070d;
  --shadow: 0 18px 40px -16px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { width: 92px; height: 21px; color: var(--text); }
/* Percussiva has no logo yet: its header shows the name in the display face. */
.brand-name { font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9375rem;
}
.button:hover { text-decoration: none; }
.button.primary { background: var(--text); color: var(--bg); }
.button.primary:hover { opacity: 0.88; }
.button.secondary { border-color: var(--line); color: var(--text); background: var(--surface); }
.button.secondary:hover { border-color: var(--muted); }

/* Hero */
.hero { padding-block: 88px 72px; overflow: hidden; }
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 56px;
}
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { max-width: 34em; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.os-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.os-list li {
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero-art { position: relative; min-width: 0; padding-bottom: 28px; }
.hero-art .device-mac { width: 92%; }
.hero-art .device-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 27%;
}
/* A hero with one phone and no computer (gotrips.app) */
.hero-art.phone-only { display: grid; justify-items: center; }
.hero-art.phone-only .device-phone { position: static; width: min(300px, 62%); }

/* Sections */
section { padding-block: 96px; }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: 48px; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.band { background: var(--bg-deep); border-block: 1px solid var(--line); }

/* Product family header */
.family {
  display: flex;
  align-items: center;
  gap: 12px;
}
.family-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--family, var(--accent)); }

/* Product chapter */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 56px;
}
.product + .product { margin-top: 112px; }
.product.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.product.flip .product-copy { order: 2; }
.product-copy { display: grid; gap: 18px; min-width: 0; }
.product-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.product-name h3 { font-size: var(--step-3); }
.product-icon { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.product .tagline { font-size: var(--step-1); line-height: 1.45; color: var(--text); }
.product .summary { color: var(--muted); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--product, var(--accent)); }
.platforms { font-size: var(--step--1); color: var(--muted); }
.platforms strong { color: var(--text); font-weight: 600; }

.features {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.features li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.features li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--product, var(--accent));
}
.features strong { font-weight: 600; }
.features span { color: var(--muted); }

.riffscope { --product: var(--riffscope); }
.percussiva { --product: var(--percussiva); --family: var(--percussiva); }
.gotrips { --product: var(--gotrips); --family: var(--gotrips); }

.product-art { position: relative; min-width: 0; }
.art-watch { display: grid; grid-template-columns: 1fr 0.72fr; gap: 28px; align-items: end; max-width: 440px; margin-inline: auto; }

/* More screens of the featured product, matched in height */
.gallery {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 32px;
  align-items: end;
  max-width: 820px;
  margin: 80px auto 0;
}
.gallery figcaption { text-align: center; }
.gallery + .product { margin-top: 112px; }
.fineprint { margin-top: 48px; font-size: 0.8125rem; color: var(--muted); }

/* Device frames (pure CSS, around real screenshots) */
.device-mac {
  border-radius: 12px;
  background: var(--frame);
  padding: 26px 0 0;
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.device-mac::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 12px;
  width: 44px;
  height: 9px;
  background:
    radial-gradient(circle at 4.5px 4.5px, #ff5f57 4.5px, transparent 5px),
    radial-gradient(circle at 19.5px 4.5px, #febc2e 4.5px, transparent 5px),
    radial-gradient(circle at 34.5px 4.5px, #28c840 4.5px, transparent 5px);
}
.device-mac img { width: 100%; border-radius: 0 0 12px 12px; }

.device-phone {
  border-radius: 15% / 7%;
  background: var(--frame);
  padding: 3.2%;
  box-shadow: var(--shadow);
}
.device-phone img { width: 100%; border-radius: 12% / 5.6%; }

.device-tablet {
  border-radius: 6% / 4.6%;
  background: var(--frame);
  padding: 2.6%;
  box-shadow: var(--shadow);
}
.device-tablet img { width: 100%; border-radius: 3.6% / 2.7%; }

.device-watch {
  border-radius: 30%;
  background: var(--frame);
  padding: 8%;
  box-shadow: var(--shadow);
}
.device-watch img { width: 100%; border-radius: 24%; }

figure { margin: 0; }
figcaption { margin-top: 12px; font-size: var(--step--1); color: var(--muted); }

/* Platform */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.platform-grid > div { display: grid; gap: 8px; align-content: start; padding: 28px; background: var(--surface); min-width: 0; }
.platform-grid h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
.platform-grid p { color: var(--muted); font-size: 0.975rem; }

/* Principles */
.principles { display: grid; gap: 40px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.principles > div { display: grid; gap: 8px; align-content: start; border-top: 2px solid var(--text); padding-top: 18px; }
.principles h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
.principles p { color: var(--muted); }

/* Contact */
.contact-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 48px;
  border-radius: 24px;
  background: var(--ink);
  color: #e9edf6;
}
.contact-box > div { display: grid; gap: 8px; min-width: 0; }
.contact-box h2 { font-size: var(--step-3); color: #ffffff; }
.contact-box p { color: #aeb8cc; max-width: 36em; }
.contact-box .button { background: var(--signal); color: var(--ink); }
.contact-box .button:hover { opacity: 0.9; }
.contact-links { display: grid; gap: 10px; justify-items: start; }
.contact-links .alt { color: #aeb8cc; font-size: var(--step--1); }
.contact-links .alt a { color: #ffffff; }

/* Prose pages (privacy, support) */
.prose { max-width: 720px; padding-block: 64px 96px; }
.prose h1 { font-size: var(--step-3); margin: 0 0 8px; }
.prose .updated { color: var(--muted); margin: 0 0 40px; font-size: 0.9375rem; }
.prose h2 { font-size: var(--step-2); margin: 40px 0 10px; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }

/* Footer */
.site-footer { padding-block: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* 404 */
.not-found { padding-block: 120px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.not-found h1 { font-size: 5rem; }
.not-found p { color: var(--muted); margin-bottom: 20px; }

@media (max-width: 960px) {
  .hero .container, .product, .product.flip { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .product.flip .product-copy { order: 0; }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; }
  .nav { gap: 16px; }
  .nav .hide-sm { display: none; }
  .hero { padding-block: 56px 48px; }
  section { padding-block: 64px; }
  .product + .product, .gallery + .product { margin-top: 72px; }
  .platform-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-box { padding: 28px; }
  .art-watch { gap: 18px; }
  .gallery { grid-template-columns: 1.45fr 1fr; gap: 20px; margin-top: 56px; }
  .gallery figure:last-child { display: none; }
}
