/* KnackTap website. Same tokens as the iOS app (docs/DESIGN.md). */
:root {
  --canvas: #f4f5f7;
  --surface: #ffffff;
  --well: #ebedf0;
  --ink: #000000;
  --ink-2: #5a5c63;
  --ink-3: #8a8d94;
  --hairline: rgba(0, 0, 0, 0.08);
  --positive: #137a3f;
  --accent: #ffcb1f;
  --accent-soft: #fff4cc;
  --shadow: 20, 26, 46;
  --radius-m: 16px;
  --radius-l: 22px;
  --screen: clamp(20px, 5vw, 56px);
  --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--screen); }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px; padding-bottom: 28px;
}
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.top nav { display: flex; gap: 24px; font-size: 15px; color: var(--ink-2); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--ink); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
  padding-top: clamp(24px, 6vw, 72px); padding-bottom: clamp(56px, 9vw, 120px);
}
h1 {
  font-size: clamp(42px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 700; margin: 0 0 20px;
}
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 30em; margin: 0 0 32px; }
.lede strong { color: var(--ink); font-weight: 600; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 17px; text-decoration: none;
  transition: transform 0.1s ease-out;
}
.pill:active { transform: scale(0.97); }
.pill.primary { background: var(--accent); color: #000; }
.pill.secondary { background: var(--well); color: var(--ink); }
.cta .note { font-size: 15px; color: var(--ink-2); }

/* The ticket */
.tickets { position: relative; min-height: 360px; }
.ticket {
  --stub: 112px;
  position: relative; display: grid; grid-template-columns: 1fr var(--stub);
  background: var(--surface); border-radius: var(--radius-l);
  box-shadow: 0 1px 1.5px rgba(var(--shadow), 0.05), 0 8px 24px rgba(var(--shadow), 0.08);
  border: 0.5px solid var(--hairline);
  overflow: hidden;
  -webkit-mask:
    radial-gradient(circle 8px at calc(100% - var(--stub)) 0, transparent 7.5px, #000 8px) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at calc(100% - var(--stub)) 100%, transparent 7.5px, #000 8px) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle 8px at calc(100% - var(--stub)) 0, transparent 7.5px, #000 8px) top / 100% 51% no-repeat,
    radial-gradient(circle 8px at calc(100% - var(--stub)) 100%, transparent 7.5px, #000 8px) bottom / 100% 51% no-repeat;
}
.ticket .main { padding: 22px 22px 22px 24px; display: grid; gap: 10px; align-content: start; }
.ticket .stub {
  display: grid; place-content: center; text-align: center; gap: 2px;
  background: var(--accent-soft);
  border-left: 1.5px dotted rgba(0, 0, 0, 0.22);
  font-variant-numeric: tabular-nums;
}
.ticket.live .stub { background: var(--accent); }
.ticket .price { font: 700 30px/1 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; letter-spacing: -0.01em; }
.ticket .mins { font: 600 14px/1.2 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; }
.ticket .kind { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.ticket .title { font-weight: 600; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.ticket .who { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 600 12px ui-rounded, -apple-system, sans-serif; color: rgba(0, 0, 0, 0.78); background: #e7ddf0;
}
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); position: relative; }
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--positive); opacity: 0.35;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: 0.35; } to { transform: scale(2.6); opacity: 0; } }

.tickets .ticket { position: absolute; left: 0; right: 0; }
.tickets .t1 { top: 0; transform: rotate(-2.5deg) translateX(18px); }
.tickets .t2 { top: 104px; transform: rotate(1.2deg) translateX(-6px); }
.tickets .t3 { top: 196px; transform: none; box-shadow: 0 2px 2px rgba(var(--shadow), 0.07), 0 16px 36px rgba(var(--shadow), 0.14); }
.tickets .t1 .main, .tickets .t2 .main { padding-bottom: 40px; }

@media (prefers-reduced-motion: no-preference) {
  .tickets .ticket { animation: settle 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  .tickets .t2 { animation-delay: 0.08s; }
  .tickets .t3 { animation-delay: 0.16s; }
  @keyframes settle { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) { .dot::after { animation: none; } }

/* Sections */
section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--hairline); }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 12px; font-weight: 700; }
.sub { color: var(--ink-2); max-width: 36em; margin: 0 0 40px; font-size: 18px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li {
  background: var(--surface); border: 0.5px solid var(--hairline); border-radius: var(--radius-l);
  padding: 24px; counter-increment: step;
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 700 15px ui-rounded, -apple-system, sans-serif; margin-bottom: 18px;
}
.steps h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }

.price-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 640px; }
.fare {
  background: var(--surface); border: 0.5px solid var(--hairline); border-radius: var(--radius-l);
  padding: 24px; display: flex; align-items: baseline; justify-content: space-between;
}
.fare .big { font: 700 44px/1 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; letter-spacing: -0.02em; }
.fare .len { font: 600 18px ui-rounded, -apple-system, sans-serif; color: var(--ink-2); }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: var(--ink-2); max-width: 40em; }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }

.cats { display: flex; flex-wrap: wrap; gap: 10px; }
.cats span {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 10px 16px; font-size: 15px; font-weight: 600;
}
.cats span.verify::after { content: "Verified"; margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--positive); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); }
.split p { color: var(--ink-2); margin: 0 0 14px; }

footer { border-top: 1px solid var(--hairline); padding: 32px 0 48px; color: var(--ink-2); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Legal pages */
.doc { max-width: 720px; padding-top: 24px; padding-bottom: 96px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc .updated { color: var(--ink-2); margin: 0 0 40px; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: #1c1d21; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .tickets { min-height: 340px; max-width: 520px; }
  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .top nav .hide-s { display: none; }
}
@media (max-width: 420px) {
  .ticket { --stub: 92px; }
  .ticket .price { font-size: 26px; }
  .price-row { grid-template-columns: 1fr; }
}
