/* remera.app. Palette from app/src/theme/colors.ts (docs/Website Style Guide.md).
   Clay is the accent: ~5-10% of a screen, never a second brand colour
   (docs/REMERA_ACCENT_COLOUR_USAGE_GUIDE_2026-09-13.md). */

@font-face { font-family: "Playfair Display"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/playfair-display-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/playfair-display-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/lato-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/lato-latin-700-normal.woff2") format("woff2"); }

:root {
  --sage: #ABB59A;
  --olive: #6D7A5E;
  --moss: #4F5D46;
  --stone: #E7E3DA;
  --sand: #DCC6B2;
  --cream: #F7F5F0;
  --ink: #2A2E26;
  --mid: #5A5F52;
  --clay: #C98267;
  --claySoft: #D9A18B;
  --danger: #B5533F;
  --white: #FFFFFF;

  --display: "Playfair Display", Georgia, serif;
  --body: "Lato", system-ui, -apple-system, sans-serif;

  --gutter: clamp(1rem, 5vw, 3rem);
  --max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--moss); line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid); /* olive is 4.19:1 on cream, short of AA at this size */
  margin-bottom: 0.75rem;
}

.lead { font-size: 1.15rem; color: var(--mid); }
.narrow { max-width: 38rem; margin-left: auto; margin-right: auto; }
.caption { font-size: 0.9rem; color: var(--mid); font-style: italic; text-align: center; margin-top: 1rem; }
.caption.left { text-align: left; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--moss);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.button:hover { background: var(--ink); }
.button:disabled { opacity: 0.6; cursor: default; }

/* The hero's eyebrow is a whole sentence naming iPhone: written as it is,
   not in capitals (Sarah, 18 Oct 2026). */
.eyebrow-sentence { text-transform: none; letter-spacing: 0.02em; font-size: 0.95rem; }

.visually-hidden, .hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--moss);
  color: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--moss);
  text-decoration: none;
}
.header-cta {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--moss);
  border-radius: 999px;
  text-align: center;
}
.header-cta:hover { background: var(--moss); color: var(--cream); }

/* --- Sections ------------------------------------------------------------- */
main > section { padding: clamp(3rem, 8vw, 5.5rem) var(--gutter); }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding-top: clamp(1.5rem, 4vw, 3rem) !important;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero .lead { margin-bottom: 2rem; max-width: 34rem; }
.hero-art { max-height: 560px; width: auto; justify-self: center; }

.on-this-day { background: var(--stone); }
.otd-card {
  max-width: 34rem;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(42, 46, 38, 0.06), 0 8px 24px rgba(42, 46, 38, 0.06);
  border-left: 4px solid var(--clay);
}
.otd-greeting { font-size: 1.5rem; font-style: italic; font-weight: 400; margin-bottom: 1.1rem; }
.otd-layout {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.otd-text .otd-greeting { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.otd-text p:last-child { font-size: 1.1rem; }
@media (max-width: 760px) {
  .otd-layout { grid-template-columns: 1fr; text-align: center; }
  /* .otd-layout raises specificity: the later ".phone { margin: 0 }" otherwise
     wins and the phone sits flush left (seen on Sarah's iPhone, 18 Oct 2026). */
  .otd-layout .otd-phone { width: 100%; max-width: 280px; margin: 0 auto; justify-self: center; }
}
.otd-card ul { list-style: none; display: grid; gap: 0.9rem; }
.otd-card li { display: flex; align-items: center; gap: 0.9rem; }
.otd-card li img { flex: none; width: 44px; height: 44px; object-fit: contain; }

.features, .keep, .signup { text-align: center; }
.features > *, .keep > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}
.feature-grid img { width: 88px; height: 88px; object-fit: contain; margin-bottom: 0.75rem; }
.feature-grid p { color: var(--mid); font-size: 1rem; }

.keep { background: var(--white); }
.keep-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  margin-top: 2.5rem;
}
.keep-grid li { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.keep-grid img { width: 110px; height: 110px; object-fit: contain; margin-bottom: 0.5rem; }
.keep-grid strong { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--moss); }
.keep-grid span { color: var(--mid); font-size: 0.95rem; }

.story {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
}
.story-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.story-photos img { border-radius: 14px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; height: 100%; }
.story-photos .wide { grid-column: span 2; aspect-ratio: 4 / 3; }
.story-text p { color: var(--mid); margin-bottom: 1rem; }
.signature { font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--moss) !important; }
/* Sarah's own words, set as a quote (26 Sept): Playfair italic is already
   loaded for the signature, so this costs no extra font file. */
.founder-quote { margin: 0 0 0.5rem; padding-left: 1.1rem; border-left: 3px solid var(--sage); }
.story-text .founder-quote p { font-family: var(--display); font-style: italic; font-size: 1.2rem; line-height: 1.6; color: var(--ink); }

.signup { background: var(--moss); color: var(--cream); }
.signup h2 { color: var(--cream); }
.signup .eyebrow { color: var(--stone); }
.signup .lead { color: var(--stone); }
.signup-form {
  display: flex;
  gap: 0.75rem;
  max-width: 32rem;
  margin: 2rem auto 0;
}
.signup-form input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0.75rem 1.1rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
}
.signup-form input[aria-invalid="true"] { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay); }
/* Ink on clay is 4.53:1; white on clay is only 3.06:1. */
.signup .button { background: var(--clay); color: var(--ink); }
.signup .button:hover { background: var(--claySoft); }
.form-status { min-height: 1.7em; margin-top: 1rem; font-weight: 400; }
.form-status.success { font-family: var(--display); font-size: 1.3rem; color: var(--cream); }
.form-status.error { color: var(--cream); font-weight: 700; }
.consent { max-width: 32rem; margin: 0.5rem auto 0; font-size: 0.9rem; color: var(--stone); }
.consent a { color: var(--cream); margin-left: 0.25rem; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--stone);
  text-align: center;
  padding: 2.25rem var(--gutter) 2.75rem;
  font-size: 0.9rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-bottom: 1rem; }
.site-footer a { color: var(--cream); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { text-decoration: underline; }

/* --- Narrow screens ------------------------------------------------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-art { max-height: 360px; order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .story { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand { font-size: 1.35rem; }
  .header-cta { font-size: 0.85rem; padding: 0.5rem 0.9rem; }
  .feature-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .keep-grid { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1rem; }
  .keep-grid img { width: 88px; height: 88px; }
  .signup-form { flex-direction: column; }
  /* Keep the headline on the first screen: the art is a garnish here. */
  .hero-art { max-height: 220px; }
  .hero { gap: 1.25rem; }
  .otd-card { padding: 1.4rem 1.25rem 1.25rem; }
}

/* --- Confirmed page (confirmed.html) -------------------------------------- */
.confirmed {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.confirmed img { width: 160px; height: auto; }
.confirmed .lead { margin-bottom: 1rem; }

/* --- FAQ -------------------------------------------------------------------- */
.faq { text-align: center; background: var(--white); }
.faq-list { max-width: 44rem; margin: 2rem auto 0; text-align: left; border-top: 1px solid var(--stone); }
.faq details { border-bottom: 1px solid var(--stone); }
.faq summary {
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  padding: 1rem 2.25rem 1rem 0;
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--moss);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--olive);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
.faq details p { color: var(--mid); padding: 0 0 1rem; }
.faq details p + p { margin-top: -0.5rem; }

/* Inside the app: six real screens in CSS phone frames (no device artwork,
   so nothing to license). The screenshots already carry the status bar and
   Dynamic Island; the frame only adds the bezel and the rounded corners.
   Three across, two rows, on wide screens: big enough to read (six in a
   row left each phone ~180px and the words a blur); a swipeable row with snap points on phones,
   scrolling inside its own box so the page itself never scrolls sideways. */
.screens { text-align: center; background: var(--stone); }
/* One plant's journey (18 Oct 2026): three phones, the same row as the screens. */
.journey { text-align: center; }
.journey > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.journey > .phone-row { max-width: 920px; }
.screens > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.screens > .phone-row { max-width: 920px; }
.phone-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.5rem;
  align-items: start;
}
.phone { margin: 0; }
.phone-frame {
  background: var(--ink);
  border-radius: 2.1rem;
  padding: 0.45rem;
  box-shadow: 0 18px 40px -22px rgba(42, 46, 38, 0.55);
}
.phone-frame img { border-radius: 1.7rem; width: 100%; }
.phone figcaption {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--moss);
  line-height: 1.35;
}
@media (max-width: 760px) {
  .phone-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 0 var(--gutter) 1rem;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    max-width: none;
  }
  .phone { flex: 0 0 62%; scroll-snap-align: center; }
}
@media (max-width: 480px) { .phone { flex-basis: 72%; } }
