/* Tourism College expo — "boarding pass" identity.
   The event is a trip: from the lecture hall to the event floor. */
:root {
  --ink: #062b1b;        /* deepest green: text on light, dark surfaces */
  --kau: #025832;        /* KAU logo green */
  --kau-2: #0a7a43;      /* hover / lighter KAU */
  --leaf: #85c340;       /* logo leaf green: accents, success */
  --sage: #d2e7be;       /* logo pale green */
  --mist: #eef3e6;       /* page background */
  --sand: #e3c489;       /* heritage sand: ticket stub, warm details */
  --sand-50: #fbf6ea;
  --text: #10241a;
  --muted: #56685d;
  --line: #d5e0cc;
  --red: #b42318;
  --red-50: #fdecea;
  --amber: #9a5a06;
  --amber-50: #fff4e0;
  --display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  color: var(--text);
  background: var(--mist);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--kau); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 560px); margin-inline: auto; }

/* ---------- top bar (sits on the hero image) ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(16px, calc((100% - 1080px) / 2));
}
.logo-chip {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff;
}
.logo-chip img {
  width: 46px; height: 60px; object-fit: contain;
  background: #fff; border-radius: 12px; padding: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.logo-chip span { line-height: 1.3; font-size: 13.5px; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.logo-chip b { display: block; font-size: 15px; }
.topbar .mini-link {
  color: #fff; font-weight: 600; font-size: 14px; text-decoration: none;
  background: rgba(6, 43, 27, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 7px 14px;
}

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(92svh, 820px);
  display: flex; align-items: flex-end;
  color: #fff; background: var(--ink);
}
.hero-img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(6,43,27,.55) 0%, rgba(6,43,27,0) 26%),
    linear-gradient(to top, var(--ink) 4%, rgba(6,43,27,.86) 38%, rgba(6,43,27,0) 72%);
}
.hero-inner { padding: 120px 0 34px; width: min(100% - 32px, 1080px); margin-inline: auto; }
/* Phones: the photo fills the top of the screen (palms and old town in view),
   and the text sits on solid green underneath instead of over the picture. */
@media (max-width: 759px) {
  .hero { min-height: 0; }
  .hero-img { height: 56vh; min-height: 330px; object-position: 38% 78%; }
  .hero::after {
    background:
      linear-gradient(to bottom, rgba(6,43,27,.6) 0, rgba(6,43,27,0) 120px),
      linear-gradient(to bottom, rgba(6,43,27,0) calc(max(56vh, 330px) - 190px), var(--ink) max(56vh, 330px));
  }
  .hero-inner { padding-top: calc(max(56vh, 330px) - 120px); }
}
.hero-kicker { margin: 0 0 14px; font-size: 15px; color: var(--sage); font-weight: 500; }

/* the route: the one bold element of the identity */
.route {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px;
}
.stop small { display: block; font-size: 14px; color: var(--sage); margin-bottom: 2px; }
.stop b {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(30px, 8.4vw, 64px); line-height: 1.15; letter-spacing: -.5px;
}
.stop.to { text-align: left; }
.path {
  position: relative; width: clamp(54px, 14vw, 180px); height: 40px; margin-bottom: clamp(10px, 2.4vw, 22px);
}
.path::before {
  content: ""; position: absolute; inset: 50% 0 auto 0; border-top: 2px dashed rgba(210, 231, 190, .7);
}
.path svg {
  position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%);
  color: var(--leaf); background: var(--ink); padding: 3px; border-radius: 50%;
  animation: fly 1.4s cubic-bezier(.2,.8,.2,1) both .3s;
}
@keyframes fly { from { left: 100%; opacity: 0; } to { left: 50%; opacity: 1; } }

/* departure board */
.board {
  margin-top: 26px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(210, 231, 190, .28); border-radius: 16px; overflow: hidden;
  background: rgba(2, 30, 18, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.board > div { padding: 12px 14px; }
.board > div + div { border-inline-start: 1px solid rgba(210, 231, 190, .2); }
.board dt { font-size: 12.5px; color: var(--sage); }
.board dd {
  margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(14px, 3.6vw, 19px);
  line-height: 1.45; color: #fff;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 24px; }
.hero-cta .text-link { color: #fff; }

/* ---------- about ---------- */
.about { padding: 46px 0 30px; }
.about h2 {
  font-family: var(--display); font-weight: 800; color: var(--kau);
  font-size: clamp(24px, 5.4vw, 34px); line-height: 1.4; margin: 0 0 12px; max-width: 22ch;
}
.about p { margin: 0; font-size: 17px; max-width: 62ch; color: #243a2e; }
.about .closing {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  font-family: var(--display); font-weight: 600; color: var(--kau); font-size: 17px;
}

.site-foot {
  margin-top: 30px; padding: 22px 0 110px; color: var(--muted); font-size: 13.5px;
  border-top: 1px solid var(--line);
}
.site-foot .wrap { display: flex; gap: 14px; align-items: center; }
.site-foot img { width: 34px; height: 44px; object-fit: contain; }

/* sticky call to action on phones */
.dock {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--mist) 60%, rgba(238,243,230,0));
  transform: translateY(110%); transition: transform .3s ease;
}
.dock.show { transform: none; }
.dock .btn { width: 100%; }
@media (min-width: 760px) { .dock { display: none; } .site-foot { padding-bottom: 30px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 30px;
  border: 0; border-radius: 14px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 17px; text-decoration: none;
  transition: background-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--leaf); color: var(--ink); }
.btn-primary:hover { background: #95d04f; }
.btn-dark { background: var(--kau); color: #fff; }
.btn-dark:hover { background: var(--kau-2); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--kau); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-wide { width: 100%; }
.btn svg { width: 22px; height: 22px; flex: none; }
.text-link {
  background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 600;
  color: var(--kau); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}

.saved-ticket {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding: 10px 10px 10px 14px; border-radius: 14px;
  background: rgba(133, 195, 64, .18); border: 1px solid rgba(133, 195, 64, .5);
}
.saved-ticket span { font-weight: 600; font-size: 15px; }
.saved-ticket .btn { min-height: 42px; padding: 0 16px; font-size: 15px; }

/* ---------- form pages ---------- */
.page-head {
  background: var(--ink); color: #fff; position: relative; overflow: hidden; isolation: isolate;
  padding: 92px 0 54px;
}
.page-head img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; z-index: -1; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--ink), rgba(6,43,27,.35)); }
.page-head h1 { font-family: var(--display); font-weight: 800; margin: 0; font-size: clamp(26px, 6.4vw, 38px); line-height: 1.35; }
.page-head p { margin: 6px 0 0; color: var(--sage); }

.sheet {
  position: relative; z-index: 2; margin-top: -28px; margin-bottom: 40px;
  background: #fff; border-radius: 22px; padding: 26px 20px 22px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(6, 43, 27, .35);
}
.field { margin-bottom: 18px; }
.field > label, .field-label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 15px; }
.field input, .field select {
  width: 100%; min-height: 54px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fbfcf9;
  font-size: 16px; /* 16px keeps iOS from zooming */
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--kau); box-shadow: 0 0 0 4px rgba(133, 195, 64, .25); background: #fff; }
.field input[dir="ltr"] { text-align: right; }
.field input[dir="ltr"]:focus, .field input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23025832' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; background-size: 20px;
  padding-inline-end: 44px;
}
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field .err { font-size: 13.5px; color: var(--red); margin-top: 6px; font-weight: 600; }
.field.invalid input, .field.invalid select { border-color: var(--red); background: var(--red-50); }
.dept {
  margin: -6px 0 18px; padding: 14px 14px 0; border-radius: 14px;
  background: var(--mist); border: 1px dashed #b9cfa5;
  animation: open .2s ease;
}
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; font-size: 15px; }
.alert-error { background: var(--red-50); color: var(--red); }
.alert-ok { background: rgba(133, 195, 64, .2); color: var(--kau); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.form-foot { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- boarding pass ---------- */
/* Two pieces of paper joined at a perforation: the main part the student keeps,
   and the stub with the QR that tears off at the gate. */
.pass {
  --paper: #fffef9; --notch: 13px;
  position: relative; margin: 18px 0;
  filter: drop-shadow(0 1px 1px rgba(6, 43, 27, .10)) drop-shadow(0 18px 22px rgba(6, 43, 27, .17));
}
.pass-main, .pass-stub { position: relative; isolation: isolate; }
.pass-main::after, .pass-stub::after {        /* paper grain */
  content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.pass-main {
  background: var(--paper); border-radius: 22px 22px 0 0; overflow: hidden;
  -webkit-mask: radial-gradient(circle var(--notch) at left bottom, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at right bottom, #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at left bottom, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at right bottom, #0000 97%, #000) right / 51% 100% no-repeat;
}
.pass-top {
  color: #fff; padding: 13px 18px; display: flex; align-items: center; gap: 12px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 2px, transparent 2px 8px), var(--kau);
}
.pass-top img { width: 38px; height: 50px; object-fit: contain; background: #fff; border-radius: 9px; padding: 3px; }
.pass-top .t { flex: 1; line-height: 1.3; }
.pass-top .t b { display: block; font-family: var(--display); font-size: 17px; }
.pass-top .t span { font-size: 12px; color: var(--sage); letter-spacing: .04em; }
.pass-top .no { text-align: left; line-height: 1.25; }
.pass-top .no small { display: block; font-size: 11.5px; color: var(--sage); }
.pass-top .no span { font-family: var(--display); font-weight: 800; font-size: 17px; direction: ltr; color: var(--leaf); }

.pass-route { display: grid; grid-template-columns: 1fr minmax(84px, 120px) 1fr; align-items: center; gap: 6px; padding: 16px 18px 4px; }
.pass-route .stop small { display: block; font-size: 12px; color: var(--muted); }
.pass-route .stop strong { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 10vw, 44px); line-height: 1.05; color: var(--ink); direction: ltr; text-align: right; letter-spacing: .01em; }
.pass-route .stop span { display: block; font-weight: 600; font-size: 13.5px; color: var(--kau); margin-top: 3px; }
.pass-route .to, .pass-route .to strong { text-align: left; }
.flight { text-align: center; }
.flight svg { width: 100%; height: auto; display: block; overflow: visible; }
.flight .arc { fill: none; stroke: #c9d6bf; stroke-width: 1.6; stroke-dasharray: 4 4; }
.flight circle { fill: var(--paper); }
.flight .plane { fill: var(--kau); }
.flight small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

.pass-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 12px 18px 4px; gap: 10px 16px; }
.pass-grid div { min-width: 0; }
.pass-grid .wide { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px solid #ece9df; }
.pass-grid dt, .pass-times dt { font-size: 12px; color: var(--muted); }
.pass-grid dd { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.pass-grid .wide dd { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.45; color: var(--ink); }
.pass-grid dd.num { font-family: var(--display); font-weight: 700; direction: ltr; text-align: right; }

.pass-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 18px 0; }
.pass-times div { background: #f3f6ee; border-radius: 12px; padding: 8px 10px 7px; min-width: 0; }
.pass-times dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(16px, 4.6vw, 21px); white-space: nowrap; line-height: 1.35; color: var(--kau); }
.pass-times small { display: block; font-size: 11.5px; color: var(--muted); }
.fine { margin: 12px 18px 0; padding-bottom: 18px; font-size: 11.5px; color: #8a978e; }

.pass-stub {
  background: var(--sand-50); padding: 22px 18px 20px; text-align: center; border-radius: 0 0 22px 22px;
  -webkit-mask: radial-gradient(circle var(--notch) at left top, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at right top, #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at left top, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at right top, #0000 97%, #000) right / 51% 100% no-repeat;
}
/* perforation: a row of punched holes, half on each piece */
.pass-stub::before, .pass-main::before {
  content: ""; position: absolute; left: 22px; right: 22px; height: 4px; z-index: 4; pointer-events: none;
  background: radial-gradient(circle at 50% var(--hy), #dde5d4 0 2.4px, transparent 2.9px) 0 0 / 10px 4px repeat-x;
}
.pass-stub::before { top: 0; --hy: 0%; }
.pass-main::before { bottom: 0; --hy: 100%; }
.pass.torn .pass-main::before { display: none; }
.qr { width: min(100%, 260px); margin: 0 auto; background: #fff; padding: 12px; border-radius: 14px; border: 1px solid #eadcb9; }
.qr img { width: 100%; display: block; image-rendering: pixelated; }
.stub-meta { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.stub-meta span:first-child { font-family: var(--display); font-weight: 700; color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 14.5px; }
.status-ok { background: rgba(133, 195, 64, .25); color: var(--kau); }
.status-wait { background: #fff; color: var(--amber); border: 1px solid #eadcb9; }
.note { font-size: 14px; color: var(--muted); text-align: center; margin: 12px 0 34px; }

/* rubber stamp that lands when the ticket is used */
.pass-grid .wide { position: relative; }
.stamp {
  position: absolute; left: 4px; top: -2px; z-index: 5; display: none;
  padding: 8px 16px 7px; text-align: center; color: #1d7a3e; line-height: 1.25;
  border: 3px solid currentColor; border-radius: 12px; outline: 1.5px solid currentColor; outline-offset: 3px;
  transform: rotate(-9deg); mix-blend-mode: multiply; opacity: .9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.stamp b { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; }
.stamp span { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; }
.stamp small { display: block; font-size: 11px; font-weight: 700; }

/* used ticket: stub gone, torn edge, stamp on */
.pass.torn .pass-stub { display: none; }
.pass.torn .pass-main { clip-path: var(--tear-main); }
.pass.torn .stamp, .pass.tearing .stamp { display: block; }
.pass.tearing .pass-main { clip-path: var(--tear-main); }
.pass.tearing .pass-stub { clip-path: var(--tear-stub); }
.pass-stub.falling { position: fixed; margin: 0; z-index: 60; pointer-events: none; filter: drop-shadow(0 16px 20px rgba(6, 43, 27, .25)); }
.pass-stub.falling::before { display: none; }
#ticketView { overflow-x: clip; overflow-clip-margin: 12px; }
.after-tear { text-align: center; margin: 4px 0 34px; animation: rise .5s ease both; }
.after-tear p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* fresh ticket "prints" out of a slot */
.pass.print { animation: print 1.15s cubic-bezier(.2, .75, .25, 1) backwards; }
@keyframes print {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-46px); }
  to { clip-path: inset(0 0 -60px 0); transform: none; }
}
@media (prefers-reduced-motion: reduce) { .pass.print { animation: none; } }

/* ---------- misc ---------- */
.center-msg { text-align: center; padding: 70px 0; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 14px; border: 3px solid var(--line); border-top-color: var(--kau); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 760px) {
  .hero-inner { padding-bottom: 54px; }
  .stop b { white-space: nowrap; font-size: clamp(36px, 5.2vw, 64px); }
  .board > div { padding: 16px 20px; }
  .sheet { padding: 34px 34px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
