/* Ask Before They Do
   The look of the site. Phones come first. Wider screens are added
   at the bottom of each section, inside @media (min-width: ...).

   Colors, set by the brand notes:
   cream #F7F0E6, terracotta #B25937, deep terracotta #9A4530,
   sage #6F7D56, text #2C241C.
   Sage and the brighter terracotta are for shapes, not for paragraphs.
   Body text stays the dark brown so it stays easy to read.
*/

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-400italic.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/fraunces.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
}

:root {
  --cream: #f7f0e6;
  --cream-deep: #efe6d8;
  --paper: #fffdf8;
  --terracotta: #b25937;
  --terracotta-deep: #9a4530;
  --sage: #6f7d56;
  --sage-wash: #e7efe0;
  --ink: #2c241c;
  --line: #e4d8c8;
  --white: #ffffff;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", "Trebuchet MS", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --header-offset: 18rem;
  --tap: 48px;
  --radius: 16px;
  --measure: 38rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* 125% of the browser's own size. At the usual 16px default, body text is 20px.
     If someone has set a larger default, this still grows with it. */
  font-size: 125%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

h1,
h2,
h3,
p,
li,
figcaption,
blockquote,
summary {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.85rem, 1.15rem + 2.4vw, 2.8rem);
}

h2 {
  font-size: clamp(1.45rem, 1.1rem + 1.1vw, 1.9rem);
  margin-top: 0;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

p,
ul,
ol,
blockquote,
figure,
.for-jason,
.video-frame,
.card,
.step,
.resource,
.numbers {
  margin-top: 0;
}

p,
ul,
ol,
blockquote {
  margin-bottom: 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

a {
  color: var(--terracotta-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--terracotta);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--terracotta-deep);
  outline-offset: 3px;
}

::selection {
  background: var(--terracotta);
  color: var(--white);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-200%);
  background: var(--terracotta-deep);
  color: var(--white);
  padding: 0.7rem 1rem;
  min-height: var(--tap);
  z-index: 20;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding-inline: 1rem;
}

.block {
  padding-block: 2rem;
}

.prose {
  max-width: var(--measure);
}

.lede {
  font-size: 1.15rem;
  line-height: 1.5;
}

.band {
  background: var(--cream-deep);
}

/* Header and menu
   On a phone the logo sits on top and a full-width Menu button opens the links.
   The links are hidden only when JavaScript added class "js" to the page.
   With no JavaScript, the links stay visible. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-block: 0.85rem 1rem;
}

.header-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.logo-link {
  display: block;
  width: min(46vw, 9.5rem);
  min-height: var(--tap);
}

.logo-link img {
  width: 100%;
  height: auto;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--terracotta);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle:hover {
  background: var(--sage-wash);
}

.menu-toggle[aria-expanded="true"] {
  background: var(--sage-wash);
}

@media (max-width: 959px) {
  .js .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    display: block;
    max-height: min(70vh, 32rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.25rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-nav a[aria-current="page"] {
  background: var(--sage-wash);
  text-decoration-thickness: 3px;
  box-shadow: inset 4px 0 0 var(--sage);
}

/* Buttons and actions */

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  border: 3px solid var(--terracotta);
  background: var(--terracotta);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button.button:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  color: var(--white);
}

.button-secondary {
  background: transparent;
  color: var(--terracotta-deep);
}

.button-secondary:hover {
  background: var(--terracotta-deep);
  color: var(--white);
}

/* Hero, cards, steps */

.hero,
.split {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.hero-figure,
.frame {
  margin: 0;
}

.hero-figure img,
.frame img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

figcaption {
  margin-top: 0.6rem;
  font-size: 1rem;
}

.cards,
.steps,
.resource-list {
  display: grid;
  gap: 1rem;
}

.card,
.step,
.resource,
.scam,
.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.15rem;
  min-width: 0;
}

.card h3,
.step h3,
.resource h3 {
  margin-bottom: 0.4rem;
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: start;
}

.step h3,
.step p {
  margin-bottom: 0.45rem;
}

.num,
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1;
}

.more {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 700;
}

.say {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 560;
  font-size: 1.3rem;
  line-height: 1.35;
  color: var(--ink);
}

blockquote.say {
  margin-left: 0;
  margin-right: 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 6px solid var(--terracotta);
}

.quote-by {
  margin: 0.75rem 0 0;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
}

.callout {
  background: var(--sage-wash);
  border-color: transparent;
  border-left: 6px solid var(--sage);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Boxes Jason still needs to rewrite */

.for-jason {
  background: var(--sage-wash);
  border-left: 6px solid var(--sage);
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  margin: 1rem 0;
}

.for-jason p:last-child {
  margin-bottom: 0;
}

.for-jason-label,
.draft-kicker {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

/* Video slot. A real embed later should fill this same frame. */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  color: var(--cream);
  border: 4px solid var(--terracotta);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.25rem;
}

.video-placeholder p {
  margin: 0;
}

.video-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--cream);
}

/* Scam pages */

.scam {
  scroll-margin-top: var(--header-offset);
}

.scam h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.scam h2 span:last-child {
  flex: 1 1 12rem;
}

.jump summary,
.numbers summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 700;
  cursor: pointer;
  color: var(--terracotta-deep);
}

.jump {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

.jump ul,
.numbers ul {
  margin-top: 0.25rem;
}

.jump a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.15rem 0;
}

.numbers {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 1rem;
}

.flags,
.now-list {
  margin-bottom: 1rem;
}

/* Fridge checklist */

.sheet {
  background: var(--paper);
  border: 3px solid var(--terracotta);
  border-radius: var(--radius);
  padding: 1.25rem 1.15rem 1.4rem;
  max-width: 42rem;
}

.sheet h1 {
  margin-bottom: 0.4rem;
}

.rule {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.35;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.check-list li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin: 0.7rem 0;
}

.box {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.2rem;
  border: 3px solid var(--ink);
  border-radius: 3px;
}

.write-in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin: 0.55rem 0;
}

.blank {
  flex: 1 1 8rem;
  min-width: 6rem;
  border-bottom: 2px solid var(--ink);
  height: 1.35rem;
}

.fine {
  font-size: 1rem;
  margin-bottom: 0;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-width: 42rem;
}

.checklist-layout {
  display: flex;
  flex-direction: column;
}

@media (min-width: 800px) {
  .checklist-layout {
    align-items: center;
  }

  .sheet,
  .toolbar {
    width: min(100%, 42rem);
  }
}

.checklist-layout .toolbar {
  order: -1;
}

/* Resources and the newsletter form */

.phone {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  text-decoration-thickness: 3px;
}

.resource p:last-child,
.card p:last-child {
  margin-bottom: 0;
}

.signup label {
  display: block;
  font-weight: 700;
  margin: 0.9rem 0 0.35rem;
}

.signup input {
  display: block;
  width: min(100%, 28rem);
  min-height: var(--tap);
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
}

.signup input:focus-visible {
  border-color: var(--terracotta-deep);
}

.form-note {
  background: var(--paper);
  border: 3px dashed var(--terracotta);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.form-status {
  min-height: 3rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

.signup .button {
  margin-top: 1rem;
  width: min(100%, 28rem);
}

/* Footer */

.site-footer {
  background: var(--cream-deep);
  border-top: 4px solid var(--terracotta);
  padding-block: 2rem 2.5rem;
  margin-top: 1rem;
}

.early-note {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.footer-nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 700;
}

.footer-phone {
  font-weight: 700;
}

.kicker {
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
}

.section-intro {
  max-width: var(--measure);
}

h2,
h3,
.scam,
.card,
.step {
  scroll-margin-top: var(--header-offset);
}

/* Wider than a phone */

@media (min-width: 700px) {
  .wrap {
    padding-inline: 1.5rem;
  }

  .cards-2,
  .resource-list.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button,
  button.button,
  .signup .button {
    width: auto;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .menu-toggle {
    width: auto;
    align-self: flex-start;
    min-width: 8rem;
  }
}

@media (min-width: 900px) {
  .block {
    padding-block: 3rem;
  }

  .hero,
  .split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 2rem;
  }

  .split.top {
    align-items: start;
  }

  .logo-link {
    width: 11rem;
  }
}

@media (min-width: 960px) {
  :root {
    --header-offset: 18rem;
  }

  .site-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.15rem 0.35rem;
    padding-bottom: 0;
  }

  .header-inner {
    padding-block: 1rem 0.85rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --header-offset: 16rem;
  }
}

.magnet-lead {
  color: var(--terracotta);
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.35rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.magnet-lines p {
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}

.sheet + .sheet {
  margin-top: 1.25rem;
}

@media (min-width: 1100px) {
  .steps.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps.three .step {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The fridge page, on paper */

@media print {
  @page {
    margin: 0.55in;
  }

  html {
    font-size: 12pt;
    scroll-behavior: auto;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .no-print,
  .for-jason,
  .toolbar {
    display: none !important;
  }

  .wrap {
    width: auto;
    max-width: none;
    padding: 0;
  }

  .block {
    padding: 0;
  }

  .sheet {
    border: none;
    border-radius: 0;
    max-width: none;
    padding: 0;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .check-list li,
  .write-in,
  h1,
  h2 {
    break-inside: avoid;
  }

  .sheet + .sheet {
    break-before: page;
    margin-top: 0;
  }

  .magnet-lead {
    color: #000;
  }
}

@media (forced-colors: active) {
  .button,
  .menu-toggle,
  .sheet,
  .video-frame,
  .for-jason,
  .card,
  .step,
  .resource {
    border: 2px solid ButtonText;
  }
}
