/* Wel-Tea — Pour Into You.
   Shared styles. Colours follow docs/ARCHITECTURE.md section 4 (all pairs
   checked for WCAG 2.2 AA contrast). Pink #E85D8A is for shapes only, never
   for text; pink text uses #B8336A. */

:root {
  color-scheme: light;
  --ink: #1F2433;
  --slate: #555B6E;
  --navy: #1B2A4A;
  --navy-700: #2A3D66;
  --pink: #E85D8A;
  --pink-text: #B8336A;
  --blush: #FFF4F8;
  --lilac: #F3EFFA;
  --field: #8A90A2;
  --error: #B42318;
  --error-bg: #FEF3F2;
  --white: #FFFFFF;
  --ombre: linear-gradient(160deg, #1B2A4A 0%, #5B3A7A 55%, #C2407A 100%);
  --ombre-light: linear-gradient(135deg, #FFF4F8 0%, #F3EFFA 100%);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --radius-field: 10px;
  --radius-button: 12px;
  --radius-panel: 18px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: 2rem; letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

a { color: var(--navy); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pink-text); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--pink-text);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] { display: none !important; }

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

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 10;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-button);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 16px; color: var(--white); }

/* ---------------------------------------------------------------------------
   Page shell: an ombré brand panel beside (desktop) or above (mobile) the page.
   --------------------------------------------------------------------------- */
.shell {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 1fr;
}

.brand {
  background: var(--ombre);
  color: var(--white);
  padding: 18px 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "mark art" "words art";
  align-items: center;
  column-gap: 16px;
}
.brand > .wordmark { grid-area: mark; justify-self: start; }
.brand > .brand-art { grid-area: art; }
.brand > .brand-words { grid-area: words; }

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.wordmark:hover { color: var(--white); text-decoration: underline; }
.brand :focus-visible { outline-color: var(--white); }

.slogan {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  margin: 2px 0 0;
  color: var(--white);
}

.brand-art {
  width: 72px;
  height: auto;
  color: var(--white);
  flex: 0 0 auto;
}
.brand-art .heart { fill: var(--pink); }

.main {
  padding: 32px 16px 48px;
  display: flex;
  justify-content: center;
}
/* The skip link moves focus here; the main area itself isn't a control. */
.main:focus { outline: none; }

.panel {
  width: 100%;
  max-width: 30rem;
}

.lede { color: var(--slate); }

@media (min-width: 900px) {
  .shell { grid-template-columns: minmax(320px, 5fr) 7fr; }
  .brand {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "mark" "art" "words";
    align-items: start;
    row-gap: 24px;
    padding: 40px 48px 48px;
    min-height: 100vh;
    position: sticky;
    top: 0;
  }
  .brand > .brand-art { width: min(100%, 280px); align-self: center; justify-self: center; }
  .slogan { font-size: clamp(2.25rem, 3.6vw, 3.25rem); line-height: 1.08; margin: 0; }
  .brand-note { font-size: 1rem; max-width: 22rem; margin: 14px 0 0; opacity: 0.95; }
  .main { align-items: center; padding: 64px 48px; }
}

@media (max-width: 899px) {
  .brand-note { display: none; }
}

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */
.form { display: grid; gap: 20px; margin-top: 8px; }

.field { display: grid; gap: 6px; }

.field label, .label {
  font-weight: 600;
  color: var(--navy);
}

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

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--field);
  border-radius: var(--radius-field);
}
.input:focus-visible { outline: 3px solid var(--pink-text); outline-offset: 1px; border-color: var(--navy); }
.input[aria-invalid="true"] { border-color: var(--error); }

.input--code {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
  max-width: 12rem;
}

.password-row { display: flex; gap: 8px; }
.password-row .input { flex: 1 1 auto; min-width: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius-button);
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.button:hover { background: var(--navy-700); border-color: var(--navy-700); color: var(--white); }
.button:disabled, .button[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.button--block { width: 100%; }

.button--quiet {
  background: var(--white);
  color: var(--navy);
}
.button--quiet:hover { background: var(--lilac); color: var(--navy); border-color: var(--navy); }

.button--small { min-height: 44px; padding: 8px 14px; font-size: 0.9375rem; }

.button--danger { background: var(--white); color: var(--error); border-color: var(--error); }
.button--danger:hover { background: var(--error-bg); color: var(--error); border-color: var(--error); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.link-button:hover { color: var(--pink-text); text-decoration-thickness: 2px; }

.links { display: grid; gap: 10px; margin-top: 24px; }
.links p { margin: 0; }

/* Password guidance: a live checklist, not a blocker. */
.rules { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; font-size: 0.9375rem; color: var(--slate); }
.rules li { display: flex; gap: 8px; align-items: baseline; }
.rules li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.75em; height: 0.75em;
  border: 2px solid var(--field);
  border-radius: 50%;
  transform: translateY(0.05em);
}
.rules li.met { color: var(--navy); }
.rules li.met::before { background: var(--pink); border-color: var(--pink); }

/* hCaptcha container keeps its space so the page doesn't jump. */
.captcha { min-height: 78px; }
.captcha-note { font-size: 0.875rem; color: var(--slate); margin: 0; }

/* ---------------------------------------------------------------------------
   Messages
   --------------------------------------------------------------------------- */
.notice {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-field);
  border-left: 4px solid var(--pink);
  background: var(--lilac);
  color: var(--navy);
}
.notice + .notice { margin-top: 12px; }
.notice--error { background: var(--error-bg); border-left-color: var(--error); color: var(--error); }
.notice--success { background: var(--blush); border-left-color: var(--pink); color: var(--navy); }
.notice strong { font-weight: 700; }
.notice-area:empty { display: none; }
.notice-area { display: grid; gap: 12px; }

.callout {
  padding: 20px;
  border-radius: var(--radius-panel);
  background: var(--ombre-light);
  color: var(--navy);
}
.callout > :last-child { margin-bottom: 0; }

/* Account summary rows */
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid #E4E1EC; }
.facts > div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid #E4E1EC; }
.facts dt { font-weight: 600; color: var(--navy); }
.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.section { margin-top: 36px; }

.plain-list { margin: 0; padding-left: 1.2em; }

/* Authenticator set-up */
.qr {
  display: block;
  width: 200px;
  height: 200px;
  background: var(--white);
  border: 1px solid #E4E1EC;
  border-radius: var(--radius-field);
  padding: 8px;
}
.secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  background: var(--lilac);
  color: var(--navy);
  padding: 8px 12px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  display: inline-block;
}
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 18px; }

.factor { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #E4E1EC; }
.factor p { margin: 0; }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.footer {
  flex: 0 0 auto;
  padding: 18px 16px;
  font-size: 0.9375rem;
  color: var(--slate);
  border-top: 1px solid #E4E1EC;
  text-align: center;
}
.footer p { margin: 0; }

@media (min-width: 900px) {
  .footer { text-align: left; padding: 18px 48px; }
}

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