/* FlagSage home (November 9, 2026 redesign). Phone first. A film hero like settleinlatinamerica.com,
   glass chips and emoji cards like planbeforeyoudie.app. Loaded on the home page only. */

/* The header floats over the film. */
body.home .site-header { position: fixed; left: 0; right: 0; }

/* ---------- Film hero ---------- */
.vhero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: #0B0B1E; overflow: hidden; isolation: isolate; }
.vhero-media, .vhero-media picture, .vhero-poster, .vhero-film { position: absolute; inset: 0; width: 100%; height: 100%; }
.vhero-media { z-index: -2; }
.vhero-poster, .vhero-film { object-fit: cover; display: block; }
.vhero-film { opacity: 0; transition: opacity .8s ease; }
.vhero.is-playing .vhero-film { opacity: 1; }
.vhero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 8, 28, .42) 0%, rgba(8, 8, 28, 0) 26%, rgba(8, 8, 28, 0) 38%, rgba(8, 8, 28, .62) 62%, rgba(8, 8, 28, .9) 100%); }

.vhero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 96px; }
.place-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 8px; border-radius: 999px; color: #fff; text-decoration: none;
  background: rgba(16, 16, 40, .34); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.place-pill:hover { color: #fff; background: rgba(16, 16, 40, .46); }
.place-pill .pf { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; background: rgba(255, 255, 255, .14); line-height: 1; }
.place-pill .pn { display: grid; line-height: 1.15; min-width: 0; }
.place-pill .pn b { font-weight: 700; font-size: .95rem; }
.place-pill .pn span { font-size: .76rem; opacity: .78; white-space: nowrap; }
.place-pill .pn span:empty { display: none; }
.place-pill .pf, .place-pill .pn { transition: opacity .18s ease, transform .18s ease; }
.place-pill.swap .pf, .place-pill.swap .pn { opacity: 0; transform: translateY(3px); }
.pdots { display: flex; gap: 5px; margin-left: 4px; }
.pdots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .42); transition: width .35s ease, background-color .35s ease; }
.pdots i.on { width: 18px; background: #fff; }
.film-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .26); background: rgba(16, 16, 40, .34); color: #fff; display: grid; place-items: center; cursor: pointer;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); flex: none; }
.film-toggle .icon { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; }
.film-toggle .i-play, .film-toggle.paused .i-pause { display: none; }
.film-toggle.paused .i-play { display: inline; }
.film-toggle .i-play { stroke-width: 1.5; }

.vhero-body { padding-top: 40px; padding-bottom: 40px; }
.vhero h1 { color: #fff; font-size: clamp(2.35rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; max-width: 13em; margin: 0 0 18px; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.vlead { font-size: clamp(1.04rem, 1.5vw, 1.24rem); line-height: 1.5; color: rgba(255, 255, 255, .88); max-width: 34em; margin: 0 0 22px; text-wrap: pretty; }
.vchips { display: flex; gap: 8px; margin: 0 0 26px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-right: -16px; padding-right: 16px; }
.vchips::-webkit-scrollbar { display: none; }
.vchips a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 600; font-size: .94rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .2s, border-color .2s; }
.vchips a:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .4); color: #fff; }
.vchips a span { font-size: 1.05rem; }
.vcta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.vlink { color: #fff; font-weight: 600; font-size: .96rem; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 5px; min-height: 44px; display: inline-flex; align-items: center; }
.vlink:hover { color: #fff; text-decoration-color: #fff; }
@media (max-width: 600px) {
  .vhero-top { padding-top: 84px; }
  .vhero-body { padding-bottom: 28px; }
  .vcta { flex-direction: column; align-items: stretch; gap: 6px; }
  .vcta .btn { width: 100%; }
  .vlink { justify-content: center; font-size: .92rem; }
}
@media (min-width: 900px) { .vhero { min-height: min(100vh, 920px); } .vhero-body { padding-bottom: 72px; } }

/* Hero entrance */
.vhero h1, .vlead, .vchips, .vcta, .place-pill { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.vlead { animation-delay: .12s; } .vchips { animation-delay: .22s; } .vcta { animation-delay: .32s; } .place-pill { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.hsec { padding: 88px 0; }
.hsec-alt { background: var(--alt); }
.hhead { max-width: 640px; margin: 0 0 32px; }
.hhead h2 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); letter-spacing: -0.035em; font-weight: 800; line-height: 1.08; margin: 0 0 10px; text-wrap: balance; }
.hhead p { color: var(--muted); font-size: 1.1rem; margin: 0; text-wrap: pretty; }
.hnote { color: var(--faint); font-size: .92rem; margin: 18px 0 0; }
.hnote a { font-weight: 600; }
.hmore { margin: 22px 0 0; }
@media (max-width: 700px) { .hsec { padding: 60px 0; } .hhead { margin-bottom: 24px; } }

/* Day cards: a snap row on phones, a grid on wide screens. */
.dscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px max(16px, calc((100vw - var(--w)) / 2 + 24px)) 14px; scroll-padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dscroll::-webkit-scrollbar { display: none; }
.dscroll:focus-visible { outline-offset: -3px; }
.dcard { flex: 0 0 min(64vw, 230px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; padding: 20px; border-radius: 22px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(18, 18, 24, .04), 0 14px 30px -20px rgba(43, 43, 219, .35); transition: transform .2s, box-shadow .2s, border-color .2s; }
.dcard:hover { color: var(--ink); transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.dflag { font-size: 1.7rem; line-height: 1; margin-bottom: 12px; }
.dcard b { font-size: 3.3rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--accent); }
.dunit { font-weight: 650; font-size: .92rem; color: var(--ink); margin-bottom: 12px; }
.dname { font-weight: 700; font-size: 1rem; margin-top: auto; }
.drule { font-size: .84rem; color: var(--faint); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Myth cards, in the style of the PBYD question cards. */
.mgrid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .mgrid { grid-template-columns: 1fr; } }
.mcard { margin: 0; border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 12px 28px -22px rgba(18, 18, 60, .35); }
.mq { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.me { width: 44px; height: 44px; border-radius: 13px; background: var(--alt); display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.mq s { font-weight: 700; font-size: 1.04rem; color: var(--ink); text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent); text-decoration-thickness: 2px; line-height: 1.3; }
.ma { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px 16px; background: var(--ok-soft); border-top: 1px dashed color-mix(in srgb, var(--ok) 30%, transparent); font-size: .97rem; line-height: 1.45; }
.ma .icon { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--ok); color: #fff; stroke-width: 3; flex: none; margin-top: -1px; }
.hsec-alt .mcard { border-color: transparent; }

/* Tool cards */
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .tgrid { grid-template-columns: 1fr; } }
.tcard { display: flex; flex-direction: column; border-radius: 26px; padding: 18px 18px 24px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 40px -28px rgba(43, 43, 219, .5); transition: transform .2s, box-shadow .2s; }
.tcard:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 26px 50px -28px rgba(43, 43, 219, .55); }
.tshot { border-radius: 18px; padding: 16px; margin-bottom: 20px; display: grid; gap: 8px; background: radial-gradient(120% 140% at 0% 0%, #6B6BFF 0%, #3B3BF0 45%, #2323B8 100%); }
.tq { background: rgba(255, 255, 255, .96); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; box-shadow: 0 6px 16px -10px rgba(0, 0, 40, .5); }
.tq span { font-size: .74rem; font-weight: 700; color: #6E6E80; }
.tq b { font-size: .88rem; font-weight: 650; color: #121218; line-height: 1.35; }
.tq.dim { opacity: .72; }
.tbar { display: grid; grid-template-columns: 7.2em 1fr 2.2em; align-items: center; gap: 10px; background: rgba(255, 255, 255, .96); border-radius: 12px; padding: 10px 12px; font-size: .82rem; color: #121218; }
.tbar span { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbar i { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #3B3BF0 var(--w), #E6E6F5 var(--w)); }
.tbar b { text-align: right; font-variant-numeric: tabular-nums; }
.tbar.gap i { background: linear-gradient(90deg, #C98A00 var(--w), #E6E6F5 var(--w)); }
.te { font-size: 1.6rem; line-height: 1; margin: 0 4px 10px; }
.tcard h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin: 0 4px 6px; }
.tcard p { color: var(--muted); margin: 0 4px 14px; }
.tcard .more { margin: auto 4px 0; color: var(--accent); font-weight: 650; display: inline-flex; gap: 6px; align-items: center; }
.center { text-align: center; }

/* Seven flags */
.fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ftile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 22px; background: var(--card); color: var(--ink); text-decoration: none; border: 1px solid transparent; box-shadow: 0 10px 26px -22px rgba(18, 18, 60, .45); transition: transform .2s, border-color .2s; min-width: 0; }
.ftile:hover { color: var(--ink); transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.fe { font-size: 1.7rem; line-height: 1; margin-bottom: 10px; }
.ftile b { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.ftile span:last-child { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.ftile-all { background: var(--soft); }
/* Phones show the emoji and the name only (less text). */
@media (max-width: 600px) { .ftile { padding: 16px 14px; } .ftile span:last-child { display: none; } .fe { margin-bottom: 8px; } }

/* Guide band */
.gband { position: relative; overflow: hidden; color: #fff; background: radial-gradient(80% 120% at 85% 10%, #3434C8 0%, rgba(52, 52, 200, 0) 60%), linear-gradient(160deg, #13134A 0%, #0A0A22 100%); padding: 88px 0; }
.gband-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .gband-in { grid-template-columns: 1fr; gap: 36px; } .gband { padding: 64px 0; } }
.gtag { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-weight: 600; font-size: .88rem; margin-bottom: 18px; }
.gband h2 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -0.04em; font-weight: 800; line-height: 1.04; margin: 0 0 12px; }
.gband p { color: rgba(255, 255, 255, .8); font-size: 1.1rem; max-width: 30em; }
.gfacts { list-style: none; padding: 0; margin: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.gfacts li { margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; color: rgba(255, 255, 255, .9); }
.gfacts b { color: #fff; }
.gbtns { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) { .gbtns .btn { flex: 1 1 100%; } }
.gbook { position: relative; height: 340px; display: grid; place-items: center; }
.gcover, .gpage { position: absolute; width: 230px; height: 310px; border-radius: 8px 16px 16px 8px; }
.gpage { background: #EDEDF8; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.gpage.p2 { transform: translate(18px, 8px) rotate(5deg); }
.gpage.p3 { transform: translate(34px, 16px) rotate(10deg); background: #D9D9F0; }
.gcover { transform: rotate(-4deg); padding: 26px 22px; display: flex; flex-direction: column; gap: 8px; color: #fff;
  background: radial-gradient(120% 90% at 0% 0%, #6E6EFF 0%, #3B3BF0 45%, #2121B0 100%); box-shadow: 0 40px 70px -24px rgba(0, 0, 0, .7), inset 6px 0 0 rgba(0, 0, 0, .14); }
.gcover img { border-radius: 12px; margin-bottom: 14px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .4); }
.gcover b { font-size: 1.5rem; line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.gcover span { font-size: .85rem; opacity: .85; }
.gcover em { margin-top: auto; font-style: normal; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
@media (max-width: 600px) { .gbook { height: 250px; } .gcover, .gpage { width: 176px; height: 236px; } .gcover { padding: 20px 18px; } .gcover b { font-size: 1.25rem; } .gcover img { width: 36px; height: 36px; margin-bottom: 8px; } }

/* Countries */
.hsec .cgrid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (max-width: 420px) { .hsec .cgrid { grid-template-columns: 1fr 1fr; } .hsec .cchip { font-size: .9rem; padding: 10px 12px; } }

/* Where we stop */
.bgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .bgrid { grid-template-columns: 1fr; } }
.bcard { border-radius: 22px; padding: 22px; background: var(--card); box-shadow: 0 10px 26px -22px rgba(18, 18, 60, .45); }
.bcard h3 { font-size: 1.15rem; margin-bottom: 10px; }
.bcard ul { list-style: none; padding: 0; margin: 0; }
.bcard li { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .97rem; }
.bcard li:first-child { border-top: 0; }

/* Closing */
.closing { padding: 24px 0 96px; }
.closing-in { text-align: center; border-radius: 30px; padding: 56px 24px; color: #fff; background: radial-gradient(90% 140% at 50% 0%, #6262FF 0%, #3B3BF0 45%, #2121B0 100%); box-shadow: 0 30px 60px -30px rgba(43, 43, 219, .7); }
.closing h2 { color: #fff; font-size: clamp(1.8rem, 4.4vw, 2.7rem); letter-spacing: -0.04em; font-weight: 800; margin: 0 0 10px; }
.closing p { color: rgba(255, 255, 255, .85); margin: 0 0 26px; font-size: 1.08rem; }
@media (max-width: 600px) { .closing { padding: 8px 0 64px; } .closing-in { padding: 44px 18px; border-radius: 24px; } .closing .btn { width: 100%; } }

/* Sticky phone call to action, hidden over the hero and the closing band. */
.mcta { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; transform: translateY(140%); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.mcta .btn { width: 100%; box-shadow: 0 16px 34px -12px rgba(43, 43, 219, .65); }
body.show-mcta .mcta { transform: none; }
@media (min-width: 761px) { .mcta { display: none; } }

@media (prefers-color-scheme: dark) {
  .tq, .tbar { background: rgba(255, 255, 255, .94); }
  .ftile-all { background: var(--soft); }
  .ma { background: var(--ok-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .vhero h1, .vlead, .vchips, .vcta, .place-pill { animation: none; }
}
.calc-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.calc-links a { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; min-height: 44px; transition: transform .2s; }
.calc-links a:hover { transform: translateY(-2px); color: var(--ink); }
.calc-links span { grid-row: span 2; font-size: 1.6rem; }
.calc-links small { color: var(--muted); }
@media (max-width: 760px) { .calc-links { grid-template-columns: 1fr; } }
