/* Dear Loretta. One stylesheet for every page. No framework, no build step.
   Colors: cream paper, ink and rose from the prayer journal. Lora for headings and letters,
   the system sans for reading. Corners stay square-ish (3px). */

@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/lora-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FBF7F0;       /* page ground, a little lighter than the journal's cream */
  --cream: #F4EDE1;       /* cards and bands */
  --cream-deep: #E9DFCF;  /* quiet fills */
  --white: #FFFDF9;       /* writing surfaces */
  --ink: #2E2A26;
  --ink-soft: #5E5650;
  --rose: #9C6B70;        /* rules and large type only (4.2:1 on paper) */
  --rose-deep: #7A4C52;   /* links and buttons (6.7:1 on paper) */
  --rose-darker: #633A40;
  --line: #DDD0BF;
  --rule: #E6DCCD;        /* the ruled lines on the letter paper */
  --input-border: #8C8072;
  --radius: 3px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rose-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

/* A phone number never breaks at its hyphens. */
a[href^="tel:"],
a[href^="sms:"] {
  white-space: nowrap;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
}

h3 {
  font-size: 1.375rem;
}

p {
  margin: 0 0 1em;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4em;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 1rem;
  color: var(--paper);
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* One centered column, like a sheet of paper: the letter page, notes and the legal pages. */
.wrap.narrow {
  max-width: calc(var(--measure) + 4rem);
}

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

@media (min-width: 64rem) {
  .wrap {
    padding-inline: 2rem;
  }
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding-block: 0.5rem;
}

.wordmark {
  padding-block: 0.4rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--rose-deep);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li {
  margin: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--rose);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.nav .nav-cta {
  padding-inline: 1rem;
  border-radius: var(--radius);
  background: var(--rose-deep);
  color: var(--white);
}

.nav .nav-cta:hover,
.nav .nav-cta[aria-current="page"] {
  background: var(--rose-darker);
  color: var(--white);
  text-decoration: none;
}

.nav .short {
  display: none;
}

@media (max-width: 30rem) {
  .header-inner {
    justify-content: center;
  }

  .wordmark {
    width: 100%;
    text-align: center;
  }

  .nav {
    justify-content: center;
    gap: 0 0.875rem;
  }

  .nav .nav-cta {
    padding-inline: 0.75rem;
  }

  .nav .long {
    display: none;
  }

  .nav .short {
    display: inline;
  }
}

/* ---------- Shared pieces ---------- */

.section {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.section-cream {
  border-block: 1px solid var(--line);
  background: var(--cream);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--ink-soft);
}

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

.prose h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
}

.prose h2:first-child {
  margin-top: 0;
}

.lead {
  font-size: 1.25rem;
}

.kicker {
  margin: 0 0 0.5rem;
  color: var(--rose-deep);
  font-size: 1rem;
  font-weight: 700;
}

.tagline {
  margin: 0 0 1rem;
  color: var(--rose-deep);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem);
  font-style: italic;
  line-height: 1.35;
}

/* The AI-character line. Same look on every page so it is easy to find. */
.ai-note {
  max-width: var(--measure);
  padding-left: 0.875rem;
  border-left: 3px solid var(--rose);
  color: var(--ink-soft);
  font-size: 1rem;
}

.page-hero {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) clamp(1rem, 0.5rem + 2vw, 2rem);
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero .lead,
.page-hero p {
  max-width: var(--measure);
}

.fine-print {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--rose-deep);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--rose-darker);
  color: var(--white);
}

.btn-secondary {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

/* A store button with no link yet reads "Coming soon" and does nothing. */
a.btn:not([href]),
.btn:disabled {
  border-color: var(--cream-deep);
  background: var(--cream-deep);
  color: var(--ink-soft);
  cursor: default;
}

.btn[aria-busy="true"] {
  cursor: progress;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 30rem) {
  .actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .nav .nav-cta {
    transition: background-color 120ms ease, color 120ms ease;
  }
}

/* ---------- Home: hero ---------- */

.home-hero {
  padding-bottom: clamp(0.5rem, 0rem + 1.5vw, 1.5rem);
}

/* The three short sentences of the tagline, one to a line, like the social card. */
.tagline-stack span {
  display: block;
}

.home-hero .wrap {
  display: grid;
}

.hero-photo {
  order: -1;
  margin-inline: -1rem;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-card {
  position: relative;
  margin-top: -2rem;
  padding: 1.75rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}

.hero-card h1 {
  margin-bottom: 0.15em;
  font-size: clamp(2.25rem, 1.3rem + 4.6vw, 4.75rem);
  line-height: 1.05;
}

@media (min-width: 40rem) {
  .hero-photo {
    margin-inline: -1.5rem;
  }

  .hero-card {
    margin-inline: 1rem;
    padding: 2rem 2rem;
  }
}

@media (min-width: 60rem) {
  .home-hero {
    padding-top: 3rem;
  }

  .home-hero .wrap {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }

  .hero-photo {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
  }

  .hero-photo img {
    border-radius: var(--radius);
  }

  /* The card lies across the edge of the photo, like a letter set down on it. */
  .hero-card {
    z-index: 1;
    grid-row: 1;
    grid-column: 1;
    margin: 0 -4rem 0 0;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 22px 40px -26px rgba(46, 42, 38, 0.45);
  }
}

/* ---------- Home: letters ---------- */

.letters {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 50rem) {
  .letters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.letter-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}

.letter-card > * {
  margin: 0;
}

.letter-no {
  color: var(--rose-deep);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.letter-text {
  font-family: var(--serif);
}

.letter-text .salutation {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  font-style: italic;
}

.letter-text .line {
  display: block;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.55rem);
  font-weight: 700;
  line-height: 1.3;
}

.answer .label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
}

.answer .line {
  display: block;
  color: var(--rose-deep);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.25;
}

/* A verse set like a printed verse card: a double rose rule. */
.verse {
  margin: 0;
  padding: 1rem 1.125rem;
  border: 3px double var(--rose);
  border-radius: var(--radius);
  background: var(--paper);
}

.verse blockquote {
  margin: 0 0 0.5rem;
}

.verse blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.55;
}

.verse cite {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 600;
}

.watch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  margin-top: auto;
  font-size: 1rem;
}

.watch .label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
}

@media (max-width: 30rem) {
  .watch .label {
    flex-basis: 100%;
    min-height: 0;
  }
}

.watch a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ---------- Home: guide band and journal ---------- */

.guide-band {
  display: grid;
  gap: 1.5rem 3rem;
}

@media (min-width: 56rem) {
  .guide-band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
}

.guide-band h2 {
  max-width: 16ch;
}

.feature {
  display: grid;
  gap: 2rem 3.5rem;
  align-items: center;
}

@media (min-width: 48rem) {
  .feature {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

.cover {
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
  border-radius: 2px;
  box-shadow: 0 18px 36px -18px rgba(46, 42, 38, 0.45), 0 2px 6px rgba(46, 42, 38, 0.12);
}

/* ---------- Forms ---------- */

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

.field {
  margin: 0 0 1.5rem;
}

.field > label,
.label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
}

.hint {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.input {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
}

.input::placeholder {
  color: var(--ink-soft);
  font-style: italic;
  opacity: 1;
}

/* The letter: a printed salutation over ruled paper. */
.letter-field .salutation {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 1.35rem + 1vw, 2.1rem);
  font-style: italic;
  font-weight: 400;
}

.paper {
  display: block;
  width: 100%;
  min-height: 20rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  background-color: var(--white);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(2rem - 1px),
    var(--rule) calc(2rem - 1px),
    var(--rule) 2rem
  );
  background-attachment: local;
  background-position: 0 0.5rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 2rem;
  resize: vertical;
}

.counter {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-align: right;
}

.checks {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.checks legend {
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.check input {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  accent-color: var(--rose-deep);
}

.check label {
  cursor: pointer;
}

/* The honeypot: people never see it, bots fill it in. */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.65em;
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.form-status.is-error {
  color: var(--rose-deep);
}

.form-error {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--rose-deep);
  border-radius: var(--radius);
  background: var(--white);
}

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

.form-error-msg {
  font-weight: 700;
}

.form-done {
  margin: 0;
  font-weight: 600;
}

.signup {
  max-width: 34rem;
}

.signup-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 36rem) {
  .signup-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.signup .fine-print {
  margin: 0.75rem 0 0;
}

.done {
  max-width: var(--measure);
  padding-bottom: 1rem;
}

/* ---------- Safety box ---------- */

.safety {
  max-width: var(--measure);
  margin: 1.5rem 0 2.25rem;
  padding: 1.25rem 1.25rem 1.25rem 1.125rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--rose-deep);
  border-radius: var(--radius);
  background: var(--white);
}

.safety h2,
.safety h3 {
  margin: 0 0 0.4rem;
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 700;
}

.safety p {
  margin: 0;
}

.safety a,
.form-error-help a {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Shop ---------- */

.product {
  display: grid;
  gap: 1.5rem 3.5rem;
  padding-top: clamp(2rem, 1rem + 3vw, 3.5rem);
}

@media (min-width: 52rem) {
  .product {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
  }
}

.product .page-hero {
  padding-top: 0;
}

.buy {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 36rem) {
  .buy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.buy-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}

.buy-card > * {
  margin: 0;
}

.buy-card h2 {
  font-family: var(--sans);
  font-size: 1.0625rem;
}

.buy-card .price {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
}

.buy-card .btn {
  margin-top: auto;
}

/* Side by side, the two cards share rows, so both buttons sit at the same height. */
@media (min-width: 36rem) {
  @supports (grid-template-rows: subgrid) {
    .buy {
      row-gap: 0;
    }

    .buy-card {
      display: grid;
      grid-row: span 5;
      grid-template-rows: subgrid;
      row-gap: 0.5rem;
      align-content: start;
    }

    .buy-card .btn {
      margin-top: 0.25rem;
    }
  }
}

.section-sm {
  padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.inside-list {
  display: grid;
  gap: 0.25rem 2.5rem;
  max-width: 52rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 44rem) {
  .inside-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.inside-list li {
  margin: 0;
  padding: 0.6rem 0 0.6rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--rose), var(--rose)) 0 1.2rem / 0.6rem 2px no-repeat;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  gap: 1.5rem 3.5rem;
  padding-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

@media (min-width: 52rem) {
  .about-grid {
    grid-template-columns: 17rem minmax(0, 1fr);
    align-items: start;
  }
}

.portrait {
  width: min(17rem, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
}

.about-grid .portrait {
  margin-top: clamp(0rem, -1rem + 3vw, 2.5rem);
}

/* ---------- Links hub ---------- */

.hub {
  max-width: 28rem;
  margin-inline: auto;
  padding-block: 2.5rem 3rem;
  text-align: center;
}

.hub .portrait {
  width: 8.5rem;
  height: 8.5rem;
  margin: 0 auto 1.25rem;
}

.hub h1 {
  margin-bottom: 0.2rem;
  font-size: 2.5rem;
}

.hub .tagline {
  font-size: 1.3rem;
}

.hub .ai-note {
  margin-inline: auto;
  padding-left: 0;
  border-left: 0;
}

.hub-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.hub-list li {
  margin: 0;
}

.hub-list .btn {
  width: 100%;
  min-height: 3.5rem;
  font-size: 1.125rem;
}

.hub-list-watch {
  margin-top: 1.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem 2rem;
  border-top: 3px double var(--rose);
  background: var(--cream);
  font-size: 1rem;
}

.footer-ai {
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-style: italic;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.footer-nav li {
  margin: 0;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
}

.footer-help,
.footer-social {
  max-width: var(--measure);
}

.footer-help a,
.footer-social a {
  color: var(--ink);
}

.footer-small {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.footer-small a {
  color: var(--ink-soft);
}

/* ---------- 404 and small pages ---------- */

.plain-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.plain-links li {
  margin: 0;
}
