/* Brightgrain marketing pages. Generated pages link this file; the app-link landing pages
   (/join/, /threadcircle/join/, /hypothetically/challenge/, /hypothetically/q/) keep /style.css. */
:root {
  --ink: #17202a;
  --text: #3d4954;
  --muted: #5d6a75;
  --paper: #fbfcfa;
  --surface: #ffffff;
  --tint: #eef5f1;
  --line: #dfe7e2;
  --accent: #1d7163;
  --accent-strong: #145449;
  --accent-soft: #e8f3ef;
  --focus: #1d7163;
  --shadow: 0 1px 2px rgba(23,32,42,.05), 0 12px 32px rgba(23,32,42,.07);
  --radius: 18px;
  --app: var(--accent-strong);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef3f0; --text: #c9d3ce; --muted: #a3b0aa; --paper: #0f1513; --surface: #161f1c; --tint: #14201c;
    --line: #2a3733; --accent: #7fd0bf; --accent-strong: #8fdccb; --accent-soft: #1d2f2a; --focus: #8fdccb;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
    color-scheme: dark;
  }
  .eyebrow { color: color-mix(in srgb, var(--app) 40%, #fff); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; color: var(--text); background: var(--paper);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-strong); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .7rem 1rem; border-radius: 8px; color: #fff; background: #145449; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(12px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; color: var(--ink); font-weight: 750; font-size: 1.08rem; letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; flex-wrap: wrap; gap: .1rem .3rem; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .7rem; border-radius: 8px; color: var(--muted); font-size: .95rem; font-weight: 650; text-decoration: none; }
.nav-links a:hover { color: var(--ink); background: var(--tint); }
.nav-links a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tint { background: var(--tint); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 2rem; }
.eyebrow { margin: 0 0 .6rem; color: var(--app); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.25rem); line-height: 1.55; max-width: 680px; }
.intro { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.intro h1 { max-width: 820px; }
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); background: var(--tint); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .6rem 1.15rem; border-radius: 10px; color: #fff; background: #145449; font-weight: 700; text-decoration: none; }
.button:hover { background: #1d7163; }
.button-quiet { color: var(--accent-strong); background: transparent; border: 1.5px solid currentColor; }
.button-quiet:hover { background: var(--accent-soft); }

/* App catalog cards */
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.app-card { display: flex; flex-direction: column; padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--line); border-top: 4px solid var(--app); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.app-card-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .9rem; }
.app-card :is(h2, h3) { margin: 0; font-size: 1.35rem; }
.app-card .kicker { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }
.app-card .benefit { flex: 1; color: var(--text); }
.app-card .platforms { margin-bottom: .9rem; color: var(--muted); font-size: .9rem; }
.app-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.app-icon { flex: none; display: block; width: 64px; height: 64px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(23,32,42,.08), 0 4px 12px rgba(23,32,42,.12); }
.app-icon-lg { width: 96px; height: 96px; }

/* Store badges: official artwork, equal visual height, at least the required clear space between them */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.badge { display: inline-block; line-height: 0; border-radius: 8px; }
.badge img { display: block; height: 44px; width: auto; max-width: none; }
.badge-play img { height: calc(44px * 250 / 168); margin: calc(-44px * 41 / 168); }
.badge-play { padding: 0; }
.soon { display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--tint); font-size: .9rem; font-weight: 700; }
.soon::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #c78a35; }

/* Product pages */
.product-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.product-hero .app-icon { margin-bottom: 1.2rem; }
.product-hero .lead { margin-bottom: 1.4rem; }
.product-hero .platforms { margin-top: 1rem; color: var(--muted); font-size: .92rem; }
.hero-shot { justify-self: center; }
.product-head { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--app) 9%, var(--paper)), var(--paper)); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.feature { padding: 1.35rem 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.feature h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.feature p { margin: 0; color: var(--muted); }
.steps { counter-reset: step; display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; max-width: 760px; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: #fff; background: var(--app); font-weight: 800; font-size: .95rem; }
.steps strong { color: var(--ink); }

/* Screenshots: phone-proportioned, readable, horizontally scrollable on small screens */
.shots { display: flex; gap: 1.25rem; margin: 0; padding: .5rem .25rem 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; overscroll-behavior-x: contain; }
.shots li { flex: 0 0 auto; scroll-snap-align: start; }
.shot { margin: 0; width: 230px; }
.shot img, .hero-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.hero-shot { width: min(280px, 100%); margin: 0; }
.shot figcaption { margin-top: .6rem; color: var(--muted); font-size: .9rem; line-height: 1.4; }

/* FAQ, notes, contact */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: .8rem 0; color: var(--ink); font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--muted); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 1rem; }
.note { padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--app); border-radius: 10px; background: var(--surface); }
.links-row { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.links-row a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.contact-card { padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.contact-card h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.contact-card p { color: var(--muted); }
.contact-card .address { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.contact-card .address a { display: inline-flex; align-items: center; min-height: 44px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.principles { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.principles h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.principles p { margin: 0; color: var(--muted); }

/* Legal pages */
.legal { max-width: 780px; }
.legal h2 { margin-top: 2.6rem; padding-top: .5rem; font-size: 1.6rem; }
.legal h3 { margin-top: 1.8rem; font-size: 1.2rem; }
.legal h4 { margin-top: 1.4rem; font-size: 1.02rem; }
.legal li { margin: .35rem 0; }
.legal .product-section { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--line); }
.updated { display: inline-block; margin: 0; padding: .3rem .7rem; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: .9rem; font-weight: 700; }
.toc { margin: 2rem 0; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.toc h2 { margin: 0 0 .5rem; padding: 0; font-size: 1.05rem; }
.toc ol { margin: 0; padding-left: 1.3rem; }
.toc a { display: inline-block; padding: .3rem 0; }
.applies { color: var(--muted); font-size: .95rem; font-style: italic; }
.back-top { margin-top: 1rem; font-size: .9rem; }

/* Footer */
.site-footer { margin-top: clamp(2rem, 6vw, 4rem); padding: 2.5rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .93rem; background: var(--tint); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem 2rem; }
.footer-grid h2 { margin: 0 0 .4rem; color: var(--ink); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text); text-decoration: none; }
.footer-grid li a:hover { color: var(--accent-strong); text-decoration: underline; }
.footer-brand p { margin: .5rem 0 0; max-width: 34ch; }
.footer-legal { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .88rem; }

.error-page { padding: clamp(4rem, 12vw, 8rem) 0; }

@media (max-width: 860px) {
  .product-hero { grid-template-columns: 1fr; }
  .hero-shot { justify-self: start; width: min(230px, 70%); }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 2rem); }
  .nav { flex-wrap: wrap; gap: 0; padding: .4rem 0; min-height: 0; }
  .nav-links { width: calc(100% + 1rem); margin-left: -.55rem; gap: 0; }
  .nav-links a { padding: 0 .55rem; }
  .app-grid { grid-template-columns: 1fr; }
  .shot { width: 200px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .nav-links a { transition: background-color .15s ease, color .15s ease; }
}
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { color: #000; background: #fff; }
}
