/* Flylo storefront — shared styles. Design system matches the approved MVP:
   light lavender-tinted surfaces, navy header/hero, violet #7C3AED,
   coral #FF5A3C, navy #0B0B1E. Type: Baloo 2 (display), Manrope (body),
   IBM Plex Mono (numbers / prices / IDs). */
:root {
  --violet: #7C3AED;
  --violet-dark: #5B21B6;
  --coral: #FF5A3C;
  --navy: #0B0B1E;
  --bg: #f6f6fc;
  --bg-2: #edebf9;
  --surface: #ffffff;
  --surface-2: #efedf9;
  --ink: #17122e;
  --ink-2: #4a4370;
  --card: #ffffff;
  --card-border: #E1DEF3;
  --input-border: #C9C3E8;
  --muted: #6E6896;
  --ok: #047857;
  --warn: #B45309;
  --err: #DC2626;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: "Baloo 2", sans-serif; font-weight: 800; letter-spacing: -.02em; }
.mono { font-family: "IBM Plex Mono", monospace; }
a { color: var(--violet-dark); }
img { max-width: 100%; }

#sandbox-banner {
  display: none;
  background: var(--coral);
  color: #fff;
  text-align: center;
  padding: .6rem 1rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Header — navy bar, MVP topbar treatment (sticky, ~62px) */
.site-header {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  min-height: 62px;
  padding: .45rem 1.5rem;
  background: var(--navy);
  border-bottom: 1px solid #262258;
  position: sticky; top: 0; z-index: 60;
}
.site-header .brandmark { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; }
.site-header .brandmark img { height: 36px; width: auto; display: block; }
.site-header .brandtag { font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 13px; color: #b9b3e8; letter-spacing: .02em; }
@media (max-width: 600px) { .site-header .brandtag { display: none; } }
.site-nav { margin-left: auto; display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem; }
.site-nav a:hover { color: var(--coral); }
.lang-switch { display: inline-flex; align-items: center; gap: .4rem; margin-left: .5rem; }
.site-nav .lang-switch a { color: var(--muted); font-size: .9rem; }
.site-nav .lang-switch a:hover { color: #fff; }
.site-nav .lang-switch a.active { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.lang-switch .lang-sep { color: var(--muted); font-size: .85rem; }

/* Layout */
main { max-width: 1080px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.section { margin-top: 3rem; }
.section h2 { font-size: 1.6rem; margin: 0 0 1rem; }
.lede { color: var(--ink-2); max-width: 62ch; }

/* Hero — stays navy with white text, like the MVP's dark blocks */
.hero { text-align: center; padding: 2.4rem 1.5rem 2rem; background: var(--navy); color: #fff; border-radius: 22px; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin: 0 0 .4rem; line-height: 1.15; }
.hero .tagline { color: #C9C4F2; font-size: clamp(1rem, 2.5vw, 1.2rem); margin: 0 auto 1.6rem; max-width: 56ch; }
.hero-search { max-width: 560px; margin: 0 auto; }
.hero-search input {
  width: 100%; padding: .95rem 1.2rem; font-size: 1.05rem;
  background: var(--surface); border: 1px solid var(--input-border);
  border-radius: 999px; color: var(--ink);
}
.hero-search input::placeholder { color: var(--muted); }

/* Tabs + grid */
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.6rem 0 1.25rem; }
.tabs button {
  background: var(--surface); color: var(--ink); border: 1px solid var(--input-border);
  border-radius: 999px; padding: .55rem 1.15rem; font-size: .95rem; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.tabs button[aria-selected="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.pkg {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .55rem;
  box-shadow: 0 1px 0 rgba(11,11,30,.04);
}
.pkg .type {
  align-self: flex-start; background: var(--violet); color: #fff; padding: .15rem .6rem;
  border-radius: 999px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.pkg h3 { margin: 0; font-size: 1.06rem; }
.pkg h3 a { color: var(--ink); text-decoration: none; }
.pkg h3 a:hover { color: var(--violet-dark); }
.pkg .meta { color: var(--muted); font-size: .92rem; }
.pkg .price { font-size: 1.5rem; font-weight: 800; margin-top: auto; font-family: "IBM Plex Mono", monospace; }
.pkg .viewbtn {
  display: inline-block; text-align: center; background: var(--coral); color: #fff;
  border-radius: 999px; padding: .7rem 1rem; font-weight: 700; text-decoration: none;
}
.pkg .viewbtn:hover { filter: brightness(1.08); }

/* Destination cards + banner (homepage browsing, MVP-style photo cards) */
.dest { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; box-shadow: 0 1px 0 rgba(11,11,30,.04); transition: transform .12s ease, box-shadow .12s ease; }
.dest:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(11,11,30,.10); }
.dest-media { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, var(--violet), var(--navy)); overflow: hidden; }
.dest-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dest-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(transparent, rgba(11,11,30,.45)); }
.dest-media .dest-name { position: absolute; left: .9rem; bottom: .65rem; right: .9rem; z-index: 1; color: #fff; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.3rem; line-height: 1.1; text-shadow: 0 2px 10px rgba(11,11,30,.55); }
.dest-body { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem .95rem; font-size: .92rem; color: var(--muted); }
.dest-body .from { font-family: "IBM Plex Mono", monospace; color: var(--ink); font-weight: 600; white-space: nowrap; }
.dest-h { grid-column: 1 / -1; font-size: 1.45rem; margin: .8rem 0 -.2rem; }
.dest-banner { grid-column: 1 / -1; border-radius: 22px; padding: 1.4rem 1.5rem 1.6rem; color: #fff; background-color: var(--navy); background-size: cover; background-position: center; }
.dest-banner h2 { margin: .7rem 0 .2rem; font-size: 1.9rem; }
.dest-banner p { margin: 0; color: #E7E4FF; font-weight: 600; }
.backbtn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: .45rem 1rem; font-weight: 700; cursor: pointer; font-family: inherit; font-size: .95rem; }
.backbtn:hover { background: rgba(255,255,255,.28); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.step { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1.25rem; }
.step .num {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--violet); color: #fff; font-weight: 800; margin-bottom: .6rem;
}
.step h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: .9rem 1.15rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { color: var(--ink-2); margin: .6rem 0 0; }

/* Hero photo treatment */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-bg img.active { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(11,11,30,.58), rgba(11,11,30,.78)); }
.hero-strip { margin-top: 1.1rem; color: #C9C4F2; font-weight: 600; font-size: .95rem; }
.hero-cta { margin-top: 1rem; }

/* Region filter */
.dest-tools { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 0 0 1.25rem; }
.dest-tools select {
  padding: .6rem 1rem; font-size: .98rem; font-family: inherit; font-weight: 600;
  background: var(--surface); border: 1px solid var(--input-border); border-radius: 999px; color: var(--ink); cursor: pointer;
}

/* Plan finder */
.finder-card { padding: 1.5rem; }
.finder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; margin-bottom: 1.2rem; }
.finder-grid label, .finder-grid legend { font-weight: 700; display: block; margin-bottom: .45rem; }
.finder-grid select { width: 100%; padding: .8rem 1rem; font-size: 1rem; font-family: inherit; background: var(--surface-2); border: 1px solid var(--input-border); border-radius: 10px; color: var(--ink); }
.finder-grid input[type="range"] { width: 100%; accent-color: var(--violet); }
.finder-days { font-family: "IBM Plex Mono", monospace; font-weight: 600; color: var(--violet-dark); }
.finder-grid fieldset { border: 0; padding: 0; margin: 0; }
.usage-cards { display: grid; gap: .5rem; }
.usage-cards label { display: flex; gap: .6rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--input-border); border-radius: 12px; padding: .65rem .8rem; cursor: pointer; font-weight: 600; margin: 0; }
.usage-cards label small { display: block; font-weight: 500; color: var(--ink-2); }
.usage-cards input { margin-top: .25rem; accent-color: var(--violet); }
#fResult { margin-top: 1.3rem; }
#fResult .grid { margin-top: .8rem; }
.rec-tag { align-self: flex-start; background: var(--coral); color: #fff; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* Compatibility checker */
.compat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.compat-card { padding: 1.5rem; }
.compat-card label { font-weight: 700; display: block; margin: .9rem 0 .4rem; }
.compat-card label:first-child { margin-top: 0; }
.compat-card select { width: 100%; padding: .8rem 1rem; font-size: 1rem; font-family: inherit; background: var(--surface-2); border: 1px solid var(--input-border); border-radius: 10px; color: var(--ink); }
.eid-code { font-family: "IBM Plex Mono", monospace; font-size: 2rem; font-weight: 700; color: var(--violet-dark); margin: .3rem 0 .6rem; }
.verdict { margin-top: 1.1rem; border-radius: 12px; padding: 1rem 1.1rem; border: 1px solid var(--input-border); line-height: 1.5; }
.verdict strong { display: block; margin-bottom: .35rem; }
.verdict.yes { background: #E9F9EE; border-color: #9BD8AC; }
.verdict.maybe { background: #FFF6E0; border-color: #EAD28A; }
.verdict.no { background: #FDECEA; border-color: #F0A9A3; }
.verdict .btn { margin-top: .7rem; }

/* Tiny flags beside names and plans */
.flag-ic { width: 20px; height: 15px; object-fit: cover; border-radius: 3px; vertical-align: -2px; margin-right: .35rem; box-shadow: 0 0 0 1px rgba(11,11,30,.12); }
.flags { display: inline-flex; gap: .25rem; align-items: center; vertical-align: -2px; }
.flags .flag-ic { margin-right: 0; }
.flag-more { font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.pkgflags:empty { display: none; }
.dest-banner .flag-ic { width: 30px; height: 22px; vertical-align: -4px; }
h1 .flag-ic { width: 34px; height: 25px; vertical-align: -3px; }

/* Forms + detail + order views */
.panel { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1.5rem; }
.panel h1 { margin-top: 0; font-size: 1.7rem; line-height: 1.2; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field input, .field select {
  width: 100%; padding: .8rem 1rem; font-size: 1rem;
  background: var(--surface-2); border: 1px solid var(--input-border); border-radius: 10px; color: var(--ink);
  font-family: inherit;
}
.field-row { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.btn {
  display: inline-block; background: var(--coral); color: #fff; border: 0; cursor: pointer;
  border-radius: 999px; padding: .85rem 1.6rem; font-size: 1rem; font-weight: 700; text-decoration: none; text-align: center;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--violet); }
.btn.block { width: 100%; }
.pricebreak { border-top: 1px solid var(--card-border); margin-top: 1.1rem; padding-top: 1.1rem; }
.pricebreak .row { display: flex; justify-content: space-between; padding: .25rem 0; color: var(--ink-2); }
.pricebreak .row > span:last-child { font-family: "IBM Plex Mono", monospace; }
.pricebreak .row.total { color: var(--ink); font-size: 1.25rem; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; }
.chips span { background: var(--surface-2); border: 1px solid var(--input-border); border-radius: 999px; padding: .15rem .6rem; font-size: .82rem; color: var(--ink-2); }
.status { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-weight: 700; font-size: .85rem; text-transform: capitalize; }
.status.fulfilled { background: #D1FAE5; color: var(--ok); }
.status.failed, .status.refunded { background: #FEE2E2; color: var(--err); }
.status.pending_payment, .status.paid, .status.fulfilling { background: #FEF3C7; color: var(--warn); }
.esim { border: 1px solid var(--card-border); border-radius: 12px; padding: 1.1rem; margin-top: 1rem; background: var(--surface-2); }
.esim h3 { margin: 0 0 .5rem; font-size: 1rem; word-break: break-all; }
.esim .kv { color: var(--ink-2); font-size: .93rem; margin: .3rem 0; word-break: break-word; }
.esim .kv strong { color: var(--ink); }
.esim code { background: var(--bg-2); color: var(--ink); padding: .15rem .45rem; border-radius: 6px; word-break: break-all; font-family: "IBM Plex Mono", monospace; }
.esim pre { white-space: pre-wrap; word-break: break-word; background: var(--bg-2); color: var(--ink); padding: .8rem; border-radius: 8px; font-size: .85rem; font-family: "IBM Plex Mono", monospace; }
.esim img.qr { width: 180px; height: 180px; background: #fff; border-radius: 8px; padding: 6px; }
.msg { min-height: 1.4em; font-weight: 600; }
.msg.error { color: var(--err); }
.msg.ok { color: var(--ok); }

/* Prose (legal/support) */
.prose { max-width: 72ch; }
.prose h1 { font-size: 1.9rem; margin-bottom: .3rem; }
.prose h2 { font-size: 1.25rem; margin: 1.8rem 0 .5rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose .updated { color: var(--muted); font-size: .9rem; }
.prose ul { padding-left: 1.3rem; }

/* Footer — light, like the MVP (border-top on the light background) */
.site-footer { border-top: 1px solid var(--card-border); padding: 2rem 1.5rem 2.4rem; text-align: center; color: var(--muted); font-size: .92rem; }
.site-footer .footlinks { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-bottom: .8rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--violet-dark); }
.site-footer .partner { margin-top: .5rem; }
