/* =====================================================================
   BRAND TOKENS – Machzorit brand identity v3 (brand-sources/brand-identity.md). Change the look here.
   ===================================================================== */
@font-face {
  font-family: 'Rubik';
  src: url('/fonts/rubik-hebrew-latin.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Frank Ruhl Libre';
  src: url('/fonts/frank-ruhl-libre-hebrew-latin.woff2') format('woff2');
  font-weight: 500 700; font-style: normal; font-display: swap;
}
:root {
  /* brand (brand-identity.md v3 "burgundy & coral") */
  --mz-primary: #7A2233;          /* burgundy */
  --mz-primary-hover: #5E1726;
  --mz-accent: #E8735E;           /* coral – decoration / background with dark text only, never text on light */
  --mz-accent-text: #B5432F;      /* dark coral – safe for text (5.13:1 on bg) */
  --mz-rose-soft: #F8E1DC;
  --mz-deep: #4A1520;             /* night burgundy – footer */
  --mz-on-dark: #FBF6EF;
  --mz-ring-on-dark: #F0B3A8;

  /* cycle phases – visual language only, not a medical claim; always paired with a text label */
  --mz-phase-menstrual: #E8735E;  /* coral */
  --mz-phase-follicular: #F0B3A8; /* blush – fill only */
  --mz-phase-ovulation: #C23B4A;  /* crimson */
  --mz-phase-luteal: #7A2233;     /* burgundy */

  /* base */
  --mz-bg: #FBF6EF;
  --mz-surface: #FFFFFF;
  --mz-text: #2D2926;
  --mz-text-muted: #665D56;
  --mz-border: #E8DED3;

  /* states */
  --mz-success: #2F7A4F;
  --mz-warning: #9A5B0E;
  --mz-error: #C62828;            /* distinct from burgundy; always shown with icon + text */
  --mz-focus-ring: 0 0 0 3px rgba(122, 34, 51, 0.35); /* brand spec; soft ring alone is too faint, so we add --mz-focus-outline */
  --mz-focus-outline: 3px solid #7A2233;              /* 9.98:1 on white, 9.28:1 on bg – WCAG 1.4.11 */
  --mz-field-border: #8C6B6F;                         /* 4.39:1 on bg, 4.72:1 on white – WCAG 1.4.11 (#E8DED3 is for dividers only) */

  /* typography */
  --mz-font-heading: 'Frank Ruhl Libre', 'David Libre', Georgia, serif;
  --mz-font-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mz-fs-h1: clamp(2rem, 5vw + .5rem, 3.25rem);
  --mz-fs-h2: clamp(1.5rem, 3.5vw + .5rem, 2.25rem);
  --mz-fs-h3: 1.25rem;
  --mz-fs-body: 1.0625rem;
  --mz-fs-small: 0.875rem;
  --mz-lh-body: 1.7;
  --mz-lh-heading: 1.25;

  /* shape */
  --mz-radius-sm: 10px;
  --mz-radius-md: 16px;
  --mz-radius-lg: 28px;
  --mz-radius-pill: 999px;
  --mz-shadow: 0 6px 24px rgba(74, 21, 32, 0.08);

  --maxw: 1040px;
  --maxw-narrow: 660px;
}

*, *::before, *::after { box-sizing: border-box; }
html { direction: rtl; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--mz-bg); color: var(--mz-text);
  font-family: var(--mz-font-body); font-size: var(--mz-fs-body); line-height: var(--mz-lh-body);
}
h1, h2, h3 { font-family: var(--mz-font-heading); font-weight: 700; line-height: var(--mz-lh-heading); margin: 0 0 .55em; }
h1 { font-size: var(--mz-fs-h1); color: var(--mz-primary); }
h2 { font-size: var(--mz-fs-h2); }
h3 { font-size: var(--mz-fs-h3); }
p { margin: 0 0 1em; }
a { color: var(--mz-primary); }
:focus-visible { outline: var(--mz-focus-outline); outline-offset: 2px; box-shadow: var(--mz-focus-ring); }

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

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--mz-surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(251, 246, 239, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--mz-border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; height: 40px; width: auto; } /* logo = public/logo.svg (footer: logo-on-dark.svg) */

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 12px 26px; border: 0; border-radius: var(--mz-radius-pill); cursor: pointer;
  background: var(--mz-primary); color: #fff; box-shadow: var(--mz-shadow);
  font: inherit; font-weight: 500; text-decoration: none; transition: background .15s;
}
.btn:hover, .btn:active { background: var(--mz-primary-hover); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-small { min-height: 42px; padding: 8px 16px; font-size: .95rem; box-shadow: none; }
.btn-block { width: 100%; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 64px; background: linear-gradient(180deg, var(--mz-rose-soft) 0%, var(--mz-bg) 100%); }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mz-font-heading); font-weight: 500; font-size: 1.2rem; color: var(--mz-primary-hover); margin-bottom: .8em; }
.eyebrow::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--mz-accent); box-shadow: 18px 0 0 var(--mz-phase-ovulation), 36px 0 0 var(--mz-primary); margin-inline-start: 36px; }
.hero .lead { font-size: 1.2rem; color: var(--mz-text-muted); max-width: 34em; margin-bottom: 1.6em; }

.section { padding: 56px 0; }
.section.alt { background: var(--mz-rose-soft); }

/* life stages – colour is decoration only; every card has its own heading */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { position: relative; background: var(--mz-surface); border-radius: var(--mz-radius-md); padding: 24px 22px 22px; box-shadow: var(--mz-shadow); border-top: 6px solid var(--stage); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card h3::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--stage); box-shadow: inset 0 0 0 1px rgba(45, 41, 38, .25); flex: none; }
.card p { margin: 0; color: var(--mz-text-muted); }
.stage-1 { --stage: var(--mz-phase-ovulation); }
.stage-2 { --stage: var(--mz-phase-follicular); }
.stage-3 { --stage: var(--mz-phase-menstrual); }
.stage-4 { --stage: var(--mz-phase-luteal); }

/* features */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.features li { position: relative; background: var(--mz-surface); border-radius: var(--mz-radius-sm); padding: 14px 44px 14px 18px; border: 1px solid var(--mz-border); }
.features li::before { content: ''; position: absolute; inset-inline-start: 18px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--mz-accent); }
.features strong { color: var(--mz-text); font-weight: 700; }

/* privacy */
.privacy { text-align: center; }
.privacy .wrap { background: var(--mz-surface); border-radius: var(--mz-radius-lg); padding: 36px 24px; box-shadow: var(--mz-shadow); border: 1px solid var(--mz-border); }
.privacy p { font-size: 1.15rem; color: var(--mz-text-muted); margin: 0; }

/* form */
.form { background: var(--mz-surface); border: 1px solid var(--mz-border); border-radius: var(--mz-radius-md); padding: 24px 22px; margin-top: 20px; box-shadow: var(--mz-shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--mz-text-muted); }
.field input[type=text], .field input[type=email] {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: inherit;
  background: var(--mz-bg); border: 1px solid var(--mz-field-border); border-radius: var(--mz-radius-sm);
}
.field input:focus-visible { border-color: var(--mz-primary); }
.field input[type=email] { text-align: right; }
.field input[aria-invalid=true] { border-color: var(--mz-error); box-shadow: inset 0 0 0 1px var(--mz-error); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 4px 0 0; flex: none; accent-color: var(--mz-primary); }
.check label { font-weight: 400; margin: 0; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.turnstile { min-height: 65px; margin-bottom: 12px; }
.fineprint { font-size: var(--mz-fs-small); color: var(--mz-text-muted); margin: 14px 0 0; line-height: 1.6; }
.status { margin: 12px 0 0; font-weight: 500; min-height: 1.5em; display: flex; gap: 8px; align-items: flex-start; }
/* status never relies on colour alone: icon + text (WCAG 1.4.1) */
.status.ok::before, .status.err::before { content: ''; flex: none; width: 20px; height: 20px; margin-top: .2em; background: no-repeat center / contain; }
.status.ok::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%232F7A4F'/%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.status.err::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.5L19 18H1z' fill='%23C62828' stroke='%23C62828' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M10 7v5' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.8' r='1.2' fill='%23fff'/%3E%3C/svg%3E"); }
.status.ok { color: var(--mz-success); }
.status.err { color: var(--mz-error); }

/* faq */
.faq details { background: var(--mz-surface); border: 1px solid var(--mz-border); border-radius: var(--mz-radius-sm); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 500; }
.faq summary::marker { color: var(--mz-primary); }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--mz-text-muted); }

/* footer */
.site-footer { padding: 40px 0 48px; background: var(--mz-deep); color: var(--mz-on-dark); font-size: .95rem; }
.site-footer a { color: var(--mz-on-dark); }
.site-footer :focus-visible { outline-color: var(--mz-on-dark); }
.site-footer .footer-logo { display: block; height: 44px; width: auto; margin-bottom: 14px; }
.site-footer .slogan { font-family: var(--mz-font-heading); font-size: 1.4rem; font-weight: 500; margin-bottom: .8em; }
.disclaimer { border-inline-start: 4px solid var(--mz-accent); padding: 4px 14px; }
.copy { margin: 0; opacity: .9; }

/* simple message pages (404, unsubscribe) */
.message-page { min-height: 70vh; display: flex; align-items: center; }
.message-page .logo img { height: 48px; margin-bottom: 24px; }

@media (min-width: 720px) {
  .hero { padding: 96px 0 96px; }
    .section { padding: 80px 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
