/* Onest is a variable font — one file covers weights 400–800 */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/onest-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/onest-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #222527;
  --lime: #D4F45B;
  --pad: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: #fff;
  font-family: 'Onest', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lime); text-decoration: none; }
a:hover { color: #E4FA8A; }
button, input { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,22,23,.7) 0%, rgba(20,22,23,.35) 40%, rgba(20,22,23,.6) 75%, var(--ink) 100%);
}
.wrap {
  position: relative; z-index: 2;
  max-width: 1240px; width: 100%;
  margin: 0 auto;
  padding-left: var(--pad); padding-right: var(--pad);
}

/* Header */
.bar { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; color: #fff; }
.logo:hover { color: #fff; }
.logo span { font-size: 22px; font-weight: 800; letter-spacing: -0.04em; }
.badge {
  height: 34px; padding: 0 14px; border-radius: 17px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--lime); }

/* Hero */
.hero {
  flex: 1;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  gap: 48px;
  padding-top: 40px; padding-bottom: 48px;
}
.copy {
  display: flex; flex-direction: column; gap: 24px;
  max-width: 620px; width: 100%;
  animation: hoRise .8s cubic-bezier(.2,.8,.2,1) both;
}
h1 {
  margin: 0;
  font-size: 72px; font-weight: 800; letter-spacing: -0.06em; line-height: .95;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hl {
  display: inline-block; margin-top: .14em;
  background: var(--lime); color: var(--ink);
  padding: .02em .2em .1em; border-radius: .22em; line-height: 1.05;
  text-shadow: none;
}
.lead { margin: 0; font-size: 19px; line-height: 1.5; color: #E4E6E7; max-width: 500px; text-wrap: pretty; }

/* Form */
.join { display: flex; flex-direction: column; gap: 10px; max-width: 540px; }
.field {
  background: #fff; border-radius: 34px; padding: 6px;
  display: flex; gap: 6px; flex-wrap: wrap;
  box-shadow: 0 30px 70px rgba(0,0,0,.3);
  border: 2px solid transparent; transition: border-color .2s ease;
}
.field.err { border-color: #E8916F; }
.field input {
  flex: 1 1 220px; min-width: 0; height: 56px;
  border: none; outline: none; background: transparent;
  padding: 0 20px; font-size: 17px; font-weight: 600; color: var(--ink);
}
.field input::placeholder { color: #8A8F93; }
.btn {
  height: 56px; padding: 0 8px 0 24px; border: none; border-radius: 28px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap;
  flex: none; transition: background .15s ease;
}
.btn:hover { background: #33383B; }
.btn:disabled { opacity: .7; cursor: progress; }
.btn-ico { width: 40px; height: 40px; border-radius: 20px; background: var(--lime); display: flex; align-items: center; justify-content: center; }
.note { font-size: 14px; padding-left: 22px; color: #C9CDCF; }
.note.err { color: #F4B7A3; font-weight: 600; }

/* Joined */
.done { display: flex; flex-direction: column; gap: 24px; }
.done[hidden], .join[hidden] { display: none; }
.done-card {
  background: #fff; color: var(--ink); border-radius: 32px; padding: 22px 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 30px 70px rgba(0,0,0,.3); max-width: 540px;
  animation: hoPop .35s cubic-bezier(.2,.9,.3,1.1) both;
}
.done-ico { width: 52px; height: 52px; border-radius: 26px; background: var(--lime); display: flex; align-items: center; justify-content: center; flex: none; }
.done-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.done-text strong { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.done-text > span { font-size: 15px; color: #4A4F52; line-height: 1.4; }
.reset {
  background: none; border: none; padding: 0 0 0 24px;
  font-size: 13px; color: #C9CDCF; cursor: pointer; align-self: flex-start; text-decoration: underline;
}

/* Ticket */
.ticket {
  display: none;
  width: 330px; flex: none;
  background: #fff; color: var(--ink); border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  transform: rotate(3deg);
  animation: hoTicket 1s cubic-bezier(.2,.8,.2,1) .25s both;
  -webkit-mask: radial-gradient(circle 14px at 0 150px, transparent 13.5px, #000 14px) left/51% 100% no-repeat, radial-gradient(circle 14px at 100% 150px, transparent 13.5px, #000 14px) right/51% 100% no-repeat;
          mask: radial-gradient(circle 14px at 0 150px, transparent 13.5px, #000 14px) left/51% 100% no-repeat, radial-gradient(circle 14px at 100% 150px, transparent 13.5px, #000 14px) right/51% 100% no-repeat;
}
.tk-top { height: 150px; padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 18px; }
.tk-head { display: flex; justify-content: space-between; align-items: center; }
.tk-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #6E7377; }
.pill {
  height: 24px; padding: 0 10px; border-radius: 12px;
  font-size: 12px; font-weight: 700; display: flex; align-items: center;
  background: #F3F4F4; color: #6E7377; transition: background .3s ease;
}
.pill.on { background: var(--lime); color: var(--ink); }
.tk-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.tk-route div { display: flex; flex-direction: column; gap: 2px; }
.tk-route .end { align-items: flex-end; }
.tk-route b { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }
.tk-route div span { font-size: 14px; color: #4A4F52; }
.tk-line { height: 2px; width: 44px; background: #E1E4E5; margin-bottom: 28px; }
.tk-cut { height: 0; border-top: 2px dashed #D5D8DA; margin: 0 20px; }
.tk-bottom { padding: 18px 24px 22px; display: flex; align-items: center; gap: 18px; }
.qr {
  width: 92px; height: 92px; flex: none;
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 1px;
  opacity: .18; transition: opacity .3s ease;
}
.qr.on { opacity: 1; }
.qr span { border-radius: 1px; }
.qr span.f { background: var(--ink); }
.tk-note { font-size: 14px; line-height: 1.45; color: #4A4F52; }

/* Footer */
.foot { padding-top: 20px; padding-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.copyr { font-size: 14px; color: #9AA0A4; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; }
.soc { display: flex; color: #fff; }
.soc:hover { color: var(--lime); }

/* Wide: ticket beside copy */
@media (min-width: 980px) {
  .hero { flex-direction: row; align-items: center; padding-top: 24px; padding-bottom: 40px; }
  h1 { font-size: clamp(72px, 7vw, 104px); }
  .ticket { display: block; }
}

/* Narrow: phones */
@media (max-width: 639px) {
  :root { --pad: 18px; }
  .bar { height: 64px; gap: 10px; }
  .logo span { font-size: 20px; }
  .logo svg { width: 26px; height: 26px; }
  .badge { height: 30px; padding: 0 11px; gap: 6px; font-size: 12px; }
  .hero { gap: 0; justify-content: center; padding-top: 12px; padding-bottom: 32px; }
  .copy { gap: 18px; }
  .note { padding-left: 0; }
  h1 { font-size: clamp(54px, 18vw, 80px); }
  .hl { font-size: .86em; }
  .lead { font-size: 17px; }
  .field input, .btn { height: 52px; }
  .btn { flex: 1 1 100%; }
  .foot { flex-direction: column; justify-content: center; gap: 10px; padding-top: 8px; padding-bottom: 18px; text-align: center; }
  .links { order: -1; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; }
  .soc { width: 38px; height: 38px; border-radius: 19px; align-items: center; justify-content: center; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .links a[href^="mailto"] { height: 38px; padding: 0 14px; border-radius: 19px; display: flex; align-items: center; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .copyr { font-size: 12px; }
  .badge-ext { display: none; }
}

/* Short phones: tighten so the page fits one screen */
@media (max-width: 639px) and (max-height: 720px) {
  .hero { padding-top: 4px; }
  .copy { gap: 14px; }
  h1 { font-size: clamp(48px, 16vw, 70px); }
  .lead { font-size: 16px; line-height: 1.45; }
  .field input, .btn { height: 48px; }
  .btn-ico { width: 36px; height: 36px; }
  .note { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .copy, .ticket, .done-card { animation: none; }
}

@keyframes hoRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hoTicket { from { opacity: 0; transform: translateY(30px) rotate(6deg); } to { opacity: 1; transform: rotate(3deg); } }
@keyframes hoPop { 0% { opacity: 0; transform: scale(.96); } 100% { opacity: 1; transform: none; } }
