/* Highnote Labs — site styles. System fonts, light and dark follow the device. */

:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.08);

  /* Highnote red (icon) and Highframe gold (icon). -ink variants pass AA as text. */
  --highnote: #f0524c;
  --highnote-ink: #c8302b;
  --highframe: #e9cd67;
  --highframe-ink: #8a6a10;
  --accent: var(--highnote);
  --accent-ink: var(--highnote-ink);
  --on-accent: #ffffff;

  --wide: 1120px;
  --readable: 720px;
  --gutter: 16px;
  --radius: 22px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #111113;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: rgba(255, 255, 255, 0.14);
    --nav-bg: rgba(22, 22, 23, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.4);
    --highnote-ink: #ff6b65;
    --highframe-ink: #f0d27a;
  }
}

.theme-highframe {
  --accent: var(--highframe);
  --accent-ink: var(--highframe-ink);
  --on-accent: #1d1d1f;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; }
h1 { font-size: clamp(40px, 7vw, 76px); letter-spacing: -0.015em; }
h2 { font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -0.01em; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 600; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.readable { max-width: calc(var(--readable) + var(--gutter) * 2); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.brand-mark svg { width: 13px; height: 14px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nav ul a { color: var(--text); opacity: 0.8; }
.nav ul a:hover, .nav ul a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav ul a[aria-current="page"] { font-weight: 600; }
@media (max-width: 420px) {
  .brand span { display: none; }
  .nav ul { gap: 18px; }
}

/* Sections */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.alt { background: var(--bg-2); }
.center { text-align: center; }
.eyebrow { font-size: 19px; font-weight: 600; color: var(--accent-ink); margin-bottom: 10px; }
.lead { font-size: clamp(21px, 2.6vw, 28px); line-height: 1.3; color: var(--text); font-weight: 600; }
.sub { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.45; color: var(--text-2); }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head .sub { margin-top: 16px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: 980px;
  font-size: 17px; font-weight: 500; line-height: 1.2;
  background: var(--accent); color: var(--on-accent); border: 1px solid transparent;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.secondary { background: transparent; color: var(--accent-ink); border-color: currentColor; }
.btn.store { background: var(--text); color: var(--bg); }
.btn.store svg { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { cursor: default; filter: none; opacity: 0.85; }
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 54px; width: auto; }
.pill {
  display: inline-block; padding: 4px 12px; border-radius: 980px; font-size: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink);
}

/* Home hero */
.hero { padding: 104px 0 72px; text-align: center; }
.hero h1 { max-width: 900px; margin: 0 auto; }
.hero .sub { max-width: 680px; margin: 24px auto 0; }

/* Product tiles on the home page */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 820px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  position: relative; overflow: hidden;
  background: var(--bg-2); border-radius: 30px;
  padding: 48px 32px 0; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  min-height: 640px;
}
.tile .app-icon { width: 96px; height: 96px; margin-bottom: 20px; }
.tile h2 { font-size: clamp(32px, 4vw, 44px); }
.tile .lead { margin-top: 8px; font-size: 21px; }
.tile .sub { margin-top: 10px; font-size: 16px; max-width: 380px; }
.tile .actions { margin-top: 22px; }
.tile .shot { margin-top: auto; padding-top: 36px; width: 62%; max-width: 280px; }
.tile .shot img { margin-bottom: -18%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.18)); }
.tile.highframe { --accent: var(--highframe); --accent-ink: var(--highframe-ink); --on-accent: #1d1d1f; }
.tile.highframe .poster-strip { margin-top: auto; padding: 40px 0 44px; width: 100%; }

/* Highframe "screen" illustration: pure CSS, no third-party artwork */
.screen-art {
  width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 16 / 10;
  border-radius: 18px; background: #0b0b0c; border: 8px solid #1f1f22;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  display: grid; grid-template-rows: 1fr auto; text-align: left;
}
.screen-art .hero-band {
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(233, 205, 103, 0.55), transparent 60%),
    radial-gradient(90% 80% at 10% 100%, rgba(120, 70, 30, 0.6), transparent 70%),
    linear-gradient(180deg, #2a2116, #0b0b0c);
  padding: 18px 18px 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
}
.screen-art .bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.85); width: 44%; }
.screen-art .bar.thin { height: 5px; width: 62%; background: rgba(255, 255, 255, 0.45); }
.screen-art .play { margin-top: 6px; width: 64px; height: 18px; border-radius: 9px; background: var(--highframe); }
.screen-art .row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 10px 14px 14px; }
.screen-art .row i { aspect-ratio: 2 / 3; border-radius: 5px; background: linear-gradient(160deg, #3a3a40, #1b1b1f); }
.screen-art .row i:nth-child(2) { background: linear-gradient(160deg, #5a3b24, #241a12); }
.screen-art .row i:nth-child(4) { background: linear-gradient(160deg, #23384f, #12161d); }

/* Principles */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); }
.alt .card { box-shadow: none; }
.card .glyph { width: 40px; height: 40px; color: var(--accent); margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 16px; }

/* Product page hero */
.product-hero { padding: 88px 0 40px; text-align: center; }
.product-hero .app-icon { width: 128px; height: 128px; margin: 0 auto 24px; }
.product-hero .lead { margin-top: 14px; }
.product-hero .sub { max-width: 680px; margin: 16px auto 0; }
.product-hero .note { margin-top: 14px; font-size: 14px; color: var(--text-2); }

/* Screenshot gallery (scrolls inside itself, never the page) */
.gallery {
  display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 24px max(var(--gutter), calc((100vw - var(--wide)) / 2)) 40px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 auto; width: 250px; margin: 0; scroll-snap-align: center; text-align: center; }
.gallery img { width: 100%; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.16)); }
.gallery figcaption { margin-top: 18px; font-size: 17px; font-weight: 600; line-height: 1.3; }
/* Wider devices: add "device" to a gallery in src/data/galleries.json */
.gallery.ipad figure { width: 420px; }
.gallery.mac figure, .gallery.tv figure { width: 640px; }
.gallery.watch figure { width: 190px; }
.gallery.mac img, .gallery.tv img { filter: none; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 600px) {
  .gallery figure { width: 210px; }
  .gallery { gap: 20px; }
  .gallery.ipad figure { width: 300px; }
  .gallery.mac figure, .gallery.tv figure { width: 320px; }
  .gallery.watch figure { width: 160px; }
}
.gallery-hint { text-align: center; color: var(--text-2); font-size: 14px; margin-top: -16px; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Every-screen bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.bento .card { padding: 28px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.bento .card p { margin-bottom: 18px; }
.bento .card img { margin-top: auto; }
.bento .span-6 { grid-column: span 6; }
.bento .span-4 { grid-column: span 4; }
.bento .span-3 { grid-column: span 3; }
.bento .span-2 { grid-column: span 2; }
.bento .window { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.bento .ipad img { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.bento .watch img { width: 100%; max-width: 190px; margin-left: auto; margin-right: auto; }
@media (max-width: 820px) {
  .bento { grid-template-columns: 1fr; }
  .bento .span-6, .bento .span-4, .bento .span-3, .bento .span-2 { grid-column: auto; }
}

/* Server and platform lists */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li { padding: 10px 18px; border-radius: 980px; background: var(--card); border: 1px solid var(--line); font-weight: 500; }

/* Privacy callout */
.callout { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--card); border-radius: 30px; padding: 40px; box-shadow: var(--shadow); }
.callout .glyph { width: 56px; height: 56px; color: var(--accent); }
.callout h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 10px; }
.callout p { color: var(--text-2); }
.callout p + p { margin-top: 12px; }
@media (max-width: 600px) { .callout { grid-template-columns: 1fr; padding: 28px; } }

/* Long-form pages: privacy, support */
.doc { padding: 72px 0 96px; }
.doc header { margin-bottom: 40px; }
.doc h1 { font-size: clamp(36px, 5.4vw, 52px); }
.doc .meta { color: var(--text-2); margin-top: 12px; }
.doc h2 { font-size: 28px; margin: 48px 0 14px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; margin: 12px 0; }
.doc li + li { margin-top: 8px; }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--bg-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.doc .summary { background: var(--bg-2); border-radius: var(--radius); padding: 24px 28px; margin-top: 8px; }
.doc .summary ul { margin: 0; }
.doc .crumbs { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }
.doc .crumbs a { color: var(--text-2); }
.doc .app-line { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.doc .app-line img { width: 56px; height: 56px; }
.doc .contact-box { margin-top: 18px; padding: 24px 28px; border-radius: var(--radius); background: var(--bg-2); }
.doc .contact-box p { margin: 0; }
.link-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.link-list a { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-2); color: var(--text); }
.link-list a:hover { text-decoration: none; background: color-mix(in srgb, var(--bg-2) 85%, var(--text)); }
.link-list img { width: 48px; height: 48px; }
.link-list strong { display: block; }
.link-list span { color: var(--text-2); font-size: 15px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; color: var(--text-2); background: var(--bg-2); }
footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
footer h4 { margin: 0 0 10px; font-size: 14px; color: var(--text); font-weight: 600; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer a { color: var(--text-2); }
footer .legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Apple-style app icon mask for the rendered icon art */
.app-icon { border-radius: 22.5%; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
