/* meline.biz
 *
 * Signature: the manufacturer's data plate — the riveted nameplate on a
 * machine that says who made it, what it is, and when. Every field on a plate
 * states a real fact (maker, model, platform, status, year). The plates are the
 * one loud thing; everything around them stays quiet.
 *
 * Type: Archivo at two extreme widths is the stamping (125% for names, 75% for
 * labels). Literata is for anything meant to be read.
 */

@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 {
  --primer: #edefec;        /* ground */
  --aluminum: #cbd1d3;      /* plate */
  --aluminum-hi: #dde2e3;
  --aluminum-lo: #b9c0c3;
  --graphite: #161b1f;      /* ink */
  --etch: #56626a;          /* secondary text on the ground */
  --etch-on-plate: #435058; /* secondary text on a plate — darker, the plate is darker */
  --rivet: #8e979c;
  --rule: #c3c9cb;
  --frame: rgba(22, 27, 31, 0.26);
  --cobalt: #2446c7;        /* enamel: the single accent */
  --on-cobalt: #ffffff;
  --emboss: rgba(255, 255, 255, 0.55);
  --emboss-y: 1px;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-dark: rgba(0, 0, 0, 0.028);
  --sheen: rgba(255, 255, 255, 0.3);

  /* GoodBully's shield at Gentle, from ShieldStyle.swift in the app. Keep the
     two in step: this mockup is meant to be what the phone actually 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;
  --rivet-inset: 12px;
  --rivet-img: radial-gradient(circle, var(--aluminum-hi) 0 1.4px, var(--rivet) 2px 4.2px,
               rgba(0, 0, 0, 0.3) 4.8px, transparent 5.6px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primer: #111417;
    --aluminum: #2a3035;
    --aluminum-hi: #343b41;
    --aluminum-lo: #22282c;
    --graphite: #e6e9ea;
    --etch: #9aa5ab;
    --etch-on-plate: #aab4ba;
    --rivet: #5d676d;
    --rule: #2c3337;
    --frame: rgba(230, 233, 234, 0.18);
    --cobalt: #7c97ff;
    --on-cobalt: #0b1020;
    --emboss: rgba(0, 0, 0, 0.6);
    --emboss-y: -1px;
    --hairline: rgba(255, 255, 255, 0.035);
    --hairline-dark: rgba(0, 0, 0, 0.12);
    --sheen: rgba(255, 255, 255, 0.08);
  }
}

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

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

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

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-stretch: 112%; margin: clamp(2.5rem, 6vw, 4rem) 0 0.75rem; }
h2 { font-size: 1.55rem; font-stretch: 108%; margin: 0 0 0.75rem; }
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(--etch); margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.eyebrow + h1 { margin-top: 0.5rem; }
.eyebrow a { color: inherit; }
.meta { color: var(--etch); margin: 0 0 2rem; }

.lede {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  max-width: 36rem;
  margin: 1.5rem 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: 125%;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  text-decoration: none;
}
.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(--etch);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1.5px solid transparent;
}
.site-header nav a:hover { color: var(--graphite); }
.site-header nav a[aria-current="page"] { color: var(--graphite); border-bottom-color: var(--cobalt); }

.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(--etch);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--etch); }

/* ---- the plate ----------------------------------------------------------- */

.plate {
  position: relative;
  padding: 3rem 3.25rem 2.75rem;
  border-radius: 12px;
  color: var(--graphite);
  background:
    var(--rivet-img) left var(--rivet-inset) top var(--rivet-inset) / 12px 12px no-repeat,
    var(--rivet-img) right var(--rivet-inset) top var(--rivet-inset) / 12px 12px no-repeat,
    var(--rivet-img) left var(--rivet-inset) bottom var(--rivet-inset) / 12px 12px no-repeat,
    var(--rivet-img) right var(--rivet-inset) bottom var(--rivet-inset) / 12px 12px no-repeat,
    repeating-linear-gradient(0deg, var(--hairline) 0 1px, var(--hairline-dark) 1px 3px),
    linear-gradient(165deg, var(--aluminum-hi), var(--aluminum) 55%, var(--aluminum-lo));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 0 1px rgba(0, 0, 0, 0.14),
    0 1px 1px rgba(0, 0, 0, 0.06),
    0 12px 26px -16px rgba(22, 27, 31, 0.5);
}
/* The engraved frame line, inside the rivets. */
.plate::before {
  content: "";
  position: absolute;
  inset: 1.75rem 1.5rem;
  border: 1px solid var(--frame);
  border-radius: 5px;
  box-shadow: 0 var(--emboss-y) 0 var(--emboss);
  pointer-events: none;
}
.plate-kicker { margin: 0; color: var(--etch-on-plate); }
.plate-name {
  margin: 0.35rem 0 0;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.1rem, 6.4vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  text-shadow: 0 var(--emboss-y) 0 var(--emboss);
  overflow-wrap: anywhere;
}
.plate-rule {
  height: 0;
  margin: 1.5rem 0 1.25rem;
  border: 0;
  border-top: 1px solid var(--frame);
  box-shadow: 0 var(--emboss-y) 0 var(--emboss);
}
.plate-data { margin: 0; display: grid; gap: 0.55rem; }
.plate-data > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.5rem; align-items: baseline; }
.plate-data dt { color: var(--etch-on-plate); }
.plate-data dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: 1.02rem;
  text-shadow: 0 var(--emboss-y) 0 var(--emboss);
}
.plate-data dd a { color: inherit; }

/* Enamel: recessed, filled, the one place cobalt sits on a plate. */
.plate-band {
  margin: 1.75rem 0 0;
  padding: 0.5rem 0.85rem;
  border-radius: 3px;
  background: var(--cobalt);
  color: var(--on-cobalt);
  letter-spacing: 0.24em;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 var(--emboss-y) 0 var(--emboss);
}

.plate--hero { max-width: 46rem; margin-top: clamp(2.5rem, 6vw, 4.5rem); }

.plate--product { padding: 2.5rem 2.5rem 2.25rem; }
.plate--product .plate-name { font-size: clamp(1.7rem, 4.2vw, 2.5rem); }
.plate--product .plate-name a { color: inherit; text-decoration: none; }
.plate--product .plate-name a:focus-visible { outline: none; }
/* The whole plate is the link target. */
.plate--product .plate-name a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; z-index: 1; }
.plate--product .plate-name a:focus-visible::after { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.plate-more { margin: 1.5rem 0 0; color: var(--cobalt); }
/* Light catching metal as the pointer crosses it. */
.plate--product::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(105deg, transparent 38%, var(--sheen) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  transition: background-position 0.8s ease;
  pointer-events: none;
}
.plate--product:hover::after { background-position: -30% 0; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  gap: 1.5rem;
}

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

.section { margin-top: clamp(3.5rem, 8vw, 6rem); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.section-head h2 { margin: 0; }
.section p { max-width: var(--measure); }
.note { color: var(--etch); margin-top: 1.5rem; }

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

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

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

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

.shield-figure {
  display: grid;
  grid-template-columns: minmax(0, 18rem) 1fr;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: center;
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
}
.phone {
  aspect-ratio: 9 / 19;
  padding: 0.65rem;
  border-radius: 2.6rem;
  background: #0a0c10;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 26px 48px -26px rgba(0, 0, 0, 0.6);
}
.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;
  /* This is a picture of iOS, so it uses the system face, not the site's. */
  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; }
.shield-figure figcaption .label { color: var(--etch); margin: 0; }

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

@media (max-width: 40rem) {
  .plate { padding: 2.4rem 1.75rem 2.1rem; --rivet-inset: 8px; }
  .plate::before { inset: 1.2rem 0.9rem; }
  .plate--product { padding: 2.2rem 1.75rem 2rem; }
  .plate-data > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .spec > div { grid-template-columns: 1fr; }
  .shield-figure { grid-template-columns: 1fr; justify-items: center; }
  .shield-figure .phone { width: min(17rem, 80vw); }
}

@media (prefers-reduced-motion: reduce) {
  .plate--product::after { transition: none; }
}
