/* good-bully.com
 *
 * The site lives in the shield's world: the plum-black ground and brand orange
 * of the screen GoodBully draws in front of an app it has blocked. A single
 * dark theme on purpose — it is what the product looks like.
 *
 * Type: Archivo for anything stamped or shouted (headings, labels, buttons),
 * Literata for anything meant to be read. The shield mockup uses the rounded
 * system face, because it is a picture of the app.
 */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-latin-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* The app's dark tones (goodbully-android ui/Palette.kt, shared with iOS):
     a plum-black ramp and one brand orange, measured off the mascot. */
  --ground: #16111b;
  --surface: #282032;
  --surface-hi: #453c4f;
  --ink: #eee9f4;
  --ink-2: #cbc4d4;
  --ink-3: #a59daf;
  --rule: #453c4f;
  --brand: #e98537;
  --on-brand: #16111b;

  /* The shield, from ShieldStyle.swift: one look at every intensity. The demo
     script still sets these from the exported data, so they can't drift. */
  --shield-bg: #16111b;
  --shield-title: #eee9f4;
  --shield-sub: #cbc4d4;
  --shield-accent: #e98537;
  --shield-on-accent: #16111b;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 38rem;
}

/* ---- base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--text);
  font-optical-sizing: auto;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 650; color: var(--ink); }
::selection { background: var(--brand); color: var(--on-brand); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: 0.5rem 0.75rem; background: var(--surface); }

.wrap { width: min(68rem, 100% - 2 * var(--gutter)); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-stretch: 88%; margin: 0.6rem 0 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-stretch: 92%; margin: 0; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.4rem; }

/* The stamped utility label: condensed, tracked, upper case. */
.label {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
a.label { text-decoration: none; }
a.label:hover { text-decoration: underline; }

.eyebrow { color: var(--ink-3); margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.eyebrow a { color: inherit; }
.meta { color: var(--ink-3); margin: 0.75rem 0 2rem; }
/* Every page opens on its h1; the heading carries the page on its own. */
main > h1:first-child, main > .hero:first-child > h1:first-child { margin-top: clamp(2.5rem, 6vw, 4.5rem); }

.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 36rem;
  margin: 1.25rem 0 0;
  text-wrap: pretty;
}

/* ---- header / footer ----------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
}
.wordmark {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 850;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  width: 1.25em;
  height: 1.25em;
  margin-right: 0.5em;
  border-radius: 0.3em;
  background: url("/assets/mascot/app-icon.cab8c8e47c.webp") center / cover;
  vertical-align: -0.28em;
}
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-header nav a {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 650;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1.5px solid transparent;
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(4rem, 10vw, 7rem);
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink-3); }
.site-footer a:hover { color: var(--ink); }

/* ---- sections ------------------------------------------------------------ */

.section { margin-top: clamp(4rem, 9vw, 6.5rem); scroll-margin-top: 1.5rem; }
.section-head {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
/* The platform chip on a heading: a feature one platform doesn't have yet. */
.section-head p { margin: 0; color: var(--ink-2); max-width: var(--measure); }
.section > p { max-width: var(--measure); color: var(--ink-2); }

.prose { max-width: var(--measure); }
.prose p, .prose ul { margin: 0 0 1.1rem; color: var(--ink-2); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.6rem; }
.prose h2 { margin-top: 2.75rem; margin-bottom: 0.75rem; font-size: 1.35rem; }
.prose h3 { color: var(--ink); }
.prose > .lede { margin: 0 0 2rem; color: var(--ink); }

/* A spec sheet: one fact per row. */
.spec { margin: 0; max-width: 56rem; }
.spec > div {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: 0.4rem 2rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
}
.spec dt { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.spec dd { margin: 0; color: var(--ink-2); }

.link-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; margin-top: 1.25rem; }

/* ---- plans --------------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  align-items: start;
  gap: 1rem;
  max-width: 56rem;
}
.plan {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}
.plan--pro { border-color: var(--brand); }
.plan .label { color: var(--ink-3); }
.plan--pro .label { color: var(--brand); }
.plan-price {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 780;
  font-size: 2rem;
  line-height: 1.1;
}
.plan-price small { font-size: 1rem; font-weight: 560; color: var(--ink-3); }
.plan-alt { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.plan ul { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.plan li { position: relative; padding-left: 1.3rem; color: var(--ink-2); }
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 2px;
  background: var(--ink-3);
}
.plan--pro li::before { background: var(--brand); }
.plan li strong { display: block; }
.fine { margin: 1rem 0 0; color: var(--ink-3); font-size: 0.9rem; max-width: 56rem; }

/* ---- the shield mockup ----------------------------------------------------- */

.shield-figure {
  display: grid;
  grid-template-columns: minmax(0, 18rem) 1fr;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: start;
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
}
.phone {
  aspect-ratio: 9 / 19;
  padding: 0.65rem;
  border-radius: 2.6rem;
  background: #0b080e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 30px 60px -28px rgba(0, 0, 0, 0.9);
}
.shield {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.35rem 1.4rem;
  overflow: hidden;
  border-radius: 2.05rem;
  background: var(--shield-bg);
  color: var(--shield-title);
  text-align: center;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* The pose and the line, centred in the space above the buttons, which sit at
   the foot of the screen as they do on an iPhone. */
.shield-body {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 1rem;
}
.shield-title { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.shield-sub { margin: 0; color: var(--shield-sub); font-size: 0.92rem; line-height: 1.35; }
.shield-btn {
  width: 100%;
  padding: 0.75rem 0;
  border-radius: 999px;
  background: var(--shield-accent);
  color: var(--shield-on-accent);
  font-weight: 600;
  font-size: 0.95rem;
}
.shield-alt { margin: 0.95rem 0 0; color: var(--shield-sub); font-size: 0.88rem; }
.shield-figure figcaption > p { margin: 0; max-width: 30rem; color: var(--ink-2); }

/* The mascot, drawn at the art's own 3:2 so every pose sits on the same floor. */
.shield-pose { width: 112%; max-width: none; aspect-ratio: 3 / 2; margin: 0 0 0.9rem; object-fit: contain; }
.shield-copy { width: 100%; }

/* ---- the interactive demo ------------------------------------------------ */

.demo-controls { display: grid; gap: 1.35rem; margin-top: 1.75rem; }
.demo-controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.demo-controls legend { margin-bottom: 0.55rem; padding: 0; color: var(--ink-3); }
.demo-note { color: var(--ink-3); font-style: italic; }
.demo-aside { margin: 0.6rem 0 0; color: var(--ink-3); font-size: 0.92rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.choice { position: relative; }
/* The real radio sits on top of the pill, invisible: native keyboard and
   screen-reader behaviour, custom look. */
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-block;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--display);
  font-weight: 560;
  font-size: 0.85rem;
  line-height: 1.3;
}
.choice:hover span { border-color: var(--ink-3); color: var(--ink); }
.choice input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle { display: flex; align-items: baseline; gap: 0.55rem; margin-top: 0.3rem; color: var(--ink-2); cursor: pointer; }
.toggle input { accent-color: var(--brand); }
.demo-open { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.demo-button {
  padding: 0.7rem 1.1rem;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 650;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.demo-button:hover { background: var(--brand); color: var(--on-brand); }
.demo-status { color: var(--ink-3); }

/* ---- store buttons: the homepage and /downloads/ ----------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
}

.store-btn {
  display: grid;
  gap: 0.15rem;
  min-width: 13rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.store-btn:hover { background: var(--surface-hi); border-color: var(--ink-3); }
.store-btn-kicker { color: var(--ink-3); }
.store-btn-name {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 650;
  font-size: 1.15rem;
}

/* The iPad case: the iPhone app is the right one, so say so with weight rather
   than by redirecting. */
.store-btn--primary { border-color: var(--brand); }
.store-btn--primary .store-btn-name { color: var(--brand); }

/* A store that has no listing yet: still shown, so the page says what is
   coming, but inert rather than bouncing back here. Unfilled rather than
   faded, so the words stay readable. */
.store-btn--soon,
.store-btn--soon:hover { background: transparent; border-color: var(--rule); }
.store-btn--soon .store-btn-name { color: var(--ink-3); }

.ipad-note { color: var(--ink-2); margin: 0.85rem 0 0; }

/* Desktop on /downloads/: a QR code to scan with the phone, then the link. */
.handoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.25rem;
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
}
.handoff[hidden], .stores[hidden] { display: none; }
.handoff + .stores { margin-top: clamp(2.5rem, 5vw, 3.25rem); }
/* Dark modules on the palette's lightest ink, with the quiet zone drawn into
   the SVG, so any phone camera reads it. */
.qr { flex: none; width: 11rem; border-radius: 14px; background: var(--ink); overflow: hidden; }
.qr svg { display: block; width: 100%; height: auto; }
.qr path { fill: var(--ground); }
.handoff-url {
  margin: 0.5rem 0 1.1rem;
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 650;
  font-size: 1.15rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.handoff-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0; }

.link-row--quiet a { color: var(--ink-3); }
.link-row--quiet a:hover { color: var(--ink); }

/* ---- features: words beside a real screen --------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 17rem);
  justify-content: start;
  gap: clamp(1.75rem, 6vw, 5rem);
  align-items: start;
}
.feature-text > p, .bully-intro > p { margin: 0 0 1.1rem; color: var(--ink-2); }
.feature-text > .fine { margin-top: 1.1rem; color: var(--ink-3); font-size: 0.9rem; }
.feature-figure { margin: 0; }
/* A crop of a real screen, shown larger than a whole phone would be so its
   small print reads. The app's ground is the page's, so a rule marks the edge. */
.feature--crop { grid-template-columns: minmax(0, var(--measure)) minmax(0, 22rem); }
.crop { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 1.25rem; background: var(--ground); }

/* A real screenshot in the phone: the image sets the height. */
.phone--screen { aspect-ratio: auto; }
.phone--screen img { width: 100%; height: auto; border-radius: 2.05rem; }

.spec--tight > div { grid-template-columns: 5.5rem 1fr; align-items: baseline; gap: 0.3rem 1.25rem; padding-block: 0.8rem; }
.spec--tight dt { font-size: 1rem; }

/* ---- the bullies ------------------------------------------------------------ */

/* The phone (the unlock, as it plays) holds still beside the collection. */
.bully-layout {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  grid-template-areas: "phone intro" "phone gallery";
  column-gap: clamp(1.75rem, 6vw, 5rem);
  align-items: start;
}
.bully-intro { grid-area: intro; max-width: var(--measure); }
.bully-phone { grid-area: phone; position: sticky; top: 2rem; }
.bullies {
  grid-area: gallery;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 2rem 1rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.bully-art { border-radius: 14px; background: var(--surface); }
.bully-art img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
.bully-name {
  margin: 0.7rem 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}
.bully-line {
  margin: 0.25rem 0 0;
  color: var(--ink-2);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.45;
  text-wrap: pretty;
}
/* The one still in his capsule: a silhouette, as the app draws him. */
.bully--unknown .bully-art { background: var(--surface-hi); }
.bully--unknown img { filter: brightness(0); opacity: 0.8; }
.bully--unknown .bully-name { color: var(--brand); }

/* ---- screens beside each other ---------------------------------------------- */

.screens {
  display: grid;
  grid-template-columns: minmax(0, 34rem) minmax(0, 22rem);
  justify-content: start;
  gap: clamp(1.75rem, 6vw, 5rem);
  align-items: start;
  margin-top: 2.25rem;
}
.screens figure { margin: 0; }
.screens figcaption, .feature-figure figcaption { margin-top: 0.9rem; color: var(--ink-2); font-size: 0.95rem; }
/* A crop of the app's own card, its corners cut to the card's. */
.panel { width: 100%; height: auto; }
.widget-shot { max-width: 22rem; margin-top: 1.1rem; }

/* ---- middling screens: the collection under the phone and the words ------ */

@media (max-width: 64rem) {
  .bully-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 15rem);
    grid-template-areas: "intro phone" "gallery gallery";
  }
  .bully-phone { position: static; }
  .bullies { margin-top: 2.5rem; }
}

/* ---- small screens --------------------------------------------------------- */

@media (max-width: 40rem) {
  /* The shield's line belongs on the first screen; the store buttons can wait
     until after the demo. */
  .hero { display: flex; flex-direction: column; }
  .hero > .stores { order: 1; margin-top: 2.5rem; }
  .spec > div { grid-template-columns: 1fr; }
  .stores { flex-direction: column; }
  .store-btn { min-width: 0; }
  .shield-figure { grid-template-columns: 1fr; justify-items: center; }
  .shield-figure .phone { width: min(17rem, 80vw); }
  .feature, .feature--crop, .screens { grid-template-columns: 1fr; }
  .bully-layout { grid-template-columns: 1fr; grid-template-areas: "intro" "phone" "gallery"; }
  .feature-figure { justify-self: center; width: min(17rem, 80vw); }
  .feature--crop .feature-figure, .screens-crop { justify-self: start; width: 100%; max-width: 24rem; }
  .bully-phone { justify-self: center; width: min(17rem, 80vw); }
  .spec--tight > div { grid-template-columns: 5.5rem 1fr; }
  /* The collection scrolls sideways inside its own row, edge to edge, so the
     page itself never does. */
  .bullies {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 9.5rem;
    gap: 0 0.9rem;
    margin: 2.5rem calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter) 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }
  .bullies > li { scroll-snap-align: start; }
  .plan { padding: 1.5rem 1.35rem 1.35rem; }
}

/* ---- privacy policy ------------------------------------------------------ */

/* Policy and help pages are documents, not pitches: a smaller title. */
.doc-title { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.doc-title + .prose { margin-top: 1.75rem; }

/* Platform switch. Underlined tabs on a rule, the active one in brand orange. */
.policy-tabs {
  display: flex;
  gap: 2rem;
  max-width: var(--measure);
  margin: 2.5rem 0 0;
  border-bottom: 1px solid var(--rule);
}
.policy-tabs[hidden] { display: none; }
.policy-tabs a {
  padding: 0.9rem 0 0.8rem;
  margin-bottom: -1px;
  font-size: 0.85rem;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 160ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.policy-tabs a:hover { color: var(--ink); }
.policy-tabs a[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

.policy-panel, .policy-common { margin-top: 2.5rem; scroll-margin-top: 1.5rem; }
.policy-panel > h2:first-child, .policy-common > h2:first-child { margin-top: 0; }
.policy-panel h3, .policy-common h3 { margin: 2rem 0 0.4rem; }
.policy-panel h3 + p, .policy-common h3 + p, .policy-panel h3 + ul { margin-top: 0; }
.policy-common { padding-top: 2.5rem; border-top: 1px solid var(--rule); }
/* With the tab bar showing, the panel heading repeats the tab; keep it for
   screen readers and for the no-script page, but only visually on the latter. */
.policy-tabs:not([hidden]) ~ .policy-panel > h2:first-child {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) { .policy-tabs a { transition: none; } }

/* ---- the three voices ------------------------------------------------------ */

.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1.1rem 0 0; max-width: 30rem; }
.voices figure { margin: 0; }
.voices img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 12px; background: var(--surface); }
.voices figcaption { margin-top: 0.45rem; color: var(--ink-3); text-align: center; }
