/* MATAY website. Colors follow the app's tokens (src/ui/theme.ts). */
:root {
  color-scheme: light dark;
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-soft: #F2EEE6;
  --text: #141B2D;
  --text-muted: #5A6275;
  --navy: #0E2340;
  --navy-light: #1A2F5C;
  --on-navy: #FFFFFF;
  --mist: #B9C1D3;
  --gold: #E9B949;
  --gold-ink: #3A2A06;
  --heart: #ED5464;
  --border: #E3DFD6;
  --danger: #B42318;
  --success: #1E7A4E;
  --focus: #1F3A68;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(14, 35, 64, .06), 0 12px 32px rgba(14, 35, 64, .08);
  --font: "IBM Plex Sans Hebrew", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1730;
    --surface: #13213F;
    --surface-soft: #1A2B4D;
    --text: #F2F4F8;
    --text-muted: #B9C1D3;
    --border: #263A63;
    --danger: #FF8A7A;
    --success: #6FD3A0;
    --focus: #F8DC8C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 10;
  background: var(--navy); color: var(--on-navy); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  text-decoration: none; font-weight: 500; color: var(--text-muted); border-radius: 12px;
}
.lang:hover { color: var(--text); background: var(--surface-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy); color: var(--on-navy); }
.btn-primary:hover { background: var(--navy-light); }
@media (prefers-color-scheme: dark) {
  .btn-primary { background: var(--gold); color: var(--gold-ink); }
  .btn-primary:hover { background: #F8DC8C; }
}
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; }

/* Google Play "coming soon" badge (not a link until launch) */
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 18px 8px 16px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none; direction: ltr;
  border: 1px solid #3a3a3a;
}
.store svg { width: 26px; height: 28px; flex: none; }
.store small { display: block; font-size: 11px; letter-spacing: .02em; opacity: .85; line-height: 1.2; }
.store strong { display: block; font-size: 19px; font-weight: 600; line-height: 1.2; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.store[aria-disabled="true"] { cursor: default; }

/* Hero */
.hero { position: relative; padding: 40px 0 64px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
}
.eyebrow img { width: 18px; height: 18px; }
h1 {
  margin: 0 0 16px; font-size: clamp(36px, 8vw, 60px); line-height: 1.12; letter-spacing: -.01em;
  text-wrap: balance; font-weight: 700;
}
h1 .accent { color: var(--heart); }
.lead { margin: 0 0 28px; font-size: clamp(17px, 2.4vw, 20px); color: var(--text-muted); max-width: 34em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cta-note { margin: 14px 0 0; font-size: 14px; color: var(--text-muted); }

.phone-stage { position: relative; justify-self: center; width: min(320px, 82vw); }
.phone {
  position: relative; aspect-ratio: 9 / 19.5; border-radius: 44px; padding: 10px;
  background: #0B1730; box-shadow: 0 30px 60px rgba(14, 35, 64, .25), inset 0 0 0 2px #2a3a5c;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 34px; background: #F4F5F8; }
.float { position: absolute; width: 22%; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(14, 35, 64, .18)); }
.float-cake { inset-inline-start: -10%; bottom: 14%; width: 30%; }
.float-gift { inset-inline-end: -10%; top: 10%; width: 26%; }
.float-heart { inset-inline-end: -6%; bottom: 4%; width: 16%; }
.float-star { inset-inline-start: -4%; top: 4%; width: 14%; }

/* Sections */
section { scroll-margin-top: 80px; }
.section { padding: 72px 0; }
.section-alt { background: var(--surface-soft); }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
h2 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 40px); line-height: 1.2; text-wrap: balance; }
.section-head p { margin: 0; color: var(--text-muted); }

.features { display: grid; gap: 20px; padding: 0; margin: 0; list-style: none; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.card img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 8px; }
h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.card p { margin: 0; color: var(--text-muted); }

.steps { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  background: var(--surface); border-radius: var(--radius); padding: 24px 24px 24px 24px; box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px;
  border-radius: 12px; background: var(--navy); color: var(--on-navy); font-weight: 700;
}
@media (prefers-color-scheme: dark) { .steps li::before { background: var(--gold); color: var(--gold-ink); } }
.steps p { margin: 4px 0 0; color: var(--text-muted); }

/* Signup */
.signup {
  position: relative; overflow: hidden; border-radius: 28px; padding: 40px 24px;
  background: linear-gradient(150deg, #0B1730 0%, #1A2F5C 100%); color: #fff; text-align: center;
}
.signup h2 { color: #fff; }
.signup > p { margin: 0 auto 24px; max-width: 34em; color: var(--mist); }
.signup .confetti { position: absolute; width: 44px; opacity: .9; pointer-events: none; }
.signup .c1 { top: 18px; inset-inline-start: 22px; }
.signup .c2 { bottom: 22px; inset-inline-end: 26px; }
.form { display: grid; gap: 12px; max-width: 480px; margin: 0 auto; text-align: start; }
.form label { font-weight: 600; font-size: 15px; }
.field-row { display: grid; gap: 12px; }
.form input[type="email"] {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 2px solid transparent;
  font: inherit; color: #141B2D; background: #fff;
}
.form input[type="email"]:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[dir="rtl"] .form input[type="email"]:placeholder-shown { text-align: right; }
.form input[aria-invalid="true"] { border-color: #FF8A7A; }
.form .btn { background: var(--gold); color: var(--gold-ink); min-height: 52px; }
.form .btn:hover { background: #F8DC8C; }
.form .btn[disabled] { opacity: .7; cursor: progress; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.6em; margin: 0; font-weight: 500; }
.form-msg.error { color: #FFB4A8; }
.form-msg.ok { color: #9BE7BE; }
.fine { margin: 4px 0 0; font-size: 14px; color: var(--mist); }
.fine a { color: #fff; }

/* Footer */
.site-footer { padding: 40px 0 48px; color: var(--text-muted); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: none; border-radius: 10px; }
.footer-links a:hover { color: var(--text); background: var(--surface-soft); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* Scroll reveal (only when motion is allowed and JS ran) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s ease-out, transform .45s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr auto; }
  .signup { padding: 56px 40px; }
}
@media (min-width: 900px) {
  .hero { padding: 56px 0 88px; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .phone-stage { width: 330px; }
  .float-cake { inset-inline-start: -18%; width: 34%; }
  .float-gift { inset-inline-end: -16%; width: 30%; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
  .footer-bottom { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
