/* good-bully.com
 *
 * The site lives in the shield's world: the near-black ground and amber accent
 * of the screen iOS draws in front of an app GoodBully 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 system
 * face, because it is a picture of iOS.
 */

@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;
  --ground: #0e1016;
  --surface: #161a22;
  --surface-hi: #1c212b;
  --ink: #f2f3f5;
  --ink-2: #b9bfc8;
  --ink-3: #8b929c;
  --rule: #262b34;
  --amber: #ffb840;
  --on-amber: #111317;

  /* The shield at Gentle, from ShieldStyle.swift. The demo script swaps these
     per intensity, so the mockup always matches what the phone shows. */
  --shield-bg: #171c29;
  --shield-title: #ffffff;
  --shield-sub: rgba(255, 255, 255, 0.72);
  --shield-accent: #70a8ff;
  --shield-on-accent: #000000;

  --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%; }
a { color: var(--amber); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 650; color: var(--ink); }

.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; }

.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;
  margin-right: 0.45em;
  border-radius: 2px;
  background: var(--amber);
  vertical-align: 0.02em;
}
.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(--amber); }

.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); }

/* ---- availability note --------------------------------------------------- */

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.75rem 0 0;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
}
.availability::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amber);
}

/* ---- 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);
}
.section-head .label { color: var(--amber); }
.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(--amber); }
.plan .label { color: var(--ink-3); }
.plan--pro .label { color: var(--amber); }
.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(--amber); }
.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: #05060a;
  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;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.35rem;
  border-radius: 2.05rem;
  background: var(--shield-bg);
  color: var(--shield-title);
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
.shield-title { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.shield-sub { margin: 0 0 1.75rem; 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-menu { margin: 0.3rem 0 0; color: var(--shield-sub); opacity: 0.7; font-size: 0.68rem; }
.shield-figure figcaption > p { margin: 0.4rem 0 0; max-width: 30rem; color: var(--ink-2); }
.shield-figure figcaption > .label { color: var(--amber); margin: 0; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.shield-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.1rem;
  fill: none;
  stroke: var(--shield-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.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; }
.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(--amber); border-color: var(--amber); color: var(--on-amber); }
.choice input:focus-visible + span { outline: 2px solid var(--amber); 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(--amber); }
.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(--amber);
  border-radius: 999px;
  background: transparent;
  color: var(--amber);
  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(--amber); color: var(--on-amber); }
.demo-status { color: var(--ink-3); }

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

@media (max-width: 40rem) {
  .spec > div { grid-template-columns: 1fr; }
  .shield-figure { grid-template-columns: 1fr; justify-items: center; }
  .shield-figure .phone { width: min(17rem, 80vw); }
  .plan { padding: 1.5rem 1.35rem 1.35rem; }
}
