/* Mila Tova public website — shared styles.
   Spec: design/mila-tova-website/HANDOFF-website.md (+ design/mila-tova-teachers/HANDOFF-design.md §2).
   Page-specific layout stays inline in each page, as in the design files. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fdf6ee; font-family: 'Nunito', system-ui, sans-serif; color: #4b4038; }
a { color: #6a50a6; }
a:hover { color: #4c3585; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #7559ad; outline-offset: 3px; border-radius: 12px; }
img, svg { flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; 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: 12px; top: -60px; z-index: 50; padding: 10px 18px; border-radius: 999px; background: #7559ad; color: #fff; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

.page { position: relative; overflow: hidden; overflow: clip; min-height: 100vh; display: flex; flex-direction: column; }
.page > main { position: relative; z-index: 2; flex: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.font-baloo { font-family: 'Baloo 2', sans-serif; }

/* Decorative sky clouds (pill + circles) */
.sky-decor { position: absolute; left: 0; right: 0; top: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.sky-decor > div { position: absolute; }
.sky-decor > div > i { position: absolute; display: block; background: #fff; border-radius: 50%; }
.sky-decor > div > i:first-child { left: 0; bottom: 0; width: 100%; border-radius: 999px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(226,240,252,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.6); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; }
.wordmark { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 30px; line-height: 1; color: #7559ad; text-decoration: none; }
.wordmark:hover { color: #7559ad; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 800; font-size: 16px; color: #4b4038; text-decoration: none; }
.nav-link:hover { background: rgba(255,250,243,.85); color: #4c3585; }
.nav-link[aria-current="page"] { background: #fffaf3; color: #4c3585; }
.burger { display: none; width: 46px; height: 46px; place-items: center; border: none; border-radius: 50%; background: #fffaf3; box-shadow: 0 4px 12px rgba(96,128,178,.16); }
.menu-panel { padding-bottom: 14px; }
.menu-panel > div { display: flex; flex-direction: column; padding: 8px; border-radius: 24px; background: #fffaf3; box-shadow: 0 16px 34px rgba(70,92,140,.20); }
.menu-row { display: flex; align-items: center; min-height: 52px; padding: 0 16px; border-radius: 16px; font-weight: 800; font-size: 18px; color: #4b4038; text-decoration: none; }
.menu-row:hover { background: #f3ecfb; color: #4b4038; }
.menu-row[aria-current="page"] { background: #f3ecfb; color: #4c3585; }
@media (max-width: 720px) { .nav-links { display: none; } .burger { display: inline-grid; } }
@media (min-width: 721px) { .menu-panel { display: none !important; } }

/* Footer */
.site-footer { position: relative; z-index: 2; background: #fff3e8; border-top: 1px solid rgba(122,102,92,.12); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 22px 40px; padding-top: 36px; padding-bottom: 36px; }
.site-footer .nav-link { font-size: 15px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: none; border-radius: 999px; font-family: 'Baloo 2', sans-serif; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:disabled:hover { transform: none; filter: none; }
.btn-primary { background: #7559ad; color: #fff; box-shadow: 0 10px 22px rgba(117,89,173,.28); }
.btn-primary:hover { color: #fff; }
.btn-primary:disabled { background: #9a86c6; }
.btn-secondary { background: #fff; border: 2px solid #e4d8f6; color: #4c3585; }
.btn-secondary:hover { color: #4c3585; }
.btn-cream { background: #fffaf3; }
.btn-sm { min-height: 46px; padding: 0 22px; font-size: 18px; box-shadow: 0 8px 18px rgba(117,89,173,.26); }
.btn-md { min-height: 56px; padding: 0 30px; font-size: 20px; }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 21px; }
.link-btn { min-height: 44px; padding: 0; border: none; background: transparent; color: #6a50a6; font-weight: 800; font-size: 16px; text-decoration: underline; }
.link-btn:hover { color: #4c3585; }

/* Type */
.h1 { margin: 0; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.06; text-wrap: balance; }
.h2 { margin: 0; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: #5e5249; }
.muted { color: #6f6258; }
.body-2 { color: #5e5249; }

/* Cards */
.card { border-radius: 36px; background: #fffaf3; box-shadow: 0 18px 40px rgba(96,128,178,.18); }
.cloud-card { position: relative; }
.cloud-card > .bump { position: absolute; aspect-ratio: 1 / 1; border-radius: 50%; background: #fffaf3; }
.cloud-card > .body { position: relative; background: #fffaf3; }
.check-dot { display: grid; place-items: center; border-radius: 50%; background: #2f8259; }
.info-panel { background: #eef5fc; border: 2px solid #d3e3f3; }
.soon-tag { display: inline-block; border-radius: 999px; background: #fff0da; color: #8f5714; font-weight: 800; }

/* Forms */
.field { width: 100%; min-height: 54px; padding: 0 16px; border-radius: 16px; border: 2px solid #e4d8f6; background: #fff; font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 600; color: #4b4038; }
textarea.field { min-height: 150px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field:focus { outline: none; border-color: #8a6fc0; box-shadow: 0 0 0 4px rgba(138,111,192,.18); }
.field.bad { border-color: #c24f72; }
.field.bad:focus { box-shadow: 0 0 0 4px rgba(194,79,114,.16); }
.field:disabled { background: #f7f3ee; color: #8d7f74; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row > label, .form-legend { font-weight: 800; font-size: 16px; }
.optional { font-weight: 600; color: #6f6258; }
.field-err { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #a23a5c; }
.form-summary { margin: 0; padding: 12px 16px; border-radius: 16px; background: #fbe3ea; color: #a23a5c; font-weight: 800; font-size: 16px; }
.server-error { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 18px; background: #fbe3ea; border: 2px solid #f2bccb; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

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