/* ==========================================
   GIVEAWAY PAGE (prototype)
   Uses the contact page's title, input, checkbox and button styles;
   only the gift cards, steps and states live here.
   ========================================== */

/* Light theme for this page: off-white paper, dark ink, cinema-red accent.
   (Accent is page-only, not part of the site palette.)
   Site reds: accent #C21824 (light accent #FF5A4F on dark only), error #C0392B. */
:root {
  --gw-paper: #E6E5DF;
  --gw-paper-rgb: 230, 229, 223;
  --gw-panel: #F7F6F2;           /* near-white for the How-to-enter frame (site rules: no pure #fff) */
  --gw-ink: #171715;
  --gw-ink-rgb: 23, 23, 21;
  --gw-accent: #C21824;          /* site accent red */
  --gw-accent-on-dark: #FF5A4F;  /* light accent, only on dark backgrounds (5.8:1 on the dark selected card) */
  --gw-error: #C0392B;           /* site error / negative red */
  --gw-success: #17753A;         /* "You're in": 4.6:1 on paper, white tick 5.3:1 */
  --gw-section-gap: 120px;       /* space between every section on this page */
}

body.page-giveaway { background: var(--gw-paper); }

.gw-page {
  --color-text: var(--gw-ink);   /* shared site styles (title, inputs) pick up dark ink */
  padding-top: 64px;
  flex: 1;
  color: var(--gw-ink);
  transition: opacity 0.25s ease;
}
/* While the Studio texts load (see giveaway.html head) */
.gw-wait .gw-page { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .gw-page { transition: none; } }

.gw-hero {
  padding-top: 80px;
  padding-bottom: var(--gw-section-gap);
}

.gw-eyebrow,
.gw-step,
.gw-card__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--gw-ink-rgb), 0.55);
}

.gw-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--color-text);      /* full ink, not the dimmed label grey */
}

.gw-eyebrow__icon {
  font-size: 1.75rem;            /* 28px */
  line-height: 1;
  letter-spacing: 0;
}
.gw-title   { margin-bottom: 24px; max-width: 21ch; text-wrap: balance; }
.gw-title__line { display: block; }

/* Phones: fixed line breaks, and the font scales with the screen so the
   longest line spans the full content width (screen minus 2 × 24px).
   Divisors = longest line's width at font-size 100px, measured in Geist:
   EN "Celebrating cinema." 925px, BG "Празнуваме киното." 973px (+~1.5% safety). */
.gw-br-m { display: none; }

@media (max-width: 767px) {
  .gw-br-m { display: inline; }
  .gw-title {
    max-width: none;
    white-space: nowrap;
    font-size: calc((100vw - 48px) / 9.4);
  }
  html[lang="bg"] .gw-title { font-size: calc((100vw - 48px) / 9.9); }
}

.gw-step {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--gw-accent);       /* same red as the draw dates */
}

.gw-step__num { color: var(--gw-accent); }   /* full strength: 60% failed contrast */

/* ---------- Gift cards ---------- */

.gw-form { padding-bottom: 0; }

.gw-gifts {
  scroll-margin-top: 96px;       /* clear the fixed navbar when scrolled to */
  border: 0;
  min-width: 0;
}

.gw-gifts__note {
  font-size: 0.95rem;
  color: rgba(var(--gw-ink-rgb), 0.8);
  margin: -8px 0 24px;
}

.gw-grid {
  display: grid;
  grid-template-columns: 1fr;   /* odd columns only: 1 → 3 */
  gap: 0;
}

@media (min-width: 768px) {
  .gw-grid { grid-template-columns: repeat(3, 1fr); }
}

.gw-card {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(var(--gw-ink-rgb), 0.18);
  margin: 0 0 -1px 0;           /* collapse shared borders */
  transition: background 0.15s;
}

@media (min-width: 768px) {
  .gw-card { margin: 0 -1px 0 0; }
}


/* Radio stays in the DOM for keyboard + screen readers, visually hidden */
.gw-card__check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.gw-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;           /* portrait */
  overflow: hidden;
  background: #D9D8D2;           /* shows only while a photo loads */
}

.gw-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.gw-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.gw-card__tag  { margin-bottom: 12px; }

.gw-card__name {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 12px;
}

.gw-card__text {
  display: -webkit-box;          /* first 3 lines only, until "Show more" */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(var(--gw-ink-rgb), 0.7);
  margin-bottom: 24px;
}
.gw-card__text.is-open { display: flex; flex-direction: column; gap: 12px; -webkit-line-clamp: unset; line-clamp: none; }

/* Text sits tight under its "Show more" link */
.gw-card__text:has(+ .gw-card__more:not([hidden])) { margin-bottom: 8px; }

.gw-card__more {
  align-self: flex-start;
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.gw-card__more[hidden] { display: none; }
.gw-card__more:hover { color: var(--gw-accent); }
.gw-card:has(.gw-card__check:checked) .gw-card__more { color: var(--gw-paper); }

.gw-card__aside {
  padding-top: 12px;
  border-top: 1px solid rgba(var(--gw-ink-rgb), 0.18);
  color: rgba(var(--gw-ink-rgb), 0.85);
}

/* Full-width button look (the whole card is the click target) */
.gw-card__pick {
  margin-top: auto;              /* pick rows line up across cards */
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 16px 10px 10px;
  border: 1.5px solid rgba(var(--gw-ink-rgb), 0.45);
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}


.gw-card__box {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(var(--gw-ink-rgb), 0.6);
  flex-shrink: 0;
  position: relative;
}

/* Selected: card inverts to dark ink */
.gw-card:has(.gw-card__check:checked) {
  background: var(--gw-ink);
  border-color: transparent;     /* no border on the chosen card */
  background-clip: padding-box;
  z-index: 1;
}
.gw-card:has(.gw-card__check:checked) .gw-card__tag  { color: var(--gw-accent-on-dark); }   /* "Gift 0X" turns red when chosen */
.gw-card:has(.gw-card__check:checked) .gw-card__name { color: var(--gw-paper); }
.gw-card:has(.gw-card__check:checked) .gw-card__pick { background: var(--gw-paper); border-color: var(--gw-paper); color: var(--gw-ink); }
.gw-card:has(.gw-card__check:checked) .gw-card__aside { color: rgba(var(--gw-paper-rgb), 0.9); border-color: rgba(var(--gw-paper-rgb), 0.2); }
.gw-card:has(.gw-card__check:checked) .gw-card__text { color: rgba(var(--gw-paper-rgb), 0.8); }
.gw-card:has(.gw-card__check:checked) .gw-card__box  { background: var(--gw-ink); border-color: var(--gw-ink); }
.gw-card:has(.gw-card__check:checked) .gw-card__box::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 4px;
  width: 10px;
  height: 19px;
  border: solid var(--gw-paper);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* Hover (mouse only): same dark look as a chosen card, without the tick */
@media (hover: hover) {
  .gw-card:hover {
    background: var(--gw-ink);
    border-color: transparent;
    background-clip: padding-box;
    z-index: 1;
  }
  .gw-card:hover .gw-card__tag  { color: var(--gw-accent-on-dark); }
  .gw-card:hover .gw-card__name { color: var(--gw-paper); }
  .gw-card:hover .gw-card__text { color: rgba(var(--gw-paper-rgb), 0.8); }
  .gw-card:hover .gw-card__more { color: var(--gw-paper); }
  .gw-card:hover .gw-card__more:hover { color: var(--gw-accent-on-dark); }
  .gw-card:hover .gw-card__pick { background: var(--gw-paper); border-color: var(--gw-paper); color: var(--gw-ink); }
}

/* Keyboard focus: ring only on cards not yet chosen.
   The chosen card never shows an outline (its dark fill already marks it). */
.gw-card:has(.gw-card__check:focus-visible:not(:checked)) {
  outline: 2px solid var(--gw-ink);
  outline-offset: 3px;
  z-index: 2;
}
.gw-card:has(.gw-card__check:checked),
.gw-card__check { outline: none; }

/* ---------- Entry form ---------- */

/* Framed panel so step 02 reads as the main action */
.gw-enter {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--gw-panel);
}

.gw-enter__how,
.gw-enter__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

@media (min-width: 768px) {
  .gw-enter { padding: 40px; }
}

/* Steps 02 (subscribe) and 03 (follow): label above a white panel, both under the gifts */
.gw-step-wrap { margin-top: 64px; }
.gw-step-wrap--first { margin-top: var(--gw-section-gap); }
.gw-step-wrap .gw-enter { display: flex; align-items: stretch; }   /* one column: no side-by-side grid any more */
.gw-enter__form { max-width: 560px; }

.gw-enter__text {
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 300;
  color: rgba(var(--gw-ink-rgb), 0.85);
}
.gw-social { max-width: 560px; }

/* Brighter, filled input (scoped here, contact page unchanged) */
.gw-enter .contact-form__input {
  background: rgba(var(--gw-ink-rgb), 0.04);
  border-color: rgba(var(--gw-ink-rgb), 0.55);
  padding: 16px;
  font-size: 1rem;
}

.gw-enter .contact-form__input::placeholder { color: rgba(var(--gw-ink-rgb), 0.5); }

.gw-enter .contact-form__input:focus {
  border-color: var(--gw-ink);
  background: rgba(var(--gw-ink-rgb), 0.06);
}

.gw-chosen {
  font-size: 0.95rem;
  color: rgba(var(--gw-ink-rgb), 0.8);
}
.gw-chosen:empty { display: none; }
.gw-chosen strong { color: var(--color-text); font-weight: 600; }

.gw-error {
  font-size: 0.85rem;
  color: var(--gw-error);
}

.contact-form__input[aria-invalid="true"] { border-color: var(--gw-error); }
/* Email field with an error (bad address, already entered): 1px border all round
   in the error-text red, also while focused and on the side that touches the button */
.gw-enter .gw-signup .contact-form__input[aria-invalid="true"],
.gw-enter .gw-signup .contact-form__input[aria-invalid="true"]:focus { border: 1px solid var(--gw-error); }

/* ---------- Success state ---------- */

.gw-done {
  padding-bottom: 0;
  outline: none;
}

/* Full-width frame, same near-white as the How-to-enter panel; label sits above it */
/* "You're in" label: same 36px tick box as a chosen gift card */
.gw-step.gw-step--done { align-items: center; color: var(--gw-success); }

.gw-tick {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--gw-success);
}
.gw-tick::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 6px;
  width: 10px;
  height: 19px;
  border: solid var(--gw-panel);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.gw-done__panel {
  background: var(--gw-panel);
  padding: 24px;
}
.gw-done__panel > * { max-width: 720px; }
/* The three confirmation lines sit evenly, 8px apart */
#gw-done-text { overflow-wrap: anywhere; }   /* a long email breaks instead of running off a phone screen */
.gw-done__panel #gw-done-text,
.gw-done__panel .gw-done__list { margin-bottom: 8px; }

@media (min-width: 768px) {
  .gw-done__panel { padding: 40px; }
}

.gw-done__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.gw-done__list {
  list-style: none;
  margin: 0;
}

.gw-done__list li {
  padding: 0;
  font-size: 1rem;
  line-height: 1.7;              /* same as the lines above and below */
  font-weight: 600;
  color: var(--color-text);
}

.gw-chosen { line-height: 1.6; }

/* ---------- Gift pop-up (Enter pressed without a gift) ---------- */

.gw-pick {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 40px 32px 32px;
  border: 0;
  border-radius: 0;
  background: var(--gw-panel);
  color: var(--gw-ink);
  font-family: var(--font-main);
}

.gw-pick::backdrop { background: rgba(var(--gw-ink-rgb), 0.55); }

.gw-pick[open] { animation: gw-pick-in 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes gw-pick-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.gw-pick__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--gw-ink);
  cursor: pointer;
}

.gw-pick__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 32px 12px 0;
}

.gw-pick__text {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(var(--gw-ink-rgb), 0.75);
  margin-bottom: 24px;
}

.gw-pick__list { display: flex; flex-direction: column; gap: 8px; }

.gw-pick__opt {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: 1.5px solid rgba(var(--gw-ink-rgb), 0.3);
  border-radius: 0;
  font-family: inherit;
  text-align: left;
  color: var(--gw-ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.gw-pick__opt:hover,
.gw-pick__opt:focus-visible {
  background: var(--gw-ink);
  border-color: var(--gw-ink);
  color: var(--gw-paper);
  outline: none;
}

.gw-pick__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gw-accent);
  color: var(--gw-panel);
  font-size: 1rem;
  font-weight: 600;
}

.gw-pick__label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gw-pick__label strong { font-size: 1rem; font-weight: 600; }
.gw-pick__label span   { font-size: 0.85rem; font-weight: 300; opacity: 0.75; }

@media (max-width: 767px) {
  .gw-pick { padding: 32px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .gw-pick[open] { animation: none; }
  .gw-pick__opt { transition: none; }
}

/* ---------- How to enter (inside the panel) ---------- */

.gw-how {
  list-style: none;
  counter-reset: how;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 10px;
}

.gw-how li {
  counter-increment: how;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  padding-left: 40px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(var(--gw-ink-rgb), 0.85);
}

.gw-how li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gw-accent);   /* red square, white digit, no border */
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gw-panel);
}

/* Step 2 sits in the form column, right above the email field */
.gw-how--step2 { counter-reset: how 1; margin-bottom: 4px; }

.gw-social { display: flex; gap: 12px; width: 100%; }   /* 14px under its text, same as the email field */

/* Instagram, Facebook and the "Enter" button share one size */
.gw-social__link,
.gw-enter .contact-form__btn.btn--dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 180px;
  padding: 0 28px;
  border: 1.5px solid rgba(var(--gw-ink-rgb), 0.6);
  border-radius: 0;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.gw-social__link {
  color: var(--color-text);
  transition: background 0.15s, color 0.15s;
}
.gw-social__link:hover { background: var(--gw-ink); color: var(--gw-paper); }

/* Main buttons are solid dark ink on this light page */
.gw-page .contact-form__btn.btn--dark {
  background: var(--gw-ink);
  border-color: var(--gw-ink);
  color: var(--gw-paper);
}
.gw-page .contact-form__btn.btn--dark:hover { background: #333; border-color: #333; color: var(--gw-paper); }

.gw-enter .contact-form__btn.btn--dark { margin-top: 4px; }

/* Email field + Enter button on one row, touching (no gap) */
.gw-signup { display: flex; align-items: stretch; }

.gw-signup .contact-form__input {
  flex: 1;
  min-width: 0;
  height: 56px;
  border-right: 0;
}

.gw-enter .gw-signup .contact-form__btn.btn--dark {
  height: 56px;
  margin: 0;
  flex-shrink: 0;
}

/* Hint + privacy line read as one group: 8px between the letters of the two lines
   (the lines' own spacing already adds ~8px, so the boxes touch) */
.gw-notes { display: flex; flex-direction: column; gap: 0; }
.gw-notes .form-note { font-size: 0.875rem; }   /* privacy line: 14px */
.gw-notes .form-note a { white-space: nowrap; }   /* "Privacy policy" never splits */

/* Phones: the two social buttons share the row */
@media (max-width: 767px) {
  .gw-social__link { flex: 1; min-width: 0; padding: 0 12px; }
  /* Email field above a full-width Enter button, 8px apart */
  .gw-signup { flex-direction: column; gap: 8px; }
  .gw-signup .contact-form__input { flex: none; border-right: 1px solid rgba(var(--gw-ink-rgb), 0.55); }
  .gw-enter .gw-signup .contact-form__btn.btn--dark { width: 100%; min-width: 0; }
}

/* ---------- Closing note ---------- */

.gw-outro {
  max-width: 720px;
  padding-top: var(--gw-section-gap);
  padding-bottom: 96px;
}

.gw-outro .about-text p + p { margin-top: 16px; }

.gw-lead p + p { margin-top: 12px; }

/* Sub-title under the page title + closing note: same large text */
.gw-page .gw-lead,
.gw-page .gw-outro .about-text,
.gw-sign {
  font-size: 1.25rem;            /* 20px on phones */
  line-height: 1.45;
  max-width: 720px;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .gw-page .gw-lead,
  .gw-page .gw-outro .about-text,
  .gw-sign { font-size: 1.5rem; }   /* 24px */
}

.gw-sign {
  margin-top: 24px;
  font-weight: 600;
  color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
  .gw-card, .gw-card__pick, .gw-social__link { transition: none; }
}

/* Shared site text styles, re-inked for the light page */
.gw-page .about-text { color: rgba(var(--gw-ink-rgb), 0.85); }
.gw-page .form-note  { color: rgba(var(--gw-ink-rgb), 0.6); }

/* ---------- Body text weight ---------- */
/* Running text on this page is ExtraLight (200); headings, labels,
   dates, buttons and bold names keep their own weights. */
.gw-page .about-text,
.gw-card__text,
.gw-chosen,
.gw-page .form-note {
  font-weight: 200;
}
/* "The draw takes place on 10 December." — bold red, after the weight rule above */
.gw-page .gw-done__draw { font-weight: 600; color: var(--gw-accent); }

/* These read a touch stronger: Light (300) */
.gw-how li,
.gw-gifts__note { font-weight: 300; }
