/* Granica — marketing + legal site. Refined, Apple-clean; the app's
   green→amber→red wait gradient is the one signature motif. Vanilla CSS, no build. */

:root {
  --paper: #faf9f6;
  --paper-2: #f1efe9;
  --card: #ffffff;
  --ink: #11161d;
  --ink-2: #41505f;
  --muted: #6b7886;
  --line: #e7e3da;
  --blue: #0b5fd4;
  --blue-deep: #0345a2;
  --green: #34a85a;
  --amber: #e08a1e;
  --red: #e0533d;
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(17, 22, 29, 0.04), 0 12px 34px rgba(17, 22, 29, 0.07);
  --shadow-lg: 0 2px 6px rgba(17, 22, 29, 0.06), 0 30px 70px rgba(17, 22, 29, 0.13);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0f14;
    --paper-2: #11161d;
    --card: #161c25;
    --ink: #f2f4f7;
    --ink-2: #c3ccd6;
    --muted: #8b97a4;
    --line: #232c37;
    --blue: #4f97ff;
    --blue-deep: #2f7bf0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 40px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 34px 80px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.04; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.5rem); font-optical-sizing: auto; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.18rem; font-family: var(--sans); font-weight: 700; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--blue);
}
.lead { font-size: clamp(1.05rem, 2.1vw, 1.32rem); color: var(--ink-2); line-height: 1.5; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.18rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 0.97rem;
  padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--blue) 34%, transparent);
}
.btn:hover { background: var(--blue-deep); transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }

/* store badges */
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: var(--paper);
  padding: 11px 18px; border-radius: 14px; min-width: 178px;
}
.badge:hover { text-decoration: none; color: var(--paper); opacity: 0.92; }
.badge svg { width: 24px; height: 24px; flex: none; }
.badge .b-small { font-size: 0.66rem; opacity: 0.72; line-height: 1; letter-spacing: 0.03em; }
.badge .b-big { font-size: 1.05rem; font-weight: 700; line-height: 1.15; }
.badge .soon { margin-left: auto; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: color-mix(in srgb, var(--paper) 22%, transparent); padding: 3px 7px; border-radius: 6px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 88% 8%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 70%),
    radial-gradient(40% 40% at 5% 90%, color-mix(in srgb, var(--green) 9%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin: 18px 0 0; }
.hero .lead { margin-top: 22px; max-width: 30ch; }
.trustline { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.trustline span { display: inline-flex; align-items: center; gap: 6px; }
.dot-ok { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero .lead { max-width: none; } .phone { order: -1; margin: 0 auto; } }

/* ---------- faux app card (the product, shown not told) ---------- */
.phone {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 20px; width: 100%; max-width: 380px; justify-self: end;
}
.phone-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.phone-title { font-family: var(--display); font-size: 1.35rem; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 0.74rem; font-weight: 700; color: var(--green); letter-spacing: 0.04em; text-transform: uppercase; }
.live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.xrow { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--line); }
.xrow:first-of-type { border-top: 0; }
.xrow .route { flex: 1; min-width: 0; }
.xrow .route .pair { font-weight: 700; font-size: 0.98rem; }
.xrow .route .meta { font-size: 0.8rem; color: var(--muted); }
.pill { font-weight: 800; font-size: 0.92rem; padding: 6px 12px; border-radius: 999px; white-space: nowrap; color: #fff; }
.pill.g { background: var(--green); }
.pill.a { background: var(--amber); }
.pill.r { background: var(--red); }
.veh { font-size: 0.95rem; }

/* the signature gradient line */
.waitbar { height: 6px; border-radius: 999px; margin: 6px 0 2px; background: linear-gradient(90deg, var(--green), var(--amber) 55%, var(--red)); }

/* ---------- sections ---------- */
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 38ch; margin-bottom: 44px; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .grid3 { grid-template-columns: 1fr; } }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.feature .ic svg { width: 23px; height: 23px; }
.feature h3 { margin-bottom: 7px; }
.feature p { color: var(--ink-2); font-size: 0.97rem; }

/* alt band */
.band { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; counter-reset: s; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step .n { font-family: var(--display); font-size: 2.4rem; color: var(--blue); line-height: 1; }
.step h3 { margin: 12px 0 6px; }
.step p { color: var(--ink-2); font-size: 0.97rem; }

/* EES timeliness note */
.note {
  display: flex; gap: 18px; align-items: flex-start; padding: 26px 28px; border-radius: var(--radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--red) 9%, var(--card)), var(--card) 65%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.note .tag { flex: none; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--red); padding: 6px 11px; border-radius: 8px; margin-top: 3px; }
.note p { color: var(--ink-2); }
.note strong { color: var(--ink); }

/* languages */
.langs { display: flex; flex-wrap: wrap; gap: 10px; }
.langs span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 48px 0; color: var(--muted); font-size: 0.92rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: var(--ink-2); font-weight: 600; }
footer .fineprint { margin-top: 26px; font-size: 0.82rem; line-height: 1.5; }

/* ---------- legal/prose pages ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 0; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 34px; }
.prose h2 { font-size: 1.4rem; font-family: var(--sans); font-weight: 800; letter-spacing: -0.01em; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--ink-2); margin-bottom: 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--ink); }
.prose .callout { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 0.92rem; color: var(--muted); margin-bottom: 28px; }
.back { display: inline-block; margin-top: 40px; font-weight: 700; }

/* ---------- entrance animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
  .d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.14s; } .d3 { animation-delay: 0.23s; }
  .d4 { animation-delay: 0.32s; } .d5 { animation-delay: 0.42s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
