/* =========================================================================
   BabyPlanner design system (Step 2)
   Warm, trustworthy parenting style. Mobile-first. Big touch targets.
   No heavy animation. Accessible color contrast.
   ========================================================================= */

:root {
  /* Brand: teal = calm/trustworthy, amber = warm/friendly */
  --brand:        #0f766e;
  --brand-dark:   #115e59;
  --brand-soft:   #ccfbf1;
  --accent:       #d97706;   /* warm amber for highlights */
  --accent-soft:  #fef3c7;

  /* Neutrals */
  --bg:    #fbfaf7;          /* soft warm off-white */
  --card:  #ffffff;
  --text:  #1f2933;          /* high-contrast body text */
  --muted: #52606d;          /* passes AA on --bg */
  --line:  #e6e3dc;

  /* Feedback */
  --error:      #b91c1c;
  --error-soft: #fef2f2;
  --warn-soft:  #fff7ed;
  --warn-line:  #f59e0b;

  --radius:    14px;
  --radius-lg: 20px;
  --shadow:    0 4px 16px rgba(15, 23, 42, 0.06);
  --tap:       48px;         /* minimum touch target */
  --maxw:      960px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

h1, h2, h3 { line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(28px, 6vw, 40px); margin: 0 0 12px; }
h2 { font-size: clamp(22px, 4vw, 28px); margin: 32px 0 12px; }
h3 { font-size: 20px; margin: 22px 0 8px; }
p  { margin: 10px 0 16px; }

.lede { font-size: clamp(17px, 2.5vw, 20px); color: var(--muted); margin-top: 0; }

/* ---- Skip link (accessibility) ---------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-dark); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Header / nav ----------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner {
  display: flex; align-items: center; gap: 12px;
  padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand__mark { font-size: 24px; }
.brand__name { font-weight: 800; font-size: 20px; color: var(--brand-dark); }

.site-nav {
  display: flex; gap: 4px; flex: 1 1 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}
.site-nav a {
  white-space: nowrap; text-decoration: none; color: var(--muted);
  font-size: 15px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px;
}
.site-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }

@media (min-width: 760px) {
  .site-nav { flex: 0 1 auto; margin-left: auto; }
}

/* ---- Page shell ------------------------------------------------------- */
.page { padding-top: 22px; padding-bottom: 56px; }

/* ---- Breadcrumb ------------------------------------------------------- */
.breadcrumb { margin: 4px 0 14px; font-size: 14px; }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0; padding: 0;
}
.breadcrumb li:not(:last-child)::after { content: "›"; color: var(--muted); margin-left: 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---- Hero / page head ------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 22px; margin-bottom: 22px;
}
.hero h1 { margin-top: 0; }
.hero__sub { color: var(--muted); margin-bottom: 0; }
.page-head { margin-bottom: 18px; }

/* ---- Card grid (categories / related tools) --------------------------- */
.card-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .card-grid { grid-template-columns: 1fr 1fr 1fr; } }

.card-link {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); min-height: var(--tap);
}
.card-link:hover { border-color: var(--brand); color: var(--text); transform: translateY(-1px); }
.card-link__icon { font-size: 26px; }
.card-link__title { font-weight: 700; font-size: 18px; color: var(--brand-dark); }
.card-link__desc { color: var(--muted); font-size: 15px; }

/* ---- Calculator form -------------------------------------------------- */
.calc-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow);
  margin: 8px 0 22px;
}
.field { display: block; margin: 0 0 16px; }
.field__label { display: block; font-weight: 700; margin-bottom: 6px; }
.field__hint { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }

.field input,
.field select,
.field textarea {
  width: 100%; min-height: var(--tap);
  font-size: 17px; /* >=16px prevents iOS zoom */
  padding: 10px 14px;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--text);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* validation */
.field--error input, .field--error select { border-color: var(--error); }
.error-text { color: var(--error); font-size: 14px; margin-top: 4px; }

@media (min-width: 560px) {
  .form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 20px;
  font-size: 16px; font-weight: 700; line-height: 1;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--brand-dark); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* optional collapsible section inside a calculator form */
.calc-optional { border: 1px dashed var(--line); border-radius: var(--radius); padding: 4px 14px; margin: 4px 0 18px; }
.calc-optional > summary { cursor: pointer; font-weight: 700; padding: 10px 0; color: var(--brand-dark); }
.calc-optional[open] > summary { margin-bottom: 6px; }

/* ---- Result card ------------------------------------------------------ */
.result-card {
  background: var(--brand-soft); border: 1px solid var(--brand);
  border-radius: var(--radius-lg); padding: 20px; margin: 18px 0 24px;
}
.result-card__title { margin-top: 0; color: var(--brand-dark); }
.result-card__body { font-size: 18px; }
.result-card__text { display: none; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.actions__status { color: var(--brand-dark); font-size: 14px; font-weight: 600; }

/* ---- FAQ -------------------------------------------------------------- */
.faq__list { margin: 0; }
.faq__item { border-top: 1px solid var(--line); padding: 14px 0; }
.faq__q { font-weight: 700; font-size: 18px; }
.faq__a { margin: 6px 0 0; color: var(--muted); }
.faq__a > :first-child { margin-top: 0; }

/* ---- Disclaimer ------------------------------------------------------- */
.disclaimer {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-soft); border-left: 5px solid var(--warn-line);
  border-radius: var(--radius); padding: 14px 16px; margin: 22px 0;
}
.disclaimer p { margin: 0; }
.disclaimer__icon { font-size: 20px; line-height: 1.4; }

/* ---- Sources ---------------------------------------------------------- */
.sources__list { color: var(--muted); }
.sources__list li { margin: 6px 0; }

/* ---- Tables (used in content) ----------------------------------------- */
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--brand-soft); color: var(--brand-dark); }

/* ---- Misc content ----------------------------------------------------- */
.trust-list { list-style: none; padding: 0; }
.trust-list li { padding: 6px 0; font-size: 17px; }
.section-spacer { margin-top: 32px; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 22px; padding-bottom: 28px; }
.lang-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 14px; font-size: 14px; }
.lang-switcher__label { color: var(--muted); font-weight: 700; }
.lang-switcher a { color: var(--brand-dark); text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switcher a:hover { background: var(--brand-soft); }
.lang-switcher a[aria-current="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--brand-dark); text-decoration: underline; }
.footer-note { color: var(--muted); font-size: 14px; margin: 0; }

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card-link:hover { transform: none; }
}
