/* ---------------------------------------------------------------------------
   Three Hearts Support — front page for my.threeheartssupport.co.uk

   Built to the Brand Toolkit v1.0 (August 2026):
     - Cream leads. Navy and sage are accents, not default backgrounds.
     - Alternate the bands so neither navy nor cream dominates.
     - Playfair Display 700 for headings, 500 italic for the pull quote.
       Never for body copy.
     - Nunito 400 body, 700 labels, 800 for the wordmark.
     - Small sage text on cream FAILS contrast — sage dark #5F6B39 for labels.

   Grounding §8 is stricter than the toolkit on body size (18px vs 16-17px)
   because the readers are 50-70 and the people supported are 75+. The
   stricter number wins. Everything sizes in rem so 200% text scaling works.

   No external origin anywhere: fonts are vendored (D-006). Single deliberate
   light theme — the brand IS cream and navy — so every colour is painted
   explicitly rather than inherited from the host.
   --------------------------------------------------------------------------- */

:root {
  --navy:        #1C2E4A;
  --navy-dark:   #16243B;
  --sage:        #7E8C4F;
  --sage-light:  #A4B06B;
  --sage-dark:   #5F6B39;   /* labels under ~10pt — sage itself fails on cream */
  --cream:       #F5F2E9;
  --cream-lt:    #F8F6EF;
  --sage-tint:   #EDEFE2;
  --ink:         #3A3E33;
  --ink-muted:   #5A5E4F;
  --on-navy:     #F7F5EC;
  --body-navy:   #D7DAE0;
  --border:      #EAE7D8;

  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --ui: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --tap: max(2.75rem, 44px);
  --measure: 34rem;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1.125rem;          /* 18px floor, grounding §8 */
  font-weight: 400;
  line-height: 1.65;
}

.wrap { padding-inline: 1.25rem; margin-inline: auto; max-width: 46rem; }
.prose { max-width: var(--measure); margin-inline: auto; }

h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
  text-wrap: balance;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(1.9rem, 7vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.8rem); }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; color: var(--navy); }

a { color: var(--sage-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--sage-dark);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--navy); color: var(--on-navy);
  padding: 0.75rem 1rem; border-radius: 4px; text-decoration: none;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

main:focus { outline: none; }

/* ---------- masthead ---------- */

.masthead { background: var(--cream); padding: 2rem 0 1.5rem; }

.lockup { display: flex; align-items: center; gap: 0.85rem; }

/* Toolkit: never below 40px on screen. Clear space = height of one heart. */
.mark { width: 3.5rem; height: 3.5rem; flex: none; display: block; }
.mark-sm { width: 2.75rem; height: 2.75rem; margin-bottom: 0.9rem; }

.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark-name {
  font-family: var(--ui); font-weight: 800;
  font-size: 1.4rem; color: var(--navy); letter-spacing: -0.005em;
}
.wordmark-sub {
  font-family: var(--ui); font-weight: 700;
  font-size: 0.85rem; color: var(--sage-dark);
  text-transform: uppercase; letter-spacing: 0.22em;
}

/* ---------- bands ---------- */

section { padding: 2.75rem 0; }

.hero { background: var(--cream); padding-top: 1.5rem; }
.band { background: var(--cream); border-top: 1px solid var(--border); }
.soon { background: var(--sage-tint); }
.boundary { background: var(--cream-lt); border-top: 1px solid var(--border); }

.eyebrow {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--sage-dark);
  margin: 0 0 0.6rem;
}
.eyebrow-quiet { color: var(--ink-muted); }

.lede { font-size: 1.22rem; line-height: 1.55; color: var(--ink); }

.note {
  margin-top: 1.6rem; font-size: 1rem; color: var(--ink-muted);
}

.boundary p:not(.eyebrow) { font-size: 1rem; color: var(--ink-muted); }

/* ---------- pull quote ---------- */

.quote { background: var(--navy); padding: 3rem 0; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--display);
  font-weight: 500; font-style: italic;
  font-size: clamp(1.45rem, 5.5vw, 2rem);
  line-height: 1.35;
  color: var(--on-navy);
  margin: 0 0 1rem;
  text-wrap: balance;
}
.quote cite {
  font-family: var(--ui); font-style: normal;
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--sage-light);
}

/* ---------- items ---------- */

.items { margin: 1.75rem 0 0; padding: 0; }
.item { padding: 1.15rem 0; border-top: 1px solid var(--border); }
.item:first-child { border-top: 2px solid var(--sage); }

.items dt {
  font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--sage-dark);
  margin-bottom: 0.3rem;
}
.items dd { margin: 0; color: var(--ink); }

/* ---------- footer ---------- */

footer {
  background: var(--navy-dark);
  color: var(--body-navy);
  padding: 2.75rem 0 3.25rem;
}
.foot-name {
  font-family: var(--ui); font-weight: 800;
  font-size: 1.15rem; color: var(--on-navy);
  margin: 0 0 1rem;
}
.contact { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.contact li { margin-bottom: 0.15rem; }
.contact a {
  color: var(--on-navy);
  display: inline-flex; align-items: center;
  min-height: var(--tap);            /* 44px targets — unsteady hands */
  text-decoration-color: var(--sage-light);
}
.contact a:hover { color: var(--sage-light); }
footer :focus-visible { outline-color: var(--sage-light); }

.areas { font-size: 0.95rem; color: var(--body-navy); margin: 0 0 0.9rem; }
.strap {
  font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--sage-light); margin: 0;
}

/* ---------- wider viewports (mobile-first: min-width only) ---------- */

@media (min-width: 40em) {
  section { padding: 3.75rem 0; }
  .masthead { padding: 2.75rem 0 2rem; }
  .mark { width: 4.25rem; height: 4.25rem; }
  .wordmark-name { font-size: 1.7rem; }
  .wordmark-sub { font-size: 0.9rem; }
  .quote { padding: 4.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
   Sign-in preview screens (/sign-in/…)

   NOT the real sign-in. M3 (authentication) has not been built. These are the
   designed states, served on the real domain so they can be judged on a real
   phone at real size — which a canvas cannot tell you.

   The inputs are deliberately live: the point of putting this on a phone is to
   feel the numeric keypad, the tap targets and the text size. Nothing submits —
   the Caddy site sends `form-action 'none'`, so the browser refuses to post
   anywhere regardless of what the markup says.
   --------------------------------------------------------------------------- */

.screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}
.screen > .wrap { width: 100%; }

/* A little more room at the sides than the front page uses. A form is read and
   touched rather than just read: full-width inputs and buttons sitting 20px
   from the glass feel cramped, and a thumb reaching the edge of a field is
   more likely to miss it. */
.screen .wrap { padding-inline: 1.5rem; }

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

.screen-head { padding: 1.75rem 0 0.5rem; }
.screen-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0 1.75rem;
}
.card-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  flex-grow: 1;
}

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-weight: 700; color: var(--navy); font-size: 1.125rem; }
.field input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
  font-family: var(--ui);
  font-size: 1.125rem;              /* 18px — also stops iOS zooming on focus */
  line-height: 1.4;                 /* explicit: iOS centres text oddly without it */
  color: var(--ink);
  background: var(--cream-lt);
  border: 2px solid var(--ink-muted);
  border-radius: 10px;

  /* Without this, iOS Safari paints its OWN chrome over the rule above — an
     inset shadow along the top edge and its own corner radius — and the field
     ends up looking sunken and grey instead of the clean bordered box the
     design asks for. It is the single biggest difference between a form that
     looks designed and one that looks default. */
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 120ms ease;
}

/* Browser-default placeholders are far too light — typically around 2.5:1,
   which fails AA outright and reads as a broken field to anyone over 60.
   ink-muted on cream-light is 6.17:1. */
.field input::placeholder {
  color: var(--ink-muted);
  opacity: 1;                       /* Firefox dims placeholders by default */
}
.field input:hover { border-color: var(--navy); }
.field input.code {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  padding-inline: 0.5rem;
}
.field input:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 3.25rem; padding: 0.6rem 1.5rem;
  font-family: var(--ui); font-size: 1.125rem; font-weight: 700;
  border-radius: 10px; border: 2px solid var(--navy);
  background: var(--navy); color: var(--on-navy);
  cursor: pointer;

  /* Some of these are <a> elements. Without this they inherit the page's link
     rules and render underlined, which is exactly what makes a button stop
     looking like a button. */
  text-decoration: none;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease, color 120ms ease;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--on-navy); }
.btn--secondary { background: transparent; color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--on-navy); }

.sent-to, .callout {
  background: var(--cream-lt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.callout { background: var(--sage-tint); border-color: transparent; }
.sent-to .addr {
  font-size: 1.25rem; font-weight: 700; color: var(--navy);
  margin: 0; word-break: break-all; line-height: 1.35;
}
.sent-to a { font-weight: 700; }
.callout p, .sent-to p { margin: 0; }
.sent-to .eyebrow, .callout .eyebrow { margin: 0; }
.spacer { flex-grow: 1; }

/* The honesty strip. Quiet, brand-consistent, and always last. */
.preview-bar {
  background: var(--navy-dark);
  color: var(--body-navy);
  padding: 1.1rem 0 1.4rem;
  font-size: 1rem;
}
.preview-bar strong { color: var(--on-navy); display: block; margin-bottom: 0.5rem; }
.preview-bar nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.7rem; }
.preview-bar a {
  color: var(--sage-light); font-weight: 700;
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.preview-bar a[aria-current="page"] { color: var(--on-navy); text-decoration: none; }
.preview-bar :focus-visible { outline-color: var(--sage-light); }

@media (min-width: 46em) {
  /* Desktop: a centred card, not a form stretched across a monitor. */
  .screen { background: var(--cream); }
  .screen-body { padding-bottom: 3rem; }
  .screen .card-wrap {
    max-width: 32rem; margin-inline: auto; width: 100%;
    background: var(--cream-lt);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(28, 46, 74, 0.06);
  }
}
