/* ==========================================================================
   FullAccount — public site styles
   Restrained, institutional. One accent colour. System/serif fonts only,
   no third-party font requests. Mobile-first.
   ========================================================================== */

:root {
  /* Colour */
  --ink:         #16181d;   /* body text */
  --ink-muted:   #4a4f57;   /* secondary text  (AA on white) */
  --accent:      #1d3557;   /* deep navy — links, buttons, focus */
  --accent-dark: #14283f;   /* hover / header rule */
  --bg:          #ffffff;
  --bg-alt:      #f6f5f2;   /* warm off-white for alternating sections */
  --line:        #e2e1dc;   /* hairlines */
  --error:       #8a1c1c;   /* AA on white and on the card */

  /* Type */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
           "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --measure: 40rem;         /* readable line length */
  --gutter: 1.5rem;
}

/* --- Reset-ish ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* The [hidden] attribute must always win, even over elements we give display:flex. */
[hidden] { display: none !important; }
/* Fluid base size: text scales gently with viewport width, clamped within reason. */
html { -webkit-text-size-adjust: 100%; font-size: clamp(15px, 14.4px + 0.22vw, 17px); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.2rem; margin: 0 0 0.35em; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

/* --- Layout -------------------------------------------------------------- */
.container { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 48rem; }
.narrow p, .narrow li { max-width: var(--measure); }

.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__lede { font-size: 1.15rem; color: var(--ink-muted); }
.section__cta { margin-top: 2rem; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

/* --- Accessibility helpers ---------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* Visible focus everywhere. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.7rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* --- Primary nav --------------------------------------------------------- */
.site-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

/* --- Tool hero (homepage) ------------------------------------------------ */
/* On a large screen the whole hero sits above the fold, vertically centred in
   the space between header and footer. The homepage body is a flex column so
   <main> soaks up the leftover height; on small screens it stacks and may
   scroll, which is fine. */
.page-home { min-height: 100svh; display: flex; flex-direction: column; }
.page-home > main { flex: 1 0 auto; display: flex; }

.tool-hero {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding-block: clamp(1rem, 3vh, 2.25rem);
}
.tool-hero__inner {
  width: 100%;
  max-width: 64rem;          /* wider content pane */
  margin-inline: auto;
}
.tool-hero__lede { text-align: center; margin-bottom: 1.75rem; }
.tool-hero h1 { font-size: clamp(1.85rem, 1.3rem + 1.7vw, 2.5rem); line-height: 1.1; margin-bottom: 0.5rem; }
.tool-hero__sub {
  font-size: clamp(1.02rem, 0.98rem + 0.4vw, 1.18rem);
  color: var(--ink-muted);
  margin: 0 auto 1.15rem;
  max-width: 34rem;
}
.tool-hero__more { margin-top: 1rem; margin-bottom: 0; font-size: 0.96rem; }
.tool-hero .signup__card { text-align: left; }

/* Two columns once there's room: text beside the form, so it all fits above the fold. */
@media (min-width: 56rem) {
  .tool-hero__inner {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
  }
  .tool-hero__lede { text-align: left; margin-bottom: 0; }
  .tool-hero__sub { margin-inline: 0; }
}

/* --- Signup card --------------------------------------------------------- */
.signup__card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: clamp(1.25rem, 3vw, 1.6rem);
  box-shadow: 0 1px 2px rgba(20, 40, 63, 0.04);
}
.signup__title { font-size: 1.25rem; margin-bottom: 0.3rem; }
.signup__intro { color: var(--ink-muted); font-size: 0.95rem; margin-bottom: 0.9rem; }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.field__hint { font-size: 0.9rem; color: var(--ink-muted); margin: 0 0 0.4rem; }
.field input[type="email"],
.field input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.75rem;
  border: 1px solid #b9bcc2;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
.field input:focus-visible { border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--error); }
/* Placeholders show a realistic example beneath the visible label; keep them legible (AA). */
.field input::placeholder { color: #5b616a; opacity: 1; }

.field__error {
  color: var(--error);
  font-size: 0.9rem;
  margin: 0.4rem 0 0;
  font-weight: 600;
}

.linklike {
  display: inline-block;
  margin-top: 0.55rem;
  background: none; border: none; padding: 0;
  font: inherit; font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.linklike:hover { color: var(--accent-dark); }

/* Label row: field label on the left, fallback link right-aligned, tight above the input. */
.field__labelrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
.field__labelrow label { margin-bottom: 0; }
.field__labelrow .linklike { margin-top: 0; white-space: nowrap; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-size: 1.05rem;
  padding-block: 0.72rem;
}
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--primary:disabled { opacity: 0.65; cursor: progress; }
/* Inline variant for in-page CTAs (not the full-width form button). */
.btn--inline { width: auto; }
/* Light focus ring so it shows against the dark button fill. */
.btn--primary:focus-visible { outline-color: var(--accent-dark); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent); }

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--secondary:hover { background: var(--accent); color: #fff; }

.signup__legal { font-size: 0.82rem; color: var(--ink-muted); margin: 0.7rem 0 0; text-align: center; }
.signup__noscript { font-size: 0.95rem; margin-top: 1rem; }

/* Status region (confirmation / error after submit) */
.signup__status:not(:empty) { margin-top: 1.25rem; }
.status-box {
  border-radius: 4px;
  padding: 1rem 1.1rem;
  font-size: 0.98rem;
}
.status-box h3 { margin-bottom: 0.25rem; }
.status-box--ok    { background: #eef3ee; border: 1px solid #cde0cd; }
.status-box--error { background: #fbeeee; border: 1px solid #e6c7c7; color: var(--error); }
.status-box--error a { color: var(--error); }

/* --- Content lists ------------------------------------------------------- */
.pack-list, .tick-list, .steps { padding-left: 0; list-style: none; }

.pack-list li, .tick-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.7rem;
}
.pack-list li::before, .tick-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 0.55rem; height: 0.55rem;
  background: var(--accent);
  border-radius: 1px;
}

.steps { counter-reset: step; margin-top: 1.5rem; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.25rem;
  margin-bottom: 1.75rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700;
  color: #fff; background: var(--accent);
  border-radius: 50%;
}

.pullquote {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 0 4px 4px 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  max-width: var(--measure);
}

/* About page: reason blocks, divided by a hairline. */
.reason + .reason { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.reason h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); margin-bottom: 0.4rem; }
.reason p { margin-bottom: 0; }
.reason .pullquote { margin-top: 1.1rem; }
.reason .pack-list { margin-top: 0.75rem; margin-bottom: 0; }
.legal-note { color: var(--ink-muted); font-size: 0.9rem; margin-top: 1.75rem; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding-block: clamp(0.7rem, 1.5vh, 1.1rem);
}
/* Compact single row on wide screens (brand + note left, nav pushed right); wraps on mobile. */
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 1.25rem;
}
.site-footer__brand { font-family: var(--serif); font-weight: 700; font-size: 1rem; margin: 0; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: auto; }
.site-footer__nav a { font-size: 0.9rem; }

/* --- Legal pages (privacy / terms) -------------------------------------- */
.legal { padding-block: clamp(2.5rem, 7vw, 4rem); }
.legal h1 { margin-bottom: 0.75rem; }
.legal .updated { color: var(--ink-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.legal h2 { margin-top: 2.25rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.5rem; max-width: var(--measure); }
.legal a.back { display: inline-block; margin-bottom: 2rem; font-size: 0.95rem; }

/* --- Motion ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; }
