/* Homepage: "Saffa Thanksgiving Around the World 2026". Scoped to .home. */

.home {
  --navy: #0d1d2f;
  --navy-2: #13304d;
  --navy-3: #1c4266;
  --gold: #e9b44c;
  --gold-2: #f7d891;
  --cream-hi: #fff6e8;
  --ink-soft: #c9d4e0;
  padding: 0;
}
.home .wrap { max-width: 1240px; }

/* ---------- shared bits ---------- */
.home .eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin: 0 0 14px; }
.home .eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.home .h-section { padding: 72px 0; }
@media (max-width: 719px) { .home .h-section { padding: 52px 0; } }
.home .h-head { max-width: 760px; margin-bottom: 32px; }
.home .h-head h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: 12px; }
.home .h-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.home .flag { display: inline-block; width: 1.5em; height: 1.125em; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .18); flex: none; }
.home .btn-gold { background: var(--gold); color: #1b1206; }
.home .btn-gold:hover { background: var(--gold-2); color: #1b1206; }
.home .btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
.home .btn-light { background: transparent; color: var(--cream-hi); border-color: rgba(255, 246, 232, .45); }
.home .btn-light:hover { background: rgba(255, 246, 232, .1); color: #fff; border-color: var(--cream-hi); }
.home .dark { background: var(--navy); color: var(--cream-hi); }
.home .dark .h-head p, .home .dark .muted { color: var(--ink-soft); }
.home .dark .eyebrow { color: var(--gold); }
.home .dark a:not(.btn) { color: var(--gold-2); }

/* ---------- hero ---------- */
.h-hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 85% 0%, var(--navy-3) 0%, var(--navy-2) 38%, var(--navy) 75%); color: var(--cream-hi); }
.h-hero-map { position: absolute; inset: -4% -10% auto -10%; height: 110%; background: url(/img/world-map.svg) center 30% / contain no-repeat; opacity: .07; filter: invert(1); pointer-events: none; }
.h-hero-grid { position: relative; display: grid; gap: 40px; padding-top: 56px; padding-bottom: 64px; align-items: center; }
@media (min-width: 980px) { .h-hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); padding-top: 72px; padding-bottom: 88px; } }
.h-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.h-flag-chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); font-weight: 600; font-size: .95rem; }
.h-flag-chip .flag { width: 34px; height: 25px; }
.h-x { color: var(--gold); font-weight: 700; font-size: 1.2rem; }
.h-hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 20px; color: #fff; }
.h-hero h1 .accent { display: block; color: var(--gold); font-style: italic; font-weight: 600; }
.h-hero h1 .year { color: var(--gold-2); }
.h-tagline { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.55rem); line-height: 1.35; color: var(--cream-hi); margin-bottom: 16px; }
.h-tagline span { white-space: nowrap; }
.h-date { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: rgba(233, 180, 76, .14); border: 1px solid rgba(233, 180, 76, .4); color: var(--gold-2); margin-bottom: 28px; }
.h-date svg { flex: none; }
.h-date strong { color: #fff; white-space: nowrap; }
.h-flag-chip.you { color: var(--gold-2); text-decoration: none; border-style: dashed; border-color: rgba(233, 180, 76, .65); background: rgba(233, 180, 76, .1); }
.h-flag-chip.you:hover { color: #fff; border-color: var(--gold); }
.h-globe { flex: none; color: var(--gold); }
@media (max-width: 479px) {
  .h-flags { gap: 6px 5px; }
  .h-flag-chip { padding: 5px 9px 5px 6px; font-size: .8rem; gap: 6px; }
  .h-flag-chip .flag { width: 24px; height: 18px; }
  .h-globe { width: 20px; height: 20px; }
}
.h-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 32px 0 0; color: var(--ink-soft); font-size: .95rem; }
.h-facts strong { display: block; font-family: var(--serif); font-size: 1.7rem; color: #fff; line-height: 1.1; }
.h-figure { position: relative; margin: 0; max-width: 520px; justify-self: center; width: 100%; }
.h-figure .frame { border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .14); aspect-ratio: 4 / 5; background: var(--navy-2); }
.h-figure .frame img { width: 100%; height: 100%; object-fit: cover; }
.h-badge { position: absolute; display: grid; place-items: center; width: 92px; height: 70px; border-radius: 14px; background: #fff; padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.h-badge img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.h-badge.us { top: 22px; left: -22px; transform: rotate(-6deg); }
.h-badge.za { top: 104px; left: -10px; transform: rotate(5deg); }
.h-badge.you { top: 186px; left: -22px; transform: rotate(-4deg); }
.h-badge.you .inner { width: 100%; height: 100%; border-radius: 8px; background: var(--navy); color: var(--gold-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 700 .68rem/1.05 var(--sans); text-align: center; }
.h-figure figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 12px 16px; border-radius: 14px; background: rgba(13, 29, 47, .78); backdrop-filter: blur(6px); font-size: .9rem; color: var(--cream-hi); }
@media (max-width: 979px) {
  .h-figure { max-width: 440px; }
  .h-badge { width: 70px; height: 54px; }
  .h-badge.us { left: 10px; top: -18px; }
  .h-badge.za { left: 86px; top: -12px; }
  .h-badge.you { left: 162px; top: -18px; }
  .h-badge.you .inner { font-size: .58rem; }
  .h-badge.you .h-globe { width: 18px; height: 18px; }
}

/* ---------- flag ribbon ---------- */
.h-ribbon { background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 3px solid var(--gold); overflow: hidden; }
.h-ribbon-track { display: flex; width: max-content; gap: 34px; padding: 16px 0; }
.h-ribbon ul { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.h-ribbon li { display: flex; align-items: center; gap: 10px; color: var(--cream-hi); font-weight: 600; font-size: .95rem; white-space: nowrap; }
/* Wide screens: gentle marquee. Phones and reduced motion: a static, swipeable row
   (one copy of the list), so no country is ever hidden or delayed. */
@media (min-width: 720px) and (prefers-reduced-motion: no-preference) {
  .h-ribbon-track { animation: ribbon 70s linear infinite; }
  .h-ribbon:hover .h-ribbon-track, .h-ribbon:focus-within .h-ribbon-track { animation-play-state: paused; }
}
@media (max-width: 719px), (prefers-reduced-motion: reduce) {
  .h-ribbon { overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .h-ribbon-track { padding: 14px 16px; }
  .h-ribbon ul.dup { display: none; }
  .h-ribbon ul { gap: 22px; padding-right: 16px; }
  .h-ribbon li { scroll-snap-align: start; }
}
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- traditional US menu ---------- */
.h-us-date { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 8px !important; color: var(--ink) !important; }
.h-us-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 479px) { .h-us-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.h-us-dish { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.h-us-dish .ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.h-us-dish .ph img { width: 100%; height: 100%; object-fit: cover; }
.h-us-dish .name { display: block; padding: 12px 14px 4px; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; line-height: 1.2; }
.h-us-dish .credit { margin: auto 0 0; padding: 4px 14px 12px; overflow-wrap: anywhere; }
/* Name-only tiles (no catalogue photo) keep the card style with a plain panel. */
.h-us-dish:not(.has-photo) { justify-content: center; min-height: 96px; background: var(--bg-2); }
.h-us-dish:not(.has-photo) .name { padding: 14px; }

/* ---------- three traditions ---------- */
.h-trad-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.h-trad { overflow: hidden; display: flex; flex-direction: column; }
.h-trad .ph { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.h-trad .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.h-trad:hover .ph img { transform: scale(1.04); }
/* Same white frame, rounding and shadow as the hero stickers, scaled down. */
.h-trad .ph .flag { position: absolute; left: 14px; top: 14px; width: 56px; height: 44px; border: 5px solid #fff; border-radius: 10px; background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); object-fit: cover; }
.h-trad .ph .flag.you { display: grid; place-items: center; background: var(--navy); }
.h-trad .ph .flag.you .h-globe { width: 24px; height: 24px; }
.h-trad .body { padding: 20px 22px 24px; }
.h-trad h3 { font-size: 1.45rem; margin-bottom: 6px; }
.h-trad p { color: var(--muted); margin: 0; }
.h-trad .num { font-family: var(--serif); color: var(--brand); font-weight: 700; margin-right: 6px; }

/* ---------- world map ---------- */
.h-map-wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 1040px) { .h-map-wrap { grid-template-columns: minmax(0, 1fr) 300px; } }
.h-map { position: relative; width: 100%; border-radius: 20px; background: radial-gradient(100% 120% at 50% 0%, var(--navy-2), var(--navy)); border: 1px solid rgba(255, 255, 255, .1); padding: 2%; }
.h-map-inner { position: relative; width: 100%; }
.h-map-inner svg { display: block; width: 100%; height: auto; overflow: visible; }
.h-map .land { fill: #2b5279; }
.h-map .arc { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; opacity: .75; }
.h-map.animate .arc { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.h-map.animate.in-view .arc { animation: draw 1.6s ease forwards; animation-delay: var(--delay); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.h-pin { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.h-pin::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(233, 180, 76, .3); transition: transform .15s; }
.h-pin:hover::before, .h-pin:focus-visible::before, .h-pin.active::before { transform: scale(1.5); background: #fff; }
.h-pin.home::before { width: 16px; height: 16px; background: var(--sa-green); box-shadow: 0 0 0 4px rgba(255, 255, 255, .85), 0 0 0 9px rgba(0, 119, 73, .45); }
.h-pin .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; background: #fff; color: var(--navy); font: 600 .78rem/1.1 var(--sans); white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); pointer-events: none; z-index: 2; }
.h-pin .tip .flag { width: 20px; height: 15px; }
.h-pin:hover .tip, .h-pin:focus-visible .tip, .h-pin.home .tip { display: inline-flex; }
@media (max-width: 719px) {
  .h-pin { width: 16px; height: 16px; }
  .h-pin::before { width: 7px; height: 7px; box-shadow: 0 0 0 2px rgba(233, 180, 76, .3); }
  .h-pin.home::before { width: 11px; height: 11px; }
  .h-pin.home .tip { display: none; }
}
.h-map-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.h-map-legend li { display: flex; gap: 12px; align-items: flex-start; }
.h-map-legend .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; flex: none; }
.h-map-legend .dot.home { background: var(--sa-green); box-shadow: 0 0 0 3px #fff; }
.h-map-legend .dot.country { background: var(--gold); }
.h-map-legend .dot.line { width: 22px; height: 2px; border-radius: 0; margin-top: 10px; background: var(--gold); }

/* ---------- action tiles (after the last country card) ---------- */
.h-tile { display: flex; flex-direction: column; gap: 10px; padding: 24px; text-align: left; text-decoration: none; color: var(--cream-hi); border: 0; cursor: pointer; font: inherit; min-height: 260px; position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.h-tile:hover, .h-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(13, 29, 47, .28); color: #fff; }
.h-tile.t-suggest { background: linear-gradient(150deg, var(--navy-3), var(--navy)); }
.h-tile.t-city { background: linear-gradient(150deg, #0a6b46, #06402b); }
.h-tile.t-share { background: linear-gradient(150deg, #c4501b, #7a2b0c); }
.h-tile::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.h-tile-icon { font-size: 2.2rem; line-height: 1; }
.h-tile-title { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; line-height: 1.15; }
.h-tile-text { color: rgba(255, 246, 232, .85); font-size: .95rem; }
.h-tile-cta { margin-top: auto; font-weight: 700; color: var(--gold-2); }
.h-tile.t-share .h-tile-cta { color: #ffe3b0; }

/* ---------- country menus ---------- */
.h-home-card { display: grid; overflow: hidden; margin-bottom: 26px; border: 0; background: var(--navy); color: var(--cream-hi); }
@media (min-width: 860px) { .h-home-card { grid-template-columns: 1.1fr 1fr; } }
.h-home-card .ph { min-height: 240px; position: relative; }
.h-home-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h-home-card .body { padding: 28px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.h-home-card h3 { font-size: 1.8rem; color: #fff; display: flex; align-items: center; gap: 12px; margin: 0; }
.h-home-card h3 .flag { width: 48px; height: 36px; }
.h-home-card p { color: var(--ink-soft); margin: 0; }
.h-home-card ul.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.h-home-card ul.menu li { padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-size: .85rem; }
.h-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.h-country-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.h-country { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; scroll-margin-top: 90px; }
.h-country:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(43, 26, 16, .14); }
.h-country.flash { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
.h-country .ph { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.h-country .ph img { width: 100%; height: 100%; object-fit: cover; }
.h-country .ph::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(13, 29, 47, .72)); }
.h-country .ph .name { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; line-height: 1.1; text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.h-country .ph .name .flag { width: 38px; height: 28px; }
.h-country .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.h-country .tag { font-style: italic; color: var(--muted); margin: 0; font-size: .95rem; }
.h-country ul.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.h-country ul.menu li { padding: 4px 10px; border-radius: 999px; background: var(--bg-2); font-size: .82rem; font-weight: 500; }
.h-country ul.menu li.sa { background: color-mix(in srgb, var(--sa-green) 14%, var(--surface)); color: var(--sa-green); }
@media (prefers-color-scheme: dark) { .h-country ul.menu li.sa { color: #6fd8a9; } }
.h-country .body > .btn.ghost { align-self: flex-start; min-height: 32px; padding: 4px 6px; margin: -4px 0 0 -6px; color: var(--brand-2); }
.h-country .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.h-country .status { font-size: .8rem; color: var(--muted); }
/* Cards in a row share the grid's tracks (subgrid): photo, tagline, dishes,
   "more" toggle, button and photo credit each get one row, so the "Start …
   menu" buttons line up however much text sits above them. */
@supports (grid-template-rows: subgrid) {
  .h-country, .h-country-grid > .h-tile { grid-row: span 6; }
  .h-country { display: grid; grid-template-rows: subgrid; row-gap: 0; }
  .h-country .body { display: grid; grid-row: 2 / span 5; grid-template-rows: subgrid; row-gap: 10px; }
  .h-country .tag { grid-row: 1; }
  .h-country ul.menu { grid-row: 2; align-self: start; }
  .h-country .body > .btn.ghost { grid-row: 3; }
  .h-country .actions { grid-row: 4; margin-top: 0; }
  .h-country .credit { grid-row: 5; margin: 0; }
}

/* ---------- builder invite ---------- */
.h-builder { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .h-builder { grid-template-columns: 1fr 1fr; } }
.h-builder .ph { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1122 / 812; }
.h-builder .ph img { width: 100%; height: 100%; object-fit: cover; }
.h-steps { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 16px; counter-reset: step; }
.h-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.h-steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold); font: 700 1.1rem var(--serif); }
.h-steps strong { display: block; font-size: 1.05rem; }
.h-steps span { color: var(--muted); }

/* ---------- voting ---------- */
.h-vote-grid { display: grid; gap: 26px; }
@media (min-width: 960px) { .h-vote-grid { grid-template-columns: .9fr 1.1fr; align-items: start; } }
.h-vote-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.h-vote-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.h-vote-list .rank { font: 700 1.4rem var(--serif); color: var(--gold); text-align: center; }
.h-vote-list a { font-weight: 600; }
.h-vote-list .stats { font-size: .85rem; color: var(--ink-soft); }
.h-vote-empty { padding: 24px; border-radius: 16px; border: 1.5px dashed rgba(255, 255, 255, .25); color: var(--ink-soft); }
.h-honest { font-size: .88rem; color: var(--ink-soft); border-left: 3px solid var(--gold); padding-left: 12px; }

/* ---------- submit your country ---------- */
.h-submit { position: relative; overflow: hidden; border-radius: 26px; color: var(--cream-hi); background: var(--navy); }
.h-submit .bg { position: absolute; inset: 0; }
.h-submit .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.h-submit .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 29, 47, .96) 0%, rgba(13, 29, 47, .82) 55%, rgba(13, 29, 47, .55) 100%); }
.h-submit .inner { position: relative; display: grid; gap: 28px; padding: 40px 28px; }
@media (min-width: 900px) { .h-submit .inner { grid-template-columns: 1fr 420px; padding: 56px; align-items: center; } }
.h-submit h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.h-submit p { color: var(--ink-soft); }
.h-submit form { background: var(--surface); color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.h-submit form h3 { font-size: 1.25rem; }
