:root {
  --teal: #003b49;
  --teal-deep: #00262f;
  --teal-mid: #00566a;
  --copper: #c68e65;
  --copper-deep: #a8734a;
  --ivory: #f6f1e8;
  --paper: #fffcf7;
  --ink: #1d2c30;
  --muted: #66757a;
  --line: rgba(0, 59, 73, 0.12);
  --danger: #9b2c2c;
  --shadow: 0 24px 80px rgba(0, 38, 47, 0.18);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Outfit", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Outfit", "Segoe UI", sans-serif;
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--arabic);
  color: var(--ink);
  background: var(--ivory);
  min-height: 100vh;
}

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

button,
input {
  font-family: inherit;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1.08fr);
}

@media (min-width: 981px) {
  .shell {
    height: 100vh;
    overflow: hidden;
  }

  .stage {
    overflow-y: auto;
  }
}

.brand {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #f8f4ee;
}

.brand-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 38, 47, 0.18), rgba(0, 38, 47, 0.18)),
    url("../media/hero.jpg") center / cover no-repeat;
  transform: scale(1.04);
}

.brand-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 38, 47, 0.28) 0%, rgba(0, 38, 47, 0.72) 62%, rgba(0, 26, 32, 0.9) 100%),
    linear-gradient(90deg, transparent 40%, rgba(0, 38, 47, 0.25));
}

.brand-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 48px 56px;
  max-width: 520px;
}

.brand-logo {
  width: 118px;
  height: auto;
  border-radius: 18px;
  background: #f8f7f5;
  padding: 10px 12px 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.brand-kicker {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--copper);
  font-size: 1.05rem;
}

.brand-title {
  margin: 0 0 16px;
  font-family: var(--arabic);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.35;
}

.brand-copy {
  margin: 0 0 28px;
  color: rgba(248, 244, 238, 0.78);
  line-height: 1.8;
  font-size: 0.98rem;
}

.brand-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(198, 142, 101, 0.35);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
}

.brand-rule-time {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--copper);
  line-height: 1;
}

.brand-rule-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
}

.brand-rule-text small {
  font-weight: 400;
  color: rgba(248, 244, 238, 0.62);
  font-size: 0.78rem;
  font-family: var(--sans);
}

.brand-social {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.brand-social a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.brand-social a:hover {
  background: rgba(198, 142, 101, 0.2);
  border-color: var(--copper);
}

.brand-social svg {
  width: 18px;
  height: 18px;
}

.stage {
  background: var(--paper);
  padding: 36px 48px 32px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.stage-head {
  margin-bottom: 28px;
}

.stage-logo {
  display: none;
  width: 86px;
  margin-inline: auto 0;
  margin-bottom: 18px;
  border-radius: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--sans);
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--copper-deep);
  font-weight: 600;
}

.stage-head h2,
.success h2 {
  margin: 0;
  font-family: var(--arabic);
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  color: var(--teal);
  font-weight: 700;
}

.stage-head h2 span {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--muted);
}

.stage-lead,
.success-lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

[hidden] {
  display: none !important;
}

.form {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.field label,
.label-row,
legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--teal);
  font-weight: 600;
}

legend {
  padding: 0;
  width: 100%;
}

.en,
.stage-head h2 span {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--muted);
}

input[type="text"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 4px rgba(198, 142, 101, 0.16);
}

.hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.error {
  min-height: 0;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.8rem;
}

.field.is-invalid input,
.choice-block.is-invalid .choice-card,
.policy.is-invalid .policy-box {
  border-color: #e3b2b2;
}

.stepper {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 10px;
  align-items: center;
}

.stepper input {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--teal);
}

.stepper-btn {
  height: 52px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--teal);
  border-radius: 14px;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.stepper-btn:hover {
  border-color: var(--copper);
  background: #fff8f1;
}

.choice-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0;
  background: rgba(255, 255, 255, 0.7);
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.choice-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.choice-card svg {
  width: 24px;
  height: 24px;
  color: var(--copper-deep);
}

.choice-card strong {
  color: var(--teal);
  font-size: 0.92rem;
}

.choice-card em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--sans);
}

.choice input:checked + .choice-card,
.choice:hover .choice-card {
  border-color: var(--copper);
  background: #fff8f1;
  transform: translateY(-1px);
}

.choice input:checked + .choice-card {
  box-shadow: inset 0 0 0 1px var(--copper);
}

.choice input:focus-visible + .choice-card {
  box-shadow: 0 0 0 4px rgba(198, 142, 101, 0.16);
}

.policy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}

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

.policy-box {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 2px;
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  background: #fff;
  position: relative;
}

.policy input:checked + .policy-box {
  background: var(--teal);
  border-color: var(--teal);
}

.policy input:checked + .policy-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.policy-text {
  line-height: 1.7;
  color: var(--ink);
  font-size: 0.92rem;
}

.submit {
  border: 0;
  background: var(--teal);
  color: #fff;
  border-radius: 999px;
  padding: 16px 22px;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 30px rgba(0, 59, 73, 0.22);
  transition: background 0.2s ease, transform 0.2s ease;
}

.submit:hover {
  background: var(--teal-mid);
  transform: translateY(-1px);
}

.submit.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.success {
  max-width: 520px;
  animation: rise 0.45s ease;
}

.success-mark {
  width: 72px;
  color: var(--copper);
  margin-bottom: 8px;
}

.ticket {
  margin: 22px 0;
  padding: 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed rgba(198, 142, 101, 0.55);
}

.ticket dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin: 0;
}

.ticket dt {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 3px;
}

.ticket dd {
  margin: 0;
  color: var(--teal);
  font-weight: 600;
}

.ghost {
  border: 1px solid var(--teal);
  background: transparent;
  color: var(--teal);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
}

.stamp {
  margin-top: auto;
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.78rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .brand {
    min-height: 38vh;
  }

  .brand-inner {
    padding: 22px 20px 24px;
    max-width: none;
    gap: 18px;
  }

  .brand-title {
    font-size: 1.45rem;
  }

  .brand-copy,
  .brand-social {
    display: none;
  }

  .brand-rule {
    padding: 12px 14px;
  }

  .stage {
    padding: 24px 20px 32px;
    min-height: auto;
  }

  .stage-logo {
    display: none;
  }

  .choice-grid-3 {
    grid-template-columns: 1fr;
  }

  .ticket dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .choice-grid-2 {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .success,
  .choice-card,
  .submit {
    transition: none;
    animation: none;
  }
}
