/* Negev "Give me a name" landing page. Direction B: label paper. */

/* Assistant (SIL Open Font License), self-hosted so visitors' browsers never contact Google.
   One variable file per script covers weights 400–700. */
@font-face {
  font-family: 'Assistant';
  src: url('/fonts/assistant-hebrew.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Assistant';
  src: url('/fonts/assistant-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Noto Sans Hebrew, condensed instance (SIL Open Font License) — replaces the licensed Almoni Tzar.
   The files carry a width axis, so the condensed look needs font-stretch (set on body below). */
@font-face {
  font-family: 'Negev Display';
  src: url('/fonts/noto-hebrew-condensed-hebrew.woff2') format('woff2');
  font-weight: 700 800;
  font-stretch: 62.5%;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Negev Display';
  src: url('/fonts/noto-hebrew-condensed-latin.woff2') format('woff2');
  font-weight: 700 800;
  font-stretch: 62.5%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cream: #F4ECDA;
  --paper: #FFFBF2;
  --ink: #2B2014;
  --ink-2: #3D3121;
  --ink-3: #4A3B26;
  --muted: #5E4E36;
  --gold: #BB8E2F;
  --gold-ink: #7E5B1C;
  --line: #D8C49A;
  --field-border: #9C8350;
  --placeholder: #76664A;
  --error: #A3261B;
  --error-bg: #FBE9E6;

  --font-display: 'Negev Display', 'Assistant', 'Arial Hebrew', Arial, sans-serif;
  --font-body: 'Assistant', 'Arial Hebrew', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 12px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-stretch: 62.5%;
  font-size: 17px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
p { margin: 0; }

a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute;
  top: -100px;
  right: 16px;
  z-index: 10;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 16px;
}
.skip-link:focus { top: 16px; }

/* Double gold rule, like the bottle label */
.frame {
  min-height: calc(100vh - 24px);
  min-height: calc(100dvh - 24px);
  border: 4px double var(--gold);
  display: flex;
  flex-direction: column;
}
main { flex-grow: 1; }

/* ---------- Shared type ---------- */

.logo { width: 123px; height: auto; }
.logo--lg { width: 123px; }
.logo--sm { width: 123px; }
.legal .logo { width: 92px; }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-ink);
}
.eyebrow::before, .eyebrow::after {
  content: '';
  width: 16px;
  height: 1.5px;
  background: var(--gold);
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 20.5vw, 80px);
  line-height: 0.9;
  text-align: center;
  text-wrap: balance;
}
.display--md { font-size: clamp(52px, 16.5vw, 64px); line-height: 0.95; }

.lead { font-size: 17px; color: var(--ink-3); text-align: center; text-wrap: pretty; }
.lead--strong { font-weight: 700; color: var(--ink); font-size: 18px; }
.body-text { font-size: 15px; line-height: 1.55; color: var(--ink-3); text-align: center; text-wrap: pretty; }
.body-text--lg { font-size: 18px; }

/* ---------- Screens ---------- */

.screen {
  padding: 30px 20px 0;
  animation: fade-in 0.35s ease-out;
}
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen--center {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 44px;
}
.center-stack {
  flex-grow: 1;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 0;
}
.loading { margin: auto; color: var(--muted); }

.actions { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

.head { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* ---------- Bottle ---------- */

.bottle {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
}
.bottle img { position: relative; width: auto; height: 350px; }
.bottle::before {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 170px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 38, 10, 0.35), rgba(60, 38, 10, 0));
}
.bottle--inline img { height: 320px; }
.bottle--side { display: none; }

/* ---------- Form screen ---------- */

.hero-grid { display: flex; flex-direction: column; gap: 18px; }

.copy { display: flex; flex-direction: column; gap: 10px; text-align: center; padding: 0 4px; }
.copy__lead { font-size: 21px; line-height: 1.45; font-weight: 700; text-wrap: pretty; }
.copy__body { font-size: 19px; color: var(--ink-3); text-wrap: pretty; }
.mark { color: var(--ink); box-shadow: inset 0 -9px 0 rgba(187, 142, 47, 0.35); }
.prize { display: none; }

.formcard { padding: 12px 0 0; }

#entry-form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 700; }

.field input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.field input::placeholder { color: var(--placeholder); opacity: 1; }
.field input[dir="ltr"] { text-align: right; }
.field input.input--highlight { border: 2px solid var(--gold-ink); }
.field input:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 1px; }
.field input[aria-invalid="true"] { border: 2px solid var(--error); }

.field__error { color: var(--error); font-size: 14px; font-weight: 700; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.checks { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check label { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.check input {
  appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1.5px solid var(--gold-ink);
  border-radius: 2px;
  background: var(--paper);
  cursor: pointer;
}
.check input:checked {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23F4ECDA' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-color: var(--ink);
}
.check input[aria-invalid="true"] { border: 2px solid var(--error); }
.required { color: var(--gold-ink); }

.turnstile:empty { display: none; }

.form-error {
  padding: 12px 14px;
  border: 1px solid var(--error);
  background: var(--error-bg);
  color: var(--error);
  font-size: 15px;
  font-weight: 700;
}

.fineprint { font-size: 13px; line-height: 1.55; color: var(--muted); text-align: center; text-wrap: pretty; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 24px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  width: 100%;
}
.btn--primary { background: var(--ink); color: var(--cream); border: 2px solid var(--ink); }
.btn--primary:hover { background: var(--ink-2); }
.btn--secondary { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn--secondary:hover { background: rgba(43, 32, 20, 0.06); }
.btn--block { font-size: 36px; }
.btn[aria-disabled="true"] { opacity: 0.65; cursor: progress; }

.btn-link {
  background: none;
  border: 0;
  padding: 8px;
  font: inherit;
  font-size: 16px;
  color: var(--gold-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Status screens (thanks, before, ended) ---------- */

.split__content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.split__content .display { margin-top: 4px; }

.check-icon { margin-top: 8px; }

.namebox {
  width: 100%;
  padding: 16px;
  border: 1.5px dashed var(--gold);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.namebox__label, .datebox__label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--gold-ink); }
.namebox__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

.datebox {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gold);
  background: var(--paper);
  text-align: center;
}
.datebox__value { font-family: var(--font-display); font-weight: 700; font-size: 48px; line-height: 1; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 36px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 12px; font-size: 14px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.warning {
  border: 2px solid var(--ink);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

/* ---------- Legal pages ---------- */

.legal { max-width: 760px; margin: 0 auto; padding: 32px 20px 0; }
.legal__logo { display: inline-block; margin-bottom: 24px; }
.legal h1 { margin: 0 0 20px; font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1; }
.legal h2 { margin: 28px 0 10px; font-size: 22px; line-height: 1.3; }
.legal p, .legal li { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 8px 0; padding-inline-start: 22px; }
.legal h3 { margin: 20px 0 6px; font-size: 18px; line-height: 1.4; }
.legal .num { font-weight: 700; margin-inline-end: 4px; }
.legal li.lvl1 { margin-inline-start: 18px; }
.legal__note { margin: 16px 0; padding: 12px 16px; border: 1px solid var(--ink-2); font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.legal__table { margin: 16px 0; overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.legal th, .legal td { padding: 8px 10px; border: 1px solid var(--ink-2); text-align: start; vertical-align: top; color: var(--ink-2); }
.legal a { overflow-wrap: anywhere; }
.holding-note {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}
.draft-banner {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 2px solid var(--error);
  background: var(--error-bg);
  color: var(--error) !important;
  font-weight: 700;
  text-align: center;
}
.placeholder { background: #FFF1A8; padding: 0 4px; }

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
  body { padding: 20px; }
  .frame { min-height: calc(100vh - 40px); min-height: calc(100dvh - 40px); border-width: 5px; }

  .screen { padding: 44px 88px 0; }
  .logo { width: 211px; }
  .logo--lg { width: 211px; }
  .legal .logo { width: 92px; }

  .eyebrow { font-size: 16px; letter-spacing: 0.16em; gap: 16px; }
  .eyebrow::before, .eyebrow::after { width: 56px; }

  .display { font-size: 168px; line-height: 0.8; }
  .display--md { font-size: 120px; line-height: 0.9; }
  .lead { font-size: 22px; }

  .screen--center { min-height: calc(100vh - 180px); }
  .actions { flex-direction: row; justify-content: center; gap: 16px; margin-top: 20px; }
  .actions .btn { width: 280px; min-height: 64px; font-size: 32px; }

  .head { gap: 18px; }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1fr);
    grid-template-areas: 'copy bottle form';
    align-items: center;
    gap: 56px;
    padding-top: 36px;
  }
  .copy { grid-area: copy; text-align: start; gap: 28px; padding: 0; }
  .copy__lead { font-size: 34px; line-height: 1.3; }
  .copy__body { font-size: 22px; }
  .prize {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0;
    border-top: 1.5px solid var(--gold);
    border-bottom: 1.5px solid var(--gold);
  }
  .prize__label { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; color: var(--gold-ink); }
  .prize__value { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; }

  .hero-grid .bottle { grid-area: bottle; height: 660px; padding-bottom: 0; }
  .hero-grid .bottle img { height: 650px; }
  .bottle::before { bottom: -4px; width: 260px; height: 30px; }

  .formcard { grid-area: form; padding: 30px 28px; background: var(--paper); border: 1px solid var(--line); }
  #entry-form { gap: 16px; }
  .field input { height: 52px; background: #FFFFFF; }
  .fineprint { text-align: start; }

  /* Status screens: text on the right, bottle on the left */
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 72px;
    align-items: center;
    min-height: calc(100vh - 220px);
    padding: 0 72px;
  }
  .split__content { align-items: flex-start; gap: 22px; }
  .split__content .eyebrow::after { display: none; }
  .split__content .display { font-size: 150px; line-height: 0.85; text-align: start; }
  .split__content .lead, .split__content .body-text { text-align: start; max-width: 620px; }
  .split__content .lead--strong { font-size: 24px; }
  .split__content .body-text--lg { font-size: 24px; }
  .split__content .btn { width: auto; padding: 0 40px; }
  .namebox, .datebox { width: auto; min-width: 360px; max-width: 620px; align-items: flex-start; text-align: start; padding: 20px 28px; }
  .namebox__value { font-size: 52px; text-align: start; }
  .datebox__value { font-size: 60px; }
  .bottle--inline { display: none; }
  .bottle--side { display: flex; height: 680px; padding-bottom: 0; }
  .bottle--side img { height: 660px; }
  .check-icon { display: none; }

  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    gap: 32px;
    margin-top: 40px;
    padding: 20px 88px;
    border-top: 1px solid var(--line);
  }
  .legal-links { font-size: 15px; gap: 0 20px; }
  .legal-links a { min-height: 32px; }
  .warning { font-size: 16px; padding: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}
