:root {
  --ink: #142231;
  --muted: #556472;
  --paper: #EEF2F4;
  --surface: #FFFFFF;
  --line: #CED8DF;
  --line-soft: #E2E8EC;
  /* Nirvana blue, deepened so white text on it stays readable */
  --sign: #0B6CA6;
  --sign-dark: #08527F;
  --sign-tint: #E6F3FB;
  --brand-blue: #12A5E0;
  --attention: #FBC52D;
  --danger: #B42318;
  --danger-tint: #FDECEA;
  --radius: 10px;
  --font: "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sign); text-underline-offset: 2px; }
a:hover { color: var(--sign-dark); }
:focus-visible { outline: 3px solid var(--attention); outline-offset: 2px; }
[hidden] { display: none !important; }

.shell { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.loading { color: var(--muted); text-align: center; padding: 20vh 0; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.brand { display: inline-flex; color: var(--ink); text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  font: 600 14px/1 var(--font); color: var(--muted); background: none; border: 1px solid transparent;
  border-radius: 6px; padding: 8px 10px; cursor: pointer;
}
.lang-switch button[aria-current="true"] { color: var(--ink); border-color: var(--line); background: var(--surface); }

/* The road sign: the one bold element */
.sign {
  position: relative;
  background: var(--sign);
  color: #fff;
  border-radius: 14px;
  padding: 26px 28px 24px;
  box-shadow: inset 0 0 0 4px var(--sign), inset 0 0 0 6px #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 22px;
  align-items: center;
}
.sign-arrow { grid-row: span 2; width: 64px; height: 64px; }
.sign-destination { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.sign-destination strong { font-size: clamp(44px, 9vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.sign-destination span { font-size: clamp(30px, 6vw, 46px); font-weight: 700; line-height: 1; font-family: "Geeza Pro", "Noto Kufi Arabic", "Segoe UI", sans-serif; }
.sign-origin { font-size: 18px; font-weight: 600; opacity: .92; }
.sign.compact { padding: 18px 22px 16px; }
.sign.compact .sign-arrow { width: 44px; height: 44px; }
.sign.compact .sign-destination strong { font-size: clamp(34px, 7vw, 48px); }
.sign.compact .sign-destination span { font-size: clamp(24px, 5vw, 32px); }
.sign.compact .sign-origin { font-size: 16px; }

/* Photo hero */
.hero { margin: 0; }
.hero-photo { position: relative; border-radius: 16px; overflow: hidden; background: #C9DCE8; aspect-ratio: 16 / 9; max-height: 380px; width: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: linear-gradient(90deg, var(--attention) 0 30%, var(--brand-blue) 30%); }
.hero.compact .hero-photo { aspect-ratio: auto; height: 200px; }
.hero.compact .hero-photo img { object-position: center 62%; }

/* Landing */
.landing { display: flex; flex-direction: column; gap: 28px; }
.landing .brand img { height: 52px; }
.landing h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; font-weight: 800; }
.landing .intro { margin: 0; color: var(--muted); max-width: 60ch; }
.landing .intro + .intro { margin-top: 4px; }
.choose-label { font-weight: 700; margin: 0 0 12px; }
.lang-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang-choice {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; text-decoration: none;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.lang-choice:hover { border-color: var(--sign); background: var(--sign-tint); color: var(--ink); }
.lang-choice strong { font-size: 22px; font-weight: 800; }
.lang-choice span { font-size: 15px; color: var(--muted); }

/* Form page header */
.page-head { margin: 24px 0 8px; }
.page-head h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; margin: 0 0 8px; font-weight: 800; }
.page-head p { margin: 0; color: var(--muted); max-width: 62ch; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fact { padding: 14px 16px; }
.fact + .fact { border-left: 1px solid var(--line-soft); }
.fact strong { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact span { font-size: 14px; color: var(--muted); }

.notices { background: var(--surface); border-left: 4px solid var(--attention); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 0 0 32px; }
.notices h2 { font-size: 17px; margin: 0 0 8px; font-weight: 800; }
.notices ul { margin: 0; padding-left: 20px; }
.notices li { margin: 6px 0; font-size: 16px; }
.notices .contact { margin: 12px 0 0; font-size: 16px; }

/* Form */
form { display: grid; gap: 20px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.section-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; transform: translateY(-2px);
}
.section-head h2 { font-size: 20px; margin: 0; font-weight: 800; line-height: 1.2; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { grid-column: 1 / -1; display: grid; gap: 6px; align-content: start; min-width: 0; }
.field.half { grid-column: span 1; }
.field > label, .field legend { font-weight: 700; font-size: 16px; padding: 0; }
.field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.hint { font-size: 14px; color: var(--muted); margin-top: -4px; }
.req { color: var(--danger); margin-left: 2px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="url"] {
  width: 100%; font: 400 17px/1.3 var(--font); color: var(--ink);
  padding: 12px 14px; min-height: 50px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 8px; appearance: none;
}
input:hover { border-color: #AEBBC5; }
input:focus { border-color: var(--sign); outline: none; box-shadow: 0 0 0 3px var(--attention); }
.field.invalid input[type="text"], .field.invalid input[type="email"], .field.invalid input[type="tel"], .field.invalid input[type="date"], .field.invalid input[type="url"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: 14px; font-weight: 600; }
.error:empty { display: none; }

/* Route cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { position: relative; display: block; cursor: pointer; }
.card input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.card-body {
  height: 100%; padding: 16px 18px 16px 48px; border: 2px solid var(--line); border-radius: var(--radius);
  display: grid; gap: 2px; transition: border-color .15s, background-color .15s;
}
.card-body::before {
  content: ""; position: absolute; left: 18px; top: 20px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #9AA9B4; background: #fff;
}
.card:hover .card-body { border-color: #9AA9B4; }
.card input:checked + .card-body { border-color: var(--sign); background: var(--sign-tint); }
.card input:checked + .card-body::before { border-color: var(--sign); background: radial-gradient(circle, var(--sign) 0 5px, #fff 6px); }
.card input:focus-visible + .card-body { box-shadow: 0 0 0 3px var(--attention); }
.card-title { font-weight: 800; font-size: 20px; line-height: 1.2; }
.card-place { font-weight: 600; }
.card-times { font-size: 15px; color: var(--muted); }
.card-map { font-size: 15px; font-weight: 600; margin-top: 4px; justify-self: start; }
.field.invalid .card-body { border-color: var(--danger); }

/* Radio / checkbox rows */
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option, .consent { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.option { padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 8px; align-items: center; }
.option:has(input:checked) { border-color: var(--sign); background: var(--sign-tint); }
.field.invalid .option { border-color: var(--danger); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--sign); width: 20px; height: 20px; margin: 0; flex: none; }
.consent { padding: 14px 16px; background: var(--paper); border-radius: 8px; font-size: 16px; }
.consent input { margin-top: 3px; }
.field.invalid .consent { background: var(--danger-tint); }

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

.submit-row { display: grid; gap: 12px; }
.form-error { background: var(--danger-tint); color: var(--danger); border-radius: 8px; padding: 12px 16px; font-weight: 600; font-size: 16px; }
.form-error:empty { display: none; }

.btn {
  font: 800 18px/1 var(--font); border: 0; border-radius: 10px; padding: 18px 24px; cursor: pointer;
  background: var(--sign); color: #fff; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; gap: 10px;
}
.btn:hover { background: var(--sign-dark); color: #fff; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); font-weight: 700; font-size: 16px; padding: 14px 20px; }
.btn.secondary:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success: a ticket stub */
.ticket { margin-top: 24px; background: var(--surface); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.ticket-top { padding: 28px; }
.ticket-top h1 { font-size: clamp(24px, 5vw, 30px); margin: 0 0 18px; line-height: 1.2; font-weight: 800; }
.ref-label { font-size: 15px; color: var(--muted); margin: 0; }
.ref { font-size: clamp(30px, 8vw, 44px); font-weight: 800; letter-spacing: .02em; margin: 2px 0 14px; line-height: 1.1; font-variant-numeric: tabular-nums; word-break: break-all; }
.ticket-top p { margin: 0; }
.ticket-tear { height: 0; border-top: 2px dashed var(--line); margin: 0 18px; position: relative; }
.ticket-tear::before, .ticket-tear::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.ticket-tear::before { left: -31px; }
.ticket-tear::after { right: -31px; }
.ticket-bottom { padding: 24px 28px 28px; }
.ticket-bottom h2 { font-size: 17px; margin: 0 0 12px; font-weight: 800; }
.steps { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sign-tint); color: var(--sign); font-weight: 800; font-size: 14px; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ticket-actions p { margin: 0; font-size: 15px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .ticket { animation: issue .45s cubic-bezier(.2,.8,.2,1); }
  @keyframes issue { from { opacity: 0; transform: translateY(12px); } }
}

.notfound { text-align: center; padding: 18vh 0; }
.notfound h1 { font-weight: 800; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .sign { padding: 20px 20px 18px; gap: 4px 14px; }
  .sign-arrow { width: 44px; height: 44px; }
  .hero.compact .hero-photo { height: 180px; }
  .brand img { height: 32px; }
  .landing .brand img { height: 40px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .section { padding: 20px 16px; }
  .fields, .cards { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .lang-choices { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
.landing-contact a { color: inherit; }
