/* ============================================================
   Tixlinx design system
   Palette:  --bg #0E1220 (ink navy) / --surface #161B2E / --surface-2 #1D2340
             --accent #F5B942 (stub gold) / --accent-2 #1FB8A6 (stamp teal)
             --text #EDEFF7 / --muted #8890A6 / --danger #FF6B6B
   Type:     display = 'Big Shoulders Display' (stadium signage energy)
             body    = 'Inter'
             mono    = 'IBM Plex Mono' (counters, transaction IDs)
   Signature: every card is a literal ticket stub - dashed perforation +
             semi-circle notches cut from the divider, echoing a torn
             admission ticket.
   ============================================================ */

:root {
  --bg: #0e1220;
  --bg-elevated: #0b0e19;
  --surface: #161b2e;
  --surface-2: #1d2340;
  --border: rgba(237, 239, 247, 0.08);
  --accent: #f5b942;
  --accent-dim: #b8862c;
  --accent-2: #1fb8a6;
  --text: #edeff7;
  --muted: #8890a6;
  --danger: #ff6b6b;
  --success: #6fd99a;
  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(31, 184, 166, 0.08), transparent 40%),
    radial-gradient(circle at 88% 92%, rgba(245, 185, 66, 0.07), transparent 45%);
  background-attachment: fixed;
}

::selection {
  background: var(--accent);
  color: #14161f;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.02;
}

.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent-2);
}

/* ---------- Nav ---------- */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(14, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.nav-logo .dot {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #1a1508;
  box-shadow: 0 8px 24px -8px rgba(245, 185, 66, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px -6px rgba(245, 185, 66, 0.7);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.btn-block {
  width: 100%;
}

/* ---------- Form fields ---------- */
.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 0.9rem;
  border-radius: 9px;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(31, 184, 166, 0.18);
}

.field-error {
  color: var(--danger);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

/* ---------- Flash messages ---------- */
.flash {
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.flash-error {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffb4b4;
}

.flash-success {
  background: rgba(111, 217, 154, 0.1);
  border-color: rgba(111, 217, 154, 0.35);
  color: var(--success);
}

/* ============================================================
   Ticket card - the signature element.
   A card with a dashed perforation and two semicircle notches
   cut out of the edge, like a torn admission stub.
   ============================================================ */
.ticket {
  position: relative;
  display: flex;
  background: linear-gradient(155deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.75);
}

.ticket-body {
  flex: 1;
  padding: 1.6rem 1.7rem;
  min-width: 0;
}

.ticket-stub {
  width: 108px;
  flex-shrink: 0;
  position: relative;
  border-left: 2px dashed rgba(237, 239, 247, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
}

.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  left: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
}

.ticket-stub::before {
  top: -11px;
}

.ticket-stub::after {
  bottom: -11px;
}

.ticket-stub-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
}

/* Simple flat variant without the stub, for smaller list rows */
.ticket-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

/* ---------- Credit balance counter ---------- */
.credit-counter {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.credit-counter .unit {
  font-size: 1.1rem;
  color: var(--muted);
  margin-left: 0.35rem;
}

/* Barcode-style decorative stripe */
.barcode {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  opacity: 0.55;
}

.barcode span {
  background: var(--accent-2);
  width: 3px;
  display: inline-block;
}

/* ---------- Package selection cards ---------- */
.package-card {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  border: 1px solid var(--border);
}

.package-card:hover {
  transform: translateY(-3px);
}

.package-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.5s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    animation: none;
  }
}

/* ---------- Landing hero ---------- */
.hero-grid {
  background-image: linear-gradient(rgba(237, 239, 247, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 239, 247, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
}

@media (max-width: 640px) {
  .ticket {
    flex-direction: column;
  }
  .ticket-stub {
    width: 100%;
    height: 56px;
    border-left: none;
    border-top: 2px dashed rgba(237, 239, 247, 0.18);
  }
  .ticket-stub::before,
  .ticket-stub::after {
    top: -11px;
    left: auto;
  }
  .ticket-stub::before {
    left: -11px;
  }
  .ticket-stub::after {
    right: -11px;
  }
  .ticket-stub-label {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .credit-counter {
    font-size: 2.4rem;
  }
}
