/* =========================================================
   Bē Mode — shared styles for every page
   Based on Ray's original About page CSS, tidied into one
   file so the home page and About page always match.
   ========================================================= */

/* Brand font (Bricolage Grotesque) + handwriting font for the photo labels.
   Both are free (SIL Open Font Licence).
   Self-hosted (not loaded from Google) so it looks the same on
   every phone, and no visitor data goes to a third party. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/fonts/caveat-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* Brand colours in one place — change here, changes everywhere */
:root {
  --ink: #181918;
  --paper: #faf9f5;
  --rule: #c9c9bf;
  --blue: #1452ee;       /* the big blue button */
  --blue-dark: #0e3dbf;  /* hover / pressed */
  --muted: #5d5e57;
  --error: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Bricolage Grotesque", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 1450px;
  margin: auto;
  padding: 0 clamp(24px, 6vw, 96px);
}

/* ---------- Header & footer ---------- */
header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
header { padding: 24px 0; border-bottom: 1px solid var(--rule); }
footer {
  border-top: 1px solid var(--rule);
  padding: 20px 0 28px;
  font-size: 15px;
  color: var(--muted);
  flex-wrap: wrap;
}
footer a { color: inherit; }

/* Wordmark: "Be Mode" with a blue macron drawn over the e */
.wordmark {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
  color: inherit;
  text-decoration: none;
}
.wordmark span { font-size: inherit; }
.marked-e { position: relative; }
.marked-e::before {
  content: "";
  position: absolute;
  left: 14%; right: 14%;
  height: .1em;
  bottom: .86em;
  background: var(--blue);
}

.nav-link {
  color: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-underline-offset: .22em;
}
.nav-link:hover { text-decoration-color: var(--blue); }
.nav-link:focus-visible, .wordmark:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

/* Text only screen readers hear */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Blue underline used to highlight "be" in the copy */
u { text-decoration-color: var(--blue); text-underline-offset: .09em; }
section p u, .hook-followup u { text-decoration-thickness: .15em; }

/* ---------- Home page hero ---------- */
section.hero {
  min-height: calc(100svh - 155px);
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: center;
  gap: 4vw;
  padding: 2.5rem 0;
}

h1 {
  font-size: clamp(3rem, 4.9vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  margin: 0;
  font-weight: 800;
  text-wrap: balance;
}

p {
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.48;
  max-width: 35ch;
  margin: 1.4rem 0 1.8rem;
}

.hook-followup {
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: -.02em;
  margin: 1rem 0 1.4rem;
  max-width: none;
  text-wrap: balance;
}

.product-copy { margin: 1rem 0; }
.product-copy p { margin: 0 0 .5em; max-width: 44ch; }

.trust {
  font-size: .94rem;
  font-weight: 700;
  margin: .4rem 0 0;
  max-width: none;
}

/* The big blue button illustration (tap it for a squish) */
.app-icon {
  width: min(84%, 400px);
  aspect-ratio: 1;
  justify-self: center;
  transform: rotate(-6deg);
  /* reset the normal button look */
  background: none;
  border: 0;
  padding: 0;
  border-radius: 21%;
  cursor: pointer;
  touch-action: manipulation;
  filter: drop-shadow(0 18px 18px #091d6540);
}
.app-icon:hover { background: none; }
.app-icon:active { filter: drop-shadow(0 18px 18px #091d6540) brightness(.94); }
.app-icon img { width: 100%; height: 100%; display: block; }

/* App Store / Google Play marks */
.platforms { display: flex; align-items: center; gap: 12px; margin: .9rem 0 0; }

/* ---------- Waitlist form ---------- */
form.waitlist {
  display: flex;
  max-width: 460px;
  gap: 6px;
}
input, button {
  font: inherit;
  font-size: 17px;
  border-radius: 8px;
  padding: 14px;
}
input[type="email"] {
  min-width: 0;
  flex: 1;
  border: 1px solid #888980;
  background: #fff;
  color: var(--ink);
}
button {
  background: var(--blue);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s ease;
}
button:hover { background: var(--blue-dark); }
button:disabled { opacity: .7; cursor: progress; }
button:focus-visible, input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
/* Hidden "honeypot" field: real people never see it, spam bots fill it in */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

#status {
  font-size: 15px;
  line-height: 1.4;
  margin: 8px 0 0;
  min-height: 1.4em;
  max-width: 460px;
}
#status.ok { font-weight: 700; }
#status.err { color: var(--error); }

.fineprint {
  font-size: 13px;
  color: var(--muted);
  margin: 1rem 0 0;
  max-width: 460px;
}
.fineprint a { color: inherit; }

/* ---------- About page letter ---------- */
.letter { max-width: 38rem; margin: clamp(2.5rem, 7vw, 6rem) auto; }
.letter h1 {
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  margin-bottom: 1.8rem;
}
.letter p {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  max-width: none;
  margin: 0 0 1.1em;
}
.letter .signature { margin: 1.6rem 0 2rem; font-weight: 700; }
.letter figure { margin: 2rem 0; }
.letter figure svg { width: 100%; height: auto; display: block; }
.photo-labels { font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; }

.letter-cta {
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.button-link {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 8px;
}
.button-link:hover { background: var(--blue-dark); }
.button-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Simple text pages (privacy) ---------- */
.prose { max-width: 40rem; margin: clamp(2.5rem, 6vw, 5rem) auto; }
.prose h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 1.5rem; }
.prose h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.6; max-width: none; }
.prose p { margin: 0 0 1em; }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  header { padding: 15px 0; }
  .wordmark { font-size: 26px; }
  section.hero {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
    padding: 1.4rem 0 2rem;
  }
  .app-icon {
    grid-row: 1;
    width: clamp(100px, 28vw, 160px);
    justify-self: end;
    margin: 0 9px 2px 0;
  }
  h1 { font-size: clamp(43px, 11vw, 70px); }
  p { margin: 1rem 0; font-size: 18px; }
  /* Stack the form so the email box isn't squashed on small phones */
  form.waitlist { flex-direction: column; }
  input, button { padding: 14px 12px; }
  footer { padding: 14px 0 22px; }
}

/* Respect people who've asked their device for less motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
