/* bynameapp.com. Palette is the app's own design tokens; dark mode follows the device. */

@font-face {
  font-family: "Patua One";
  src: url("/fonts/patua-one.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --band: #F2ECE4;
  --ink: #241D19;
  --muted: #6B5D55;
  --rule: #E5DCD1;
  --primary: #C74D28;
  --primary-ink: #FFFFFF;
  --rose: #C9436A;
  --teal: #2E6F6B;
  --gold: #C2831C;
  --frame: #241D19;
  --shadow: 0 18px 40px -18px rgba(58, 42, 32, 0.35);
  --gutter: 16px;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1512;
    --surface: #241D19;
    --band: #211A16;
    --ink: #FAF7F2;
    --muted: #AFA096;
    --rule: #332A26;
    --primary: #F0805F;
    --primary-ink: #1A1512;
    --rose: #DC6C8C;
    --teal: #6FB3AD;
    --gold: #F0BC63;
    --frame: #000000;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  }
}

* { 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(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Patua One", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 0.15em; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
img, video { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 10px; z-index: 10;
}
.skip:focus { top: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand img { height: 36px; width: auto; }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav a {
  text-decoration: none; padding: 10px 12px; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center; font-weight: 600; font-size: 0.95rem;
}
.site-header nav a.nav-cta { background: var(--primary); color: var(--primary-ink); }
.site-header nav a.nav-cta:hover { color: var(--primary-ink); filter: brightness(1.08); }
@media (max-width: 640px) {
  .site-header nav a:not(.nav-cta) { display: none; }
  .brand img { height: 30px; }
}

/* Hero */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } .hero { padding: 72px 0 88px; } }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700;
  color: var(--primary); margin-bottom: 12px;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.small { font-size: 0.95rem; color: var(--muted); margin-top: 12px; }

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 24px; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge-apple img { height: 48px; width: auto; }
/* Google's badge carries its own transparent margin, so it is drawn larger to match. */
.badge-play img { height: 70px; width: auto; margin: -11px -10px; }

.hero-media, .pair-media { margin: 0; }
.hero-media figcaption, .pair-media figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 14px; text-align: center; max-width: 30em; margin-left: auto; margin-right: auto; }
.phone {
  width: min(300px, 78vw); margin: 0 auto; padding: 10px; border-radius: 48px;
  background: var(--frame); box-shadow: var(--shadow);
}
.phone video { width: 100%; aspect-ratio: 660 / 1434; object-fit: cover; border-radius: 38px; background: #FAF7F2; }

/* Bands and sections */
section { padding: 64px 0; }
.band { background: var(--band); }
.section-lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; }

.places { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 28px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .places { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }
.place img {
  width: 100%; max-width: 260px; margin: 0 auto 18px; border-radius: var(--radius);
  border: 1px solid var(--rule); box-shadow: var(--shadow); background: var(--surface);
}
.place h3 { color: var(--primary); }
.place p { color: var(--muted); }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 0.9fr 1.1fr; } }
.pair-media video { width: min(360px, 100%); margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 540 / 960; }

.promises { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.promises li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.promises li:nth-child(1) h3 { color: var(--teal); }
.promises li:nth-child(2) h3 { color: var(--rose); }
.promises li:nth-child(3) h3 { color: var(--gold); }
.promises p { margin: 0; color: var(--muted); }

.columns { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 720px) { .columns { grid-template-columns: 1fr 1fr; } }
.column { border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.column-unlock { border-color: var(--primary); }
.column ul { margin: 0; padding: 0; list-style: none; }
.column li { padding: 6px 0 6px 26px; position: relative; break-inside: avoid; }
.column li::before {
  content: ""; position: absolute; left: 0; top: 0.75em; width: 12px; height: 12px;
  border-radius: 3px; background: var(--teal); transform: rotate(-6deg);
}
.column-unlock li::before { background: var(--primary); }
.unlock-name { display: block; font-weight: 600; }
.unlock-line { display: block; font-size: 0.92rem; color: var(--muted); }

details { border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 1px solid var(--rule); }
summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 700; font-size: 1.08rem; min-height: 44px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.6rem; color: var(--primary); }
details[open] summary::after { content: "\2212"; }
details p { color: var(--muted); padding-bottom: 8px; }

.closing { text-align: center; padding: 80px 0; }
.closing .badges { justify-content: center; }

/* Legal and plain pages */
.prose { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.updated { color: var(--muted); font-size: 0.95rem; margin-bottom: 2em; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; font-size: 0.95rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 12px 0 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.fineprint { font-size: 0.85rem; }

/* Larger view: screenshots and videos open over the page (assets/site.js). */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: inherit; cursor: zoom-in; }
.zoom:focus-visible, .zoom-video:focus-visible, .lightbox-close:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.zoomable { position: relative; }
video[data-loop]:not([controls]) { cursor: zoom-in; }
.zoom-video { position: absolute; right: 12px; bottom: 12px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(36, 29, 25, 0.78); color: #FAF7F2; font: inherit; font-size: 0.95rem; font-weight: 600; cursor: zoom-in; }
.zoom-frame { width: min(360px, 100%); margin: 0 auto; }
.zoom-frame video { width: 100%; }
dialog.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
dialog.lightbox::backdrop { background: rgba(20, 15, 12, 0.86); }
.lightbox-stage { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; height: 100%; padding: 68px 16px 16px; }
.lightbox-stage img, .lightbox-stage video { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 16px; object-fit: contain; cursor: auto; }
.lightbox-close { position: fixed; top: 12px; right: 16px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: #FAF7F2; color: #241D19; font: inherit; font-weight: 600; cursor: pointer; }
