/* ==========================================================================
   בית הספר לתרבות המחלוקת - עמוד נחיתה (premium, centered editorial)
   Palette (locked): navy #18355C · sky #4BBBEC · grey #D5D5D5 · white
   Type: OS Aran (self-hosted, 400/500/600); hierarchy by size + tracking.
   Theme: light. Mesh-gradient depth + restrained glassmorphism.
   Radius scale (locked): card 24px · inputs & button 14px.
   ========================================================================== */

/* --- Self-hosted OS Aran (one family, weights 400 / 500 / 600) --- */
@font-face {
  font-family: "OS Aran";
  src: url("assets/OS-Aran-FFC-Webfonts/os_aran_400ffc-webfont.woff2") format("woff2"),
       url("assets/OS-Aran-FFC-Webfonts/os_aran_400ffc-webfont.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "OS Aran";
  src: url("assets/OS-Aran-FFC-Webfonts/os_aran_w_500ffc-webfont.woff2") format("woff2"),
       url("assets/OS-Aran-FFC-Webfonts/os_aran_w_500ffc-webfont.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "OS Aran";
  src: url("assets/OS-Aran-FFC-Webfonts/os_aran_r_600ffc-webfont.woff2") format("woff2"),
       url("assets/OS-Aran-FFC-Webfonts/os_aran_r_600ffc-webfont.woff") format("woff");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --navy: #18355c;
  --navy-2: #1f4a80;
  --sky: #4bbbec;
  --sky-deep: #2a93cf;
  --ink: #16283f;
  --muted: #59697e;
  --grey: #d5d5d5;

  --radius-card: 24px;
  --radius-field: 14px;

  --ring: 0 0 0 4px rgba(75, 187, 236, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "OS Aran", system-ui, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: #ffffff; /* white background */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px;
  background: var(--navy); color: #fff; padding: 10px 16px;
  border-radius: 12px; z-index: 100; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; outline: none; box-shadow: var(--ring); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }

/* Static grain texture over the flat blue (kept from the mesh, low opacity) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Centered editorial stage: logo crown -> copy -> glass form
   ========================================================================== */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* center the logo + content group vertically */
  padding: clamp(46px, 8vh, 96px) clamp(20px, 5vw, 56px) clamp(30px, 4.5vh, 56px);
}

/* Top bar shares the hero max-width so the logo lines up with the text's right edge */
.topbar {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto clamp(48px, 7vh, 88px); /* line-or-two of air between logo and text */
  text-align: start; /* RTL: aligns the logo to the right, level with the copy */
}
.logo {
  display: inline-block;
  transition: opacity 0.25s var(--ease);
}
.logo:hover { opacity: 0.85; }
.logo img {
  /* original logo colors (no recolor); ~30% smaller */
  height: clamp(36px, 3.85vw, 56px);
  width: auto;
}

/* --- Split hero: copy (right) + form (left); tops aligned --- */
.hero {
  width: 100%;
  max-width: 1320px;
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: clamp(40px, 5vw, 76px);
  align-items: start;
}

.hero-copy { text-align: start; }

/* Greeting: hierarchy via tracking (Hebrew emphasis convention), not weight */
.greeting {
  margin: 0 0 clamp(8px, 1.1vh, 14px);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.2vw, 2.15rem);
  letter-spacing: 0.07em;
  color: var(--navy);
}

.hero-copy h1 {
  margin: 0;
  font-weight: 600;
  color: var(--navy);
  font-size: clamp(3.25rem, 5.6vw, 5.6rem);
  line-height: 1.03; /* tighter within the headline (between its own lines) */
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.lede {
  margin: clamp(14px, 1.8vh, 22px) 0 0;
  max-width: 38ch;
  font-weight: 500;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.32; /* tighter within the sub-line */
  color: #294a71;
  text-wrap: balance;
}

/* Attribution line, a blank line below the sub-text */
.org {
  margin: clamp(26px, 3vh, 40px) 0 0;
  font-weight: 600;
  font-size: clamp(1.2rem, 1.55vw, 1.45rem);
  color: var(--navy);
}

/* ==========================================================================
   Form card - solid museum navy, white text (no glass effect)
   ========================================================================== */
.glass {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  text-align: start;
  border-radius: var(--radius-card);
  padding: clamp(30px, 3.2vw, 46px);
  background: #18355c;
  box-shadow:
    0 30px 70px rgba(11, 33, 60, 0.38),
    0 12px 30px rgba(11, 33, 60, 0.26);
}

/* Heading above the form */
.form-title {
  margin: 0 0 clamp(18px, 2.4vh, 26px);
  font-weight: 600;
  font-size: clamp(1.35rem, 1.9vw, 1.6rem);
  color: #ffffff;
  text-align: start;
}

/* --- Floating-label fields --- */
.field { position: relative; margin-bottom: 18px; }

.field input {
  width: 100%;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 400;
  color: #ffffff;
  padding: 30px 18px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-field);
  background: rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.field input::placeholder { color: transparent; }
.field input:hover { border-color: rgba(255, 255, 255, 0.42); }
.field input:focus {
  border-color: var(--sky);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 4px rgba(75, 187, 236, 0.3);
  outline: none;
}
.field input[dir="ltr"] { text-align: right; }

.field label {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.2rem;
  font-weight: 400;
  pointer-events: none;
  transition: top 0.18s var(--ease), font-size 0.18s var(--ease), color 0.18s var(--ease);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 12px;
  transform: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--sky);
}

.field.invalid input { border-color: #ff8f86; }
.field.invalid input:focus { box-shadow: 0 0 0 4px rgba(255, 143, 134, 0.28); }
.error { margin: 7px 4px 0; font-size: 0.85rem; color: #ffb0a8; font-weight: 500; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Premium CTA --- */
.submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1.28rem;
  font-weight: 700;
  color: #18355c;
  border: none;
  border-radius: var(--radius-field);
  padding: 20px 24px;
  cursor: pointer;
  background: #4bbbec;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.16s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.submit::before {
  content: "";
  position: absolute; top: 0; inset-inline-start: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: inset-inline-start 0.6s var(--ease);
}
.submit:hover {
  transform: translateY(-2px);
  background: #5fc4ef;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
}
.submit:hover::before { inset-inline-start: 130%; }
.submit:active { transform: translateY(0); }
.submit:focus-visible { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6); }
.submit[disabled] { cursor: progress; opacity: 0.9; }

.btn-arrow {
  width: 8px; height: 8px;
  border-left: 2.5px solid #18355c;
  border-top: 2.5px solid #18355c;
  transform: rotate(-45deg);
  transition: transform 0.2s var(--ease);
}
.submit:hover .btn-arrow { transform: rotate(-45deg) translate(2px, 2px); }

.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(24, 53, 92, 0.35);
  border-top-color: #18355c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.submit.loading .btn-arrow { display: none; }
.submit.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { margin-top: 12px; font-size: 0.92rem; font-weight: 500; color: rgba(255, 255, 255, 0.72); }
.form-status.error { color: #ffb0a8; }

/* --- Success --- */
.form-success { text-align: center; padding: 26px 8px; }
.form-success p {
  font-weight: 600;
  color: #ffffff;
  font-size: 2rem;
  margin: 14px 0 0;
}
.success-mark {
  width: 68px; height: 68px; margin: 0 auto;
  border-radius: 50%;
  background: rgba(75, 187, 236, 0.18);
  border: 1px solid rgba(75, 187, 236, 0.55);
  position: relative;
}
.success-mark::after {
  content: "";
  position: absolute; left: 25px; top: 19px;
  width: 14px; height: 26px;
  border: solid var(--sky);
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

/* ==========================================================================
   Motion
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .logo, .greeting, .hero-copy h1, .lede, .glass {
    opacity: 0;
    transform: translateY(20px);
    animation: rise 0.85s var(--ease) forwards;
  }
  .logo { animation-delay: 0.05s; }
  .greeting { animation-delay: 0.14s; }
  .hero-copy h1 { animation-delay: 0.22s; }
  .lede { animation-delay: 0.34s; }
  .glass { animation-delay: 0.42s; transform: translateY(28px) scale(0.99); }

  @keyframes rise { to { opacity: 1; transform: translateY(0) scale(1); } }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Collapse split to a centered stack */
@media (max-width: 860px) {
  /* Let mobile breathe / scroll instead of cramming into one screen */
  .stage { justify-content: flex-start; }
  .hero {
    grid-template-columns: 1fr;
    gap: clamp(36px, 6vh, 56px); /* air between the text and the form */
    max-width: 520px;
  }
  /* Client: keep everything right-aligned on mobile too */
  .hero-copy { text-align: right; }
  .lede { margin-inline: 0; max-width: none; }

  /* Smaller logo, with air after it before the text */
  .topbar {
    max-width: 520px;
    margin-bottom: clamp(34px, 5.5vh, 54px);
  }
  .logo img { height: clamp(24px, 5.6vw, 31px); }
}

@media (max-width: 620px) {
  .stage { padding-block: clamp(24px, 4vh, 44px); }
  .greeting { font-size: clamp(1.35rem, 6vw, 1.75rem); }
  .hero-copy h1 { font-size: clamp(2.05rem, 8.5vw, 3rem); }
  .lede { font-size: clamp(1.25rem, 5vw, 1.55rem); max-width: none; }
  .org { font-size: clamp(1.1rem, 4.4vw, 1.35rem); }
  .field { margin-bottom: 14px; }
  .glass { padding: 22px 18px; }
}
