@font-face {
  font-family: "Kanit";
  src: url("/static/fonts/Kanit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Kanit";
  src: url("/static/fonts/Kanit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Kanit";
  src: url("/static/fonts/Kanit-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Changa One";
  src: url("/static/fonts/ChangaOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --night: #071128;
  --night-raised: #102860;
  --blue: #164ac8;
  --blue-bright: #79a5ff;
  --gold: #c59b6c;
  --gold-light: #f2dec8;
  --parchment: #f3ede7;
  --paper: #fffdf9;
  --ink: #12182a;
  --muted: #5c6474;
  --border: #c9b8a8;
  --danger: #a21c34;
  --success: #157052;
  --focus: #ffd45f;
  font-family: "Kanit", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background: var(--night);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select { font: inherit; }

button,
a { touch-action: manipulation; }

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--night);
  background: var(--focus);
  border-radius: 8px;
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform 180ms ease-out;
}

.skip-link:focus { transform: translateY(0); }

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 18%, rgba(121, 165, 255, 0.38), transparent 31rem),
    radial-gradient(circle at 78% 70%, rgba(197, 155, 108, 0.19), transparent 30rem),
    linear-gradient(135deg, #174fcf 0%, #1645b6 42%, #091532 100%);
}

.page-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.65;
  background-image:
    linear-gradient(118deg, transparent 0 42%, rgba(255, 255, 255, 0.09) 43%, transparent 48%),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.11) 0 2px, transparent 3px);
  background-size: auto, 42px 42px;
  pointer-events: none;
}

.page-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(to bottom, transparent 58%, rgba(4, 10, 25, 0.76));
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 4;
  width: min(1240px, calc(100% - 40px));
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.23);
}

.brand {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  max-width: 100%;
  filter: brightness(0) invert(1);
}

.brand-wordmark { height: 42px; }
.prize-second { display: block; margin-top: 5px; }

.language-switch {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  background: rgba(6, 17, 45, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.language-button {
  min-width: 58px;
  min-height: 44px;
  padding: 8px 13px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: color 180ms ease-out, background 180ms ease-out, transform 180ms ease-out;
}

.language-button:hover { color: white; }
.language-button:active { transform: scale(0.97); }

.language-button.is-active {
  color: var(--blue);
  background: white;
  box-shadow: 0 5px 18px rgba(2, 11, 34, 0.26);
}

.hero {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.72fr);
  align-items: start;
  gap: clamp(42px, 7vw, 94px);
  margin: 0 auto;
  padding: clamp(46px, 7vw, 92px) 0 82px;
}

.campaign-copy {
  position: relative;
  min-width: 0;
  padding-top: 8px;
}

.movie-kicker {
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.movie-title {
  margin: 0 0 30px;
  color: white;
  font-family: "Changa One", "Kanit", sans-serif;
  font-size: clamp(2.9rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 12ch;
  margin-bottom: 20px;
  color: white;
  font-family: "Changa One", "Kanit", sans-serif;
  font-size: clamp(3.1rem, 5.7vw, 6rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
}

h1 span,
h1 strong { display: block; }

h1 > span:first-child {
  margin-bottom: 8px;
  color: white;
  font-family: "Kanit", sans-serif;
  font-size: 0.25em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
}

h1 strong {
  color: #f2dec8;
  font-weight: 400;
  text-shadow: 0 3px 0 rgba(60, 38, 20, 0.42), 0 9px 26px rgba(0, 0, 0, 0.42);
}

h1 > span:last-child {
  margin-top: 11px;
  font-family: "Kanit", sans-serif;
  font-size: 0.25em;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.06em;
}

.campaign-intro {
  max-width: 52ch;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
}

.campaign-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
}

.meta-card {
  min-width: 180px;
  padding: 1px 0 1px 15px;
  border-left: 2px solid rgba(143, 200, 255, 0.62);
}

.meta-card-accent {
  border-left-color: rgba(255, 222, 137, 0.8);
}

.meta-label {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta-card strong { color: white; font-size: 1rem; }

.promo-stage {
  position: relative;
  max-width: 590px;
  margin-top: 38px;
}

.promo-crop {
  position: relative;
  width: min(77%, 430px);
  aspect-ratio: 1;
}

.promo-crop img {
  width: 100%;
  height: auto;
  display: block;
}

.prize-seal {
  position: absolute;
  z-index: 3;
  left: min(65%, 365px);
  bottom: 34px;
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  padding: 16px;
  color: var(--night);
  text-align: center;
  background: radial-gradient(circle, #fff 0 45%, var(--gold-light) 72%);
  border: 4px double #83603e;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2), 0 18px 34px rgba(0, 0, 0, 0.42);
  transform: rotate(5deg);
}

.prize-seal span,
.prize-seal strong { display: block; }

.prize-seal span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.prize-seal strong {
  font-family: "Changa One", sans-serif;
  font-size: 3.7rem;
  font-weight: 400;
  line-height: 0.85;
}

.form-panel {
  position: sticky;
  top: 24px;
  padding: clamp(26px, 4vw, 42px);
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 253, 249, 0.98), rgba(243, 237, 231, 0.99)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(52, 34, 18, 0.04) 28px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(3, 9, 28, 0.46), 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.form-panel::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(22, 74, 200, 0.16);
  border-radius: 13px;
  pointer-events: none;
}

.form-heading,
#entry-form,
.state-card { position: relative; z-index: 1; }

.form-heading h2,
.state-card h2 {
  margin-bottom: 6px;
  color: var(--night);
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1;
}

.form-heading p { margin-bottom: 24px; color: var(--muted); }

#entry-form { display: grid; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  align-content: start;
  margin-bottom: 15px;
}

.field label,
.turnstile-label {
  margin-bottom: 6px;
  color: #26334a;
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #afa88f;
  border-radius: 9px;
  box-shadow: inset 0 1px 2px rgba(25, 34, 51, 0.06);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out, background 160ms ease-out;
}

input:hover,
select:hover { border-color: #766a4f; }

input:focus,
select:focus {
  background: white;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 79, 197, 0.14);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
fieldset[aria-invalid="true"] { border-color: var(--danger); }

.field-help,
.newsletter-help {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.field-error {
  min-height: 18px;
  margin-top: 4px;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 600;
}

.consent {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  margin: 3px 0 0;
  color: #334057;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.4;
}

.consent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  background: white;
  border: 2px solid #817861;
  border-radius: 5px;
}

.consent input:checked + .custom-checkbox {
  background: var(--blue);
  border-color: var(--blue);
}

.consent input:checked + .custom-checkbox::after {
  content: "";
  width: 9px;
  height: 5px;
  border: solid white;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px);
}

.consent input:focus-visible + .custom-checkbox {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.consent a { color: #0c54aa; font-weight: 800; }
.consent-error { margin-bottom: 12px; }

.newsletter-choice {
  min-width: 0;
  margin: 5px 0 20px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #c8c0ad;
}

.newsletter-choice legend {
  padding: 0 10px 0 0;
  color: #26334a;
  font-size: 0.9rem;
  font-weight: 800;
}

.newsletter-help { margin: 0 0 10px; }

.newsletter-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.newsletter-option {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  color: #2e3a50;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
}

.newsletter-option:has(input:checked) {
  color: #0b438f;
}

.newsletter-option input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.newsletter-error { display: block; }

.turnstile-block {
  margin-bottom: 16px;
  padding: 13px;
  background: white;
  border: 1px solid #b5c4d6;
  border-radius: 10px;
}

.turnstile-label { margin: 0 0 9px; }

.turnstile-widget {
  min-height: 65px;
  display: grid;
  align-items: center;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out, filter 180ms ease-out;
}

.primary-button {
  width: 100%;
  margin-top: 2px;
  color: white;
  background: linear-gradient(135deg, #1d59df, var(--blue));
  border: 1px solid #0b328f;
  box-shadow: 0 8px 0 #0b328f, 0 14px 22px rgba(11, 50, 143, 0.24);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.primary-button:hover:not(:disabled),
.secondary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.primary-button:active:not(:disabled),
.secondary-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #0b328f;
}

.primary-button:disabled { cursor: wait; opacity: 0.62; }

.secondary-button {
  color: white;
  background: var(--blue);
  border: 1px solid #082c76;
  box-shadow: 0 6px 0 #082c76;
}

.button-loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(5, 17, 31, 0.24);
  border-top-color: var(--night);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.form-alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  color: #78091d;
  background: #fff0f3;
  border: 1px solid #c9556a;
  border-radius: 9px;
  font-weight: 600;
}

.state-card { padding: 30px 8px 12px; text-align: center; }

.state-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  color: white;
  background: var(--danger);
  border: 3px solid var(--night);
  border-radius: 50%;
  box-shadow: 0 7px 0 var(--night);
  font-family: "Changa One", sans-serif;
  font-size: 2.6rem;
}

.success-icon { color: white; background: var(--blue); }

.state-kicker {
  margin: 0 0 10px;
  color: var(--success);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-card > p:not(.state-kicker) {
  max-width: 42ch;
  margin: 16px auto 24px;
  color: var(--muted);
}

.site-footer {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 38px;
  color: rgba(255, 255, 255, 0.68);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.78rem;
  text-align: center;
}

.site-footer p { max-width: 100ch; margin: 0 auto; }

.site-footer .copyright {
  margin-top: 12px;
  color: rgba(242, 222, 200, 0.94);
  font-weight: 600;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hidden { display: none !important; }

@media (max-width: 1020px) {
  .page-shell { background-attachment: scroll; }

  .hero {
    grid-template-columns: 1fr;
    gap: 52px;
    padding-top: 44px;
  }

  .campaign-copy {
    width: min(780px, 100%);
    margin: 0 auto;
  }

  .form-panel {
    position: relative;
    top: auto;
    width: min(680px, 100%);
    margin: 0 auto;
  }

  .promo-stage { max-width: 620px; }
  .promo-crop { width: min(76%, 450px); }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .site-footer { width: min(100% - 24px, 100%); }

  .site-header { min-height: 78px; padding: 13px 0; }
  .brand-wordmark { height: auto; width: 158px; }

  .language-button {
    min-width: 50px;
    padding-inline: 10px;
    font-size: 0.8rem;
  }

  .hero { padding: 28px 0 64px; gap: 38px; }
  .movie-title { margin-bottom: 24px; }

  h1 {
    max-width: 9ch;
    font-size: clamp(3.25rem, 16vw, 5rem);
  }

  .campaign-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .meta-card { min-width: 0; }
  .meta-card strong { font-size: 0.88rem; }

  .promo-stage { margin-top: 28px; }
  .promo-crop { width: 76%; }

  .prize-seal {
    left: auto;
    right: 1%;
    bottom: 30px;
    width: 116px;
  }

  .prize-seal strong { font-size: 3rem; }

  .form-panel {
    padding: 27px 18px 30px;
    border-radius: 15px;
  }

  .field-row { grid-template-columns: 1fr; gap: 0; }

  input,
  select,
  .primary-button { min-height: 52px; }
}

@media (max-width: 420px) {
  .brand-wordmark { width: 146px; }
  .campaign-meta { grid-template-columns: 1fr; }
  .promo-crop { width: 78%; }
  .prize-seal { left: auto; right: 0; bottom: 24px; }
  .newsletter-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
