/* =========================================================
   Solari — Coming Soon Template
   Designed & built by EdinStack
   ========================================================= */

:root {
  --paper: #f3eee4;
  --paper-2: #ebe4d6;
  --ink: #1c1a17;
  --ink-soft: #5b564d;
  --line: #d6cdbb;
  --accent: #2f4bff;
  --accent-ink: #ffffff;
  --flap-bg: #1f1d1a;
  --flap-bg-2: #2a2723;
  --flap-ink: #f5c84b;
  --ok: #2f8f5b;
  --warn: #d9a21b;
  --panel: #fbf8f2;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 40px -24px rgba(40,30,10,.35);
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  --paper: #13120f;
  --paper-2: #1a1915;
  --ink: #f1ece2;
  --ink-soft: #a29b8d;
  --line: #2e2b25;
  --flap-bg: #0b0a09;
  --flap-bg-2: #171512;
  --panel: #1b1a16;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 18px 40px -24px rgba(0,0,0,.8);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--mono);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .4s, color .4s;
  /* subtle dotted grid like an airport floor plan */
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
}

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

.board {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 90px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  border-radius: 8px;
}
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.dot { color: var(--accent); }

.topbar-meta { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.live { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.live i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(47,143,91,.6);
  animation: pulse 2s infinite;
}
.clock { font-weight: 600; font-variant-numeric: tabular-nums; }

.theme-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: 18px; cursor: pointer; display: grid; place-items: center;
  transition: transform .3s, border-color .3s;
}
.theme-btn:hover { transform: rotate(-20deg); border-color: var(--accent); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47,143,91,.55); }
  70% { box-shadow: 0 0 0 9px rgba(47,143,91,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,143,91,0); }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; max-width: 820px; }
.eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--accent); font-weight: 700; margin-bottom: 22px;
}
.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.headline em { font-style: italic; color: var(--accent); }
.accent { color: var(--accent); }
.lede {
  margin-top: 24px; max-width: 560px;
  font-size: 15px; line-height: 1.75; color: var(--ink-soft);
}

/* reveal on load */
.hero > *, .countdown, .grid { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.headline { animation-delay: .1s; }
.lede { animation-delay: .2s; }
.countdown { animation-delay: .3s; }
.grid { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Split-flap countdown ---------- */
.countdown {
  display: flex; align-items: flex-start; flex-wrap: wrap;
  gap: 14px;
  padding: 28px;
  background: var(--flap-bg-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.04);
}
.unit { display: flex; flex-direction: column; gap: 10px; }
.flaps { display: flex; gap: 6px; }
.unit-label {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: #8d867a;
}
.sep {
  font-size: 46px; font-weight: 700; color: #4b463e;
  line-height: 88px; align-self: flex-start;
}

.flap {
  --h: 88px;
  position: relative;
  width: 64px; height: var(--h);
  font-size: 58px; font-weight: 700;
  color: var(--flap-ink);
  perspective: 300px;
  font-variant-numeric: tabular-nums;
}
.flap .half {
  position: absolute; left: 0; right: 0;
  height: 50%; overflow: hidden;
  background: var(--flap-bg);
  backface-visibility: hidden;
}
.flap .half span {
  position: absolute; left: 0; right: 0;
  height: var(--h); line-height: var(--h); text-align: center;
}
.flap .top, .flap .top-flip {
  top: 0; border-radius: 8px 8px 0 0;
  transform-origin: 50% 100%;
  background: linear-gradient(#24221e, var(--flap-bg));
}
.flap .bottom, .flap .bottom-flip {
  bottom: 0; border-radius: 0 0 8px 8px;
  transform-origin: 50% 0%;
}
.flap .bottom span, .flap .bottom-flip span { top: calc(var(--h) / -2); }

/* the hinge line */
.flap::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; margin-top: -1px; background: rgba(0,0,0,.65); z-index: 5;
}
/* the little side pins */
.flap::before {
  content: ""; position: absolute; left: -2px; right: -2px; top: 50%;
  height: 6px; margin-top: -3px; z-index: 6;
  background:
    linear-gradient(#3b372f,#3b372f) left/3px 100% no-repeat,
    linear-gradient(#3b372f,#3b372f) right/3px 100% no-repeat;
}

.flap .top-flip { z-index: 3; transform: rotateX(0deg); }
.flap .bottom-flip { z-index: 2; transform: rotateX(90deg); }

.flap.flipping .top-flip { animation: flipTop .28s ease-in forwards; }
.flap.flipping .bottom-flip { animation: flipBottom .28s ease-out .28s forwards; }

@keyframes flipTop { to { transform: rotateX(-90deg); } }
@keyframes flipBottom { from { transform: rotateX(90deg); } to { transform: rotateX(0deg); } }

/* ---------- Panels ---------- */
.grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 22px; margin-top: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.departures { padding: 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel-head h2 {
  font-family: var(--serif); font-weight: 600; font-size: 22px;
  display: flex; align-items: center; gap: 10px;
}
.panel-head h2 i { color: var(--accent); }
.panel-tag {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft);
}

.dep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dep-table th {
  text-align: left; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600; padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
.dep-table td { padding: 14px 0; border-bottom: 1px dashed var(--line); font-weight: 600; letter-spacing: .04em; }
.dep-table tr:last-child td { border-bottom: 0; }
.dep-table td:nth-child(2) { color: var(--ink-soft); }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.done { color: var(--ok); }
.status.active { color: var(--accent); }
.status.active::before { animation: blink 1s steps(2) infinite; }
.status.wait { color: var(--warn); }
@keyframes blink { 50% { opacity: 0; } }

.progress { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.progress-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 10px; color: var(--ink-soft); }
.progress-row strong { color: var(--ink); font-size: 14px; }
.progress-track {
  height: 10px; border-radius: 99px; overflow: hidden;
  background: repeating-linear-gradient(-45deg, var(--paper-2) 0 6px, var(--line) 6px 7px);
}
.progress-bar {
  height: 100%; width: 0; border-radius: 99px;
  background: var(--accent);
  transition: width 1.8s cubic-bezier(.2,.7,.2,1);
}

/* ---------- Boarding pass ---------- */
.pass { display: grid; grid-template-columns: 1fr 120px; overflow: hidden; position: relative; }
.pass-main { padding: 26px; }
.pass-stub {
  position: relative;
  background: var(--accent); color: var(--accent-ink);
  padding: 26px 16px;
  display: flex; flex-direction: column; gap: 18px;
  border-left: 2px dashed rgba(255,255,255,.55);
}
/* punched notches */
.pass::before, .pass::after {
  content: ""; position: absolute; right: 108px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); z-index: 2;
}
.pass::before { top: -12px; box-shadow: inset 0 -1px 0 var(--line); }
.pass::after { bottom: -12px; box-shadow: inset 0 1px 0 var(--line); }

.stub-row small { display: block; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.stub-row strong { font-size: 20px; }
.barcode {
  margin-top: auto; height: 90px;
  background: repeating-linear-gradient(90deg,
    #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 8px,
    #fff 8px 11px, transparent 11px 12px, #fff 12px 13px, transparent 13px 16px);
  opacity: .9; border-radius: 3px;
}

.route {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 20px; margin-bottom: 18px; border-bottom: 1px dashed var(--line);
}
.route small { display: block; font-size: 10px; letter-spacing: .2em; color: var(--ink-soft); text-transform: uppercase; }
.route strong { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.route > i { font-size: 30px; color: var(--accent); }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 13px 14px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,75,255,.18); }
.field input.invalid { border-color: #d43c3c; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.btn {
  width: 100%; margin-top: 6px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14px; letter-spacing: .04em;
  background: var(--ink); color: var(--paper);
  transition: background .25s, transform .15s;
}
.btn i { font-size: 22px; transition: transform .25s; }
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn:hover i { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .7; cursor: wait; }
.fine { margin-top: 12px; font-size: 11px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-top: 46px; padding-top: 22px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-soft);
}
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px;
  border: 1px solid var(--line); background: var(--panel);
  transition: background .25s, color .25s, transform .25s;
}
.socials a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-3px); }

/* ---------- Ticker ---------- */
.ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--ink); color: var(--paper);
  overflow: hidden; white-space: nowrap;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 11px 0;
}
.ticker-track { display: inline-flex; gap: 48px; animation: ticker 30s linear infinite; padding-left: 48px; }
.ticker-track span:nth-child(odd) { color: var(--flap-ink); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 22px; right: 22px; z-index: 50;
  max-width: 340px; padding: 14px 18px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.5;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,.5);
  border-left: 4px solid var(--ok);
  transform: translateY(-20px); opacity: 0; pointer-events: none;
  transition: transform .35s, opacity .35s;
}
.toast.error { border-left-color: #d43c3c; }
.toast.show { transform: none; opacity: 1; }

/* ---------- Launched state ---------- */
.board.launched .countdown { background: var(--accent); }
.board.launched .unit-label, .board.launched .sep { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .board { padding: 16px 16px 80px; }
  .live { display: none; }
  .hero { padding: 40px 0 28px; }
  .countdown { padding: 18px 14px; gap: 8px; justify-content: center; }
  .flap { --h: 56px; width: 40px; font-size: 36px; }
  .flaps { gap: 4px; }
  .sep { font-size: 28px; line-height: 56px; }
  .pass { grid-template-columns: 1fr; }
  .pass-stub { flex-direction: row; align-items: center; border-left: 0; border-top: 2px dashed rgba(255,255,255,.55); padding: 16px 20px; }
  .barcode { margin: 0 0 0 auto; height: 40px; width: 110px; }
  .pass::before, .pass::after { display: none; }
  .route strong { font-size: 26px; }
  .footer { flex-direction: column-reverse; text-align: center; }
}
@media (max-width: 420px) {
  .flap { --h: 46px; width: 32px; font-size: 28px; }
  .sep { font-size: 22px; line-height: 46px; }
  .unit-label { font-size: 9px; letter-spacing: .14em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
