/* Living — Decision Product
   main.css
   --------------------------------------------------
   Goal: Apple Store-like light base with clean typography,
   "spike" sections, and a contrasting dark Decision Canvas module.
   No heavy theming, no template-ish gradients everywhere.
*/

:root{
  /* Light base */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface2: rgba(255,255,255,.72);
  --text: #0b0b0f;
  --muted: rgba(11,11,15,.62);
  --muted2: rgba(11,11,15,.44);
  --stroke: rgba(11,11,15,.10);

  /* Accents (Apple-like, restrained) */
  --accent: #0071e3;   /* Apple blue-ish */
  --accent2: #00c7be;  /* teal */
  --good: #0a7f36;
  --warn: #b25e00;
  --bad: #c90f2a;

  /* Shadows & radius */
  --shadow-sm: 0 6px 18px rgba(0,0,0,.08);
  --shadow-md: 0 18px 50px rgba(0,0,0,.14);
  --r12: 12px;
  --r16: 16px;
  --r20: 20px;

  /* Layout */
  --max: 1180px;
  --g: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

/* Nav: light glass */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,245,247,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(11,11,15,.08);
}
.navin{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 12px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 20px rgba(0,113,227,.18);
}

.navlinks{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  color: rgba(11,11,15,.70);
  font-size: 12px;
  font-weight: 900;
}
.chip strong{color: var(--text)}

/* Sections */
section{padding: 44px 0}

/* "Spike" sections: compact, high-contrast meaning blocks */
.spike{
  padding: 56px 0;
}
.spikeHeader{
  display:grid;
  gap: 10px;
  margin-bottom: 16px;
}
.spikeKicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .24px;
  color: rgba(11,11,15,.60);
  text-transform: uppercase;
}
.spikeTitle{
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -.6px;
  margin: 0;
}
.spikeLead{
  margin:0;
  max-width: 84ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Hero */
.hero{padding: 56px 0 28px}
.badge{
  display:inline-flex;
  gap: 10px;
  align-items:center;
  padding: 8px 12px;
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  color: rgba(11,11,15,.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
}

h1{
  margin: 14px 0 10px;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: -1px;
  max-width: 18ch;
}
.lead{
  margin:0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 78ch;
}

.cta{display:flex; gap:10px; flex-wrap:wrap; margin-top:18px}
.btn{
  appearance:none;
  border: 1px solid rgba(11,11,15,.14);
  background: rgba(255,255,255,.86);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: .2px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.btn:hover{transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: rgba(11,11,15,.20)}
.btn.primary{
  border-color: rgba(0,113,227,.25);
  background: linear-gradient(180deg, rgba(0,113,227,.12), rgba(255,255,255,.92));
}

.hint{margin-top:10px; color: var(--muted2); font-size: 12.5px; line-height: 1.45; max-width: 92ch}

/* Cards */
.card{
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(255,255,255,.92);
  border-radius: var(--r20);
  box-shadow: var(--shadow-sm);
  overflow:hidden;
}
.panel{padding: 16px}

.grid2{display:grid; grid-template-columns: 1.05fr .95fr; gap: var(--g); align-items:start}

h2{margin:0 0 10px; font-size: 22px; letter-spacing: -.2px}
.p{margin:0; color: var(--muted); font-size: 14.5px; line-height: 1.6}

.kpiRow{display:grid; grid-template-columns: 1fr 1fr 1fr; gap:10px; margin-top:12px}
.kpi{
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(245,245,247,.70);
  border-radius: var(--r16);
  padding: 12px;
}
.kpi .t{color: rgba(11,11,15,.50); font-size: 11px; font-weight: 900; letter-spacing: .28px; text-transform: uppercase}
.kpi .v{margin-top: 8px; font-size: 18px; font-weight: 900}

.bullets{display:grid; gap:10px; margin-top:12px}
.b{
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(245,245,247,.60);
  border-radius: var(--r16);
  padding: 12px;
}
.b .h{font-weight: 900; margin:0 0 6px; font-size: 13px}
.b .d{margin:0; color: var(--muted); font-size: 13.2px; line-height: 1.45}

/* Decision Canvas — a contrasting dark module */
.canvasSec{
  padding: 56px 0;
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(0,199,190,.14), transparent 55%),
    radial-gradient(900px 520px at 80% 0%, rgba(0,113,227,.12), transparent 55%),
    linear-gradient(180deg, #0b1022, #0a0f20);
  color: rgba(255,255,255,.92);
}
.canvasSec .spikeKicker,
.canvasSec .spikeLead{color: rgba(255,255,255,.70)}

.canvasWrap{display:grid; grid-template-columns: 1.1fr .9fr; gap: var(--g); align-items:start}

/* Left column wrapper (lets us keep the map + controls together) */
.canvasLeft{min-width: 0}
.sticky{position: sticky; top: 78px}

.map{
  height: 540px;
  border-radius: var(--r20);
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(900px 420px at 30% 10%, rgba(0,113,227,.18), transparent 60%),
    radial-gradient(900px 420px at 70% 10%, rgba(0,199,190,.12), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.08));
  position: relative;
  overflow: hidden;
}

.map::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .50;
  pointer-events:none;
}

.hudbar{position:absolute; left:14px; right:14px; top:14px; display:flex; justify-content:space-between; gap:10px; pointer-events:none}

/* Map legend (meaning of colors) */
.mapLegend{
  position:absolute;
  z-index: 3;
  left: 14px;
  top: 58px; /* below hudbar */
  width: 260px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  color: rgba(255,255,255,.86);
  font-size: 13px;
  line-height: 1.25;
  pointer-events: none;
}
.mapLegendRow{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 6px 0;
}
.dotL{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,.30);
  flex: 0 0 auto;
}
.dotL.good{ background: rgba(52,199,89,.92); }
.dotL.mid{  background: rgba(255,159,10,.92); }
.dotL.bad{  background: rgba(255,59,48,.92); }
.mapLegendHint{
  margin-top: 8px;
  color: rgba(255,255,255,.68);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 980px){
  .mapLegend{width: 220px; top: 56px}
}
.hudtag{
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
}

.zone{
  position:absolute;
  z-index: 2;
  transform: translate(-50%,-50%);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,113,227,.16);
  box-shadow: 0 18px 60px rgba(0,0,0,.38);
  backdrop-filter: blur(6px);
  padding: 16px 18px;
  min-width: 150px;
  text-align: center;
  transition: transform .12s ease;
}
.zone:hover{transform: translate(-50%,-50%) scale(1.03)}
.zone b{display:block; font-size: 14px; letter-spacing: .2px}
.zone span{color: rgba(255,255,255,.72); font-size: 12px; font-weight: 900}

/* ===== Map zones: FREE vs PRO visual language ===== */

/* FREE mode (default): emphasize richness of choice */
.zone.m-free{
  background: rgba(0,113,227,.16);
}

.zone.m-free.t-rich{
  box-shadow:
    0 0 0 1px rgba(0,113,227,.35),
    0 18px 60px rgba(0,113,227,.25);
}

.zone.m-free.t-mid{
  box-shadow:
    0 0 0 1px rgba(255,255,255,.22),
    0 14px 44px rgba(0,0,0,.30);
}

.zone.m-free.t-thin{
  opacity: .75;
}

/* PRO mode: emphasize risk / fragility / confidence */
.zone.m-pro{
  background: rgba(255,255,255,.10);
}

.zone.m-pro.t-ok{
  box-shadow:
    0 0 0 1px rgba(52,199,89,.45),
    0 16px 48px rgba(52,199,89,.25);
}

.zone.m-pro.t-watch{
  box-shadow:
    0 0 0 1px rgba(255,159,10,.45),
    0 16px 48px rgba(255,159,10,.22);
}

.zone.m-pro.t-warn{
  box-shadow:
    0 0 0 1px rgba(255,59,48,.50),
    0 18px 56px rgba(255,59,48,.28);
}

/* Subtle emphasis on hover in PRO */
.zone.m-pro:hover{
  transform: translate(-50%,-50%) scale(1.05);
}
.zone:hover{transform: translate(-50%,-50%) scale(1.03)}
.zone b{display:block; font-size: 14px; letter-spacing: .2px}
.zone span{color: rgba(255,255,255,.72); font-size: 12px; font-weight: 900}

.z-good{background: rgba(10,127,54,.22)}
.z-warn{background: rgba(178,94,0,.22)}
.z-bad{background: rgba(201,15,42,.22)}

/* Controls inside dark canvas */
.controlsCard{margin-top: 12px}
.row{display:flex; justify-content:space-between; align-items:center; gap:10px; margin:10px 0}
.label{color: rgba(255,255,255,.62); font-size: 12px; font-weight: 900; letter-spacing: .25px; text-transform: uppercase}
.pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.90);
  font-size: 12px;
  font-weight: 900;
}

/* Controls card is a light surface placed inside a dark section.
   Override text tokens so labels and values stay readable. */
.canvasSec .controlsCard{
  background: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.18);
}
.canvasSec .controlsCard .panel{
  color: var(--text);
}
.canvasSec .controlsCard h3{
  color: var(--text);
}
.canvasSec .controlsCard .label{
  color: rgba(11,11,15,.62);
}
.canvasSec .controlsCard .pill{
  border: 1px solid rgba(11,11,15,.14);
  background: rgba(245,245,247,.92);
  color: rgba(11,11,15,.88);
}

/* Range track inside the light card */
.canvasSec .controlsCard input[type="range"]{
  border-color: rgba(11,11,15,.12);
}

/* Scenes list */
.steps{display:grid; gap:12px}
.scene{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.14);
  border-radius: var(--r16);
  padding: 14px;
}
.scene .cap{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px}
.scene .cap strong{font-size: 13px; font-weight: 900}
.scene .cap span{color: rgba(255,255,255,.60); font-size: 12px; font-weight: 900}
.scene p{margin:0; color: rgba(255,255,255,.72); font-size: 13.2px; line-height: 1.45}
.scene.isActive{
  border-color: rgba(0,113,227,.45);
  background: linear-gradient(135deg, rgba(0,113,227,.14), rgba(0,0,0,.14));
  box-shadow: 0 14px 55px rgba(0,113,227,.14);
}

/* Insights boxes (dark section) */
.ins{display:grid; gap:10px}
.insbox{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.16);
  border-radius: var(--r16);
  padding: 12px;
}
.insbox h4{margin:0 0 6px; font-size: 13px}
.insbox p{margin:0; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.35}

/* ---------------------------------
   Consequence layer: Listings rail
   (light section, horizontal scroll)
   --------------------------------- */

.listingsSec{
  padding: 18px 0 56px;
  background: var(--bg);
}

.listingsCardLight{
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
}

/* Horizontal rail: fixed card widths (prevents grid from stretching and "drifting") */
.listingsRail{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 12px;

  width: 100%;
  max-width: 100%;

  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 12px;

  scroll-snap-type: x mandatory;
  scroll-padding-left: 6px;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
}

.listingsRail::-webkit-scrollbar{height: 10px}
.listingsRail::-webkit-scrollbar-thumb{
  background: rgba(11,11,15,.18);
  border-radius: 999px;
}
.listingsRail::-webkit-scrollbar-track{background: rgba(11,11,15,.06)}

.listing{
  scroll-snap-align: start;
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(255,255,255,.96);
  border-radius: var(--r16);
  padding: 12px;
  min-height: 164px;
  box-shadow: var(--shadow-sm);
}

.listingTop{display:flex; justify-content:space-between; align-items:flex-start; gap:10px}
.listingTitle{font-weight: 900; letter-spacing: -.2px; line-height: 1.15; color: var(--text)}
.listingMeta{margin-top:6px; color: var(--muted); font-size: 12.5px; line-height: 1.35}

.listingBadges{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end}
.listingBadge{
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(11,11,15,.12);
  background: rgba(245,245,247,.92);
  color: rgba(11,11,15,.82);
  font-size: 11.5px;
  font-weight: 900;
}
.listingBadge.ok{border-color: rgba(10,127,54,.28)}
.listingBadge.watch{border-color: rgba(178,94,0,.28)}
.listingBadge.warn{border-color: rgba(201,15,42,.30)}

.listingWhy{margin-top:10px; display:grid; gap:8px}
.listingWhyItem{
  border: 1px solid rgba(11,11,15,.08);
  background: rgba(245,245,247,.86);
  border-radius: 12px;
  padding: 9px 10px;
  color: rgba(11,11,15,.78);
  font-size: 12.5px;
  line-height: 1.35;
}

.listingActions{margin-top:10px; display:flex; gap:8px}
.listingBtn{
  flex: 1;
  border-radius: 12px;
  padding: 10px 10px;
  border: 1px solid rgba(0,113,227,.22);
  background: linear-gradient(180deg, rgba(0,113,227,.12), rgba(255,255,255,.96));
  color: rgba(11,11,15,.92);
  font-weight: 900;
  cursor: pointer;
}
.listingBtn.ghost{
  border-color: rgba(11,11,15,.14);
  background: rgba(245,245,247,.92);
}

/* Mobile: bigger cards, easier horizontal swipe */
@media (max-width: 980px){
  .listingsRail{grid-auto-columns: minmax(240px, 78vw)}
}

/* Favorites (heart) */
.favBtn{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(11,11,15,.14);
  background: rgba(245,245,247,.92);
  color: rgba(11,11,15,.55);
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, color .12s ease, background .12s ease;
}
.favBtn:hover{transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: rgba(11,11,15,.22)}
.favBtn.on{
  color: rgba(201,15,42,.92);
  border-color: rgba(201,15,42,.28);
  background: rgba(201,15,42,.08);
}

/* Hot offers (Apple Store-like cards) */

/* Hot shelf PRO lock */
.hotShelf{position: relative}
.hotShelf.isLocked .hotGrid{
  filter: blur(6px);
  opacity: .55;
  pointer-events: none;
}

.hotLock{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 4;
}
.hotLockInner{
  width: min(840px, 100%);
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(255,255,255,.92);
  border-radius: var(--r20);
  box-shadow: var(--shadow-md);
  padding: 16px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
}
.hotLockIcon{
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(0,113,227,.22);
  background: linear-gradient(180deg, rgba(0,113,227,.12), rgba(255,255,255,.92));
  font-size: 20px;
}
.hotLockTitle{font-weight: 900; letter-spacing: -.2px}
.hotLockText{margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.55}
.hotLockCta{margin-top: 10px; display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.hotLockHint{color: var(--muted2); font-size: 12.5px; line-height: 1.4}

/* When unlocked (PRO), hide overlay and restore grid */
body.isPro .hotShelf .hotLock{display:none}
body.isPro .hotShelf .hotGrid{filter:none; opacity:1; pointer-events:auto}

@media (max-width: 980px){
  .hotLockInner{grid-template-columns: 1fr}
}
.hot{
  padding: 56px 0;
}
.hotGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hotCard{
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(255,255,255,.96);
  border-radius: var(--r20);
  box-shadow: var(--shadow-sm);
  overflow:hidden;
  padding: 14px;
}
.hotPill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11,11,15,.10);
  background: rgba(245,245,247,.82);
  color: rgba(11,11,15,.70);
  font-size: 12px;
  font-weight: 900;
}
.hotTitle{margin: 10px 0 6px; font-weight: 900; letter-spacing: -.2px}
.hotMeta{color: var(--muted); font-size: 13px; line-height: 1.45}
.hotWhy{margin-top: 10px; color: rgba(11,11,15,.78); font-size: 13px; line-height: 1.45}
.hotBtn{
  margin-top: 12px;
  width: 100%;
  border-radius: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(0,113,227,.22);
  background: linear-gradient(180deg, rgba(0,113,227,.10), rgba(255,255,255,.92));
  font-weight: 900;
  cursor: pointer;
}

/* Footer */
.footer{padding: 42px 0 60px; color: rgba(11,11,15,.52); font-size: 12.5px; line-height: 1.55}

/* Responsive */
@media (max-width: 980px){
  h1{font-size: 40px; max-width: 22ch}
  .grid2{grid-template-columns: 1fr}
  .canvasWrap{grid-template-columns: 1fr}
  .sticky{position: relative; top: auto}
  .map{height: 420px}
  .navlinks{display:none}
  .hotGrid{grid-template-columns: 1fr}
  .spikeTitle{font-size: 30px}
}