/* Habibi Care — soft blue Care (tokens from DESIGN-SYSTEM.md) */
:root {
  --bg: #eef3f8;
  --bg-wash: #e4ecf4;
  --ink: #2f363d;
  --ink-soft: #5c6670;
  --accent: #5b8fbf;
  --accent-hover: #4a7aa8;
  --btn-bg: #4a7aa8;        /* white text on this is 4.5:1 (AA) */
  --btn-bg-hover: #3d6f9c;
  --line: #d5dde6;
  --surface: #ffffff;
  --input-border: #7a8490;
  --error: #a3261b;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: min(100% - 2rem, 34rem);
  --radius-desk: 18px;
  --radius-input: 10px;
  --shadow-desk: 0 14px 40px rgba(47, 54, 61, .08);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg) linear-gradient(var(--bg-wash), var(--bg) 22rem) no-repeat;
  color: var(--ink);
  font: 1.03rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.page { width: var(--measure); margin-inline: auto; }
main.page { padding-block: 2.5rem 2rem; }
p { margin: 0 0 1rem; }

/* Links: ink text with a blue underline (blue text on the pale ground is under 4.5:1) */
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent-hover); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; }
h1 { font-size: clamp(1.75rem, 5.5vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 1.25rem; }
h2 { font-size: 1.15rem; line-height: 1.3; margin-bottom: .5rem; }
h3 { font-size: 1.05rem; line-height: 1.3; margin: 1.1rem 0 .25rem; }
h2:focus { outline: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; left: .75rem; top: -4rem; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-input); z-index: 100; text-decoration: none; }
.skip-link:focus { top: .75rem; }

/* Brand whisper: text + outline heart mark, no nav */
.brand { display: flex; align-items: center; gap: .6rem; font-size: .95rem; color: var(--ink-soft); margin-bottom: 2rem; }
.brand strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.brand-mark { color: var(--accent); flex: none; }



/* Desk card: the primary UI */
.desk {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-desk);
  box-shadow: var(--shadow-desk);
  padding: 1.4rem;
  margin-block: 0;
}
.helper { color: var(--ink-soft); margin: .35rem 0 0; }
.form { position: relative; display: grid; gap: 1rem; margin-top: 1.1rem; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--input-border); border-radius: var(--radius-input); padding: .7rem .8rem;
}
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--accent); outline: 3px solid var(--accent); outline-offset: 2px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.field .hint { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .4rem; }
.error, .form-error { color: var(--error); font-size: .9rem; font-weight: 500; margin: .3rem 0 0; }

/* Button: dedicated darker fill so white text meets AA 4.5:1; page --accent (links, focus, marks) unchanged. */
.btn {
  display: inline-block; font: inherit; font-size: 1.2rem; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none;
  background: var(--btn-bg); color: #fff; border: 1px solid var(--btn-bg);
  padding: .75rem 1.6rem; border-radius: 999px; cursor: pointer;
}
.btn:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.btn[disabled] { opacity: .65; cursor: progress; }
.form .btn { width: 100%; }
.success { margin-top: 1.1rem; }
.success[hidden] { display: none; }
.success h3 { margin-top: 0; }
.success p { margin: 0; }


.block { margin-top: 2.25rem; }
.block p:last-child { margin-bottom: 0; }

.site-footer { color: var(--ink-soft); font-size: .85rem; padding-bottom: 2.5rem; }
.site-footer p { margin: 0 0 .35rem; }
.foot-brand { display: flex; align-items: center; gap: .5rem; }
.site-footer a { color: var(--ink-soft); }
/* Facebook icon: same 24px size as the footer heart, quiet soft blue, darkens on hover */
.site-footer .fb-link { display: inline-flex; color: var(--accent); text-decoration: none; }
.site-footer .fb-link:hover { color: var(--accent-hover); }
.site-footer .page { padding-bottom: .5rem; }

/* 404 page: same soft-blue desk card as the homepage form, with a big serif 404 */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a.brand { text-decoration: none; }
a.brand:hover strong { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nf-body { min-height: 100vh; display: flex; flex-direction: column; }
.nf-body .site-footer { margin-top: auto; }
.nf-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-desk);
  box-shadow: var(--shadow-desk);
  padding: clamp(1.75rem, 6vw, 2.75rem) clamp(1.25rem, 5vw, 2rem);
  margin-top: clamp(1rem, 6vh, 3rem);
  text-align: center;
}
.nf-card h1 { margin: 0; }
.nf-code { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(6rem, 22vw, 11rem); line-height: 1; letter-spacing: -.04em; color: var(--accent); margin-bottom: 1rem; }
.nf-card p { max-width: 28rem; margin-inline: auto; }
.nf-card p:last-child { margin-bottom: 0; }

/* Honeypot: off-screen (class, so the CSP can forbid inline styles) */
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

@media (min-width: 30rem) { .form .btn { width: auto; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
