/* ==========================================================================
   SnapMate — shared design system (Safety Center style)
   ========================================================================== */

:root{
  --ink:#1B1B1F;
  --ink-soft:#45464F;
  --cloud:#F7FAFD;
  --paper:#FFFFFF;
  --line:#E1E2EC;
  --pine:#005DE9;
  --pine-deep:#003790;
  --brick:#BA1A1A;
  --gold:#735471;
  --panel:#12151C;
  --panel-fg:#F2F5F4;
  --panel-muted:#B9C0C6;
  --radius:14px;
  --wrap:1180px;
}
html.dark{
  --ink:#E4E2E6;
  --ink-soft:#C4C7C5;
  --cloud:#000000;
  --paper:#1B1B1F;
  --line:#45464F;
  --pine:#1a75ff;
  --pine-deep:#C2E7FF;
  --brick:#FFB4AB;
  --gold:#E1BBDD;
  --panel:#000000;
}

body{ transition:background .25s ease, color .25s ease; }
.topbar, .card, .scam, .guidelines-box, .contact-card, .chapters-sheet{
  transition:background .25s ease, border-color .25s ease, color .25s ease;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--cloud);
  color:var(--ink);
  font-family:'Inter',sans-serif;
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{
  font-family:'Fraunces',serif;
  font-weight:500;
  letter-spacing:-0.01em;
  margin:0;
}
.eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--pine-deep);
}
a{color:inherit;}
img,svg{display:block;}
button{font-family:inherit;}

/* ---------- Top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 28px;
  background:var(--cloud);
  border-bottom:1px solid var(--line);
}
.topbar__brand{
  display:flex; align-items:center; gap:10px;
  font-family:'Fraunces',serif;
  font-style:italic;
  font-weight:500;
  font-size:16px; letter-spacing:0.01em;
  text-decoration:none;
}
.topbar__brand .dot{width:8px;height:8px;border-radius:50%;background:var(--pine);}
.topbar__actions{display:flex; align-items:center; gap:4px;}
.icon-btn{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border:none; background:transparent; color:var(--ink);
  cursor:pointer; transition:background .2s ease;
  padding:0;
}
.icon-btn:hover{background:rgba(0,0,0,0.06);}
html.dark .icon-btn:hover{background:rgba(255,255,255,0.08);}
.icon-btn svg{width:20px;height:20px;}
.icon-btn .icon-sun{display:none;}
html.dark .icon-btn .icon-moon{display:none;}
html.dark .icon-btn .icon-sun{display:block;}

/* ---------- Mobile chapters: FAB + bottom sheet ---------- */
.chapters-fab{
  display:none;
  position:fixed; right:18px; bottom:20px; z-index:70;
  width:56px; height:56px; border-radius:16px;
  background:var(--pine); color:#fff;
  border:none; align-items:center; justify-content:center;
  box-shadow:0 6px 18px rgba(0,0,0,0.28);
  cursor:pointer;
}
.chapters-fab svg{width:24px;height:24px;}
.sheet-scrim{
  display:none;
  position:fixed; inset:0; z-index:80;
  background:rgba(0,0,0,0.45);
  opacity:0; transition:opacity .25s ease;
}
.sheet-scrim.open{display:block; opacity:1;}
.chapters-sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:90;
  background:var(--paper);
  border-radius:24px 24px 0 0;
  padding:10px 6px 24px;
  max-height:72vh; overflow-y:auto;
  transform:translateY(100%);
  transition:transform .3s cubic-bezier(.2,.8,.2,1);
  box-shadow:0 -10px 30px rgba(0,0,0,0.2);
}
.chapters-sheet.open{transform:translateY(0);}
.sheet-handle{
  width:36px; height:4px; border-radius:999px;
  background:var(--line); margin:6px auto 14px;
}
.sheet-title{padding:0 18px 6px;}
.sheet-list{list-style:none; margin:0; padding:2px 8px 0;}
.sheet-list a{
  display:flex; align-items:center; gap:14px;
  padding:13px 12px; border-radius:12px;
  text-decoration:none; color:var(--ink); font-size:15px;
}
.sheet-list a .num{
  font-family:'IBM Plex Mono',monospace; font-size:12px;
  color:var(--pine-deep); width:20px; flex-shrink:0;
}
.sheet-list a.active{background:var(--cloud);}

/* ---------- Hero ---------- */
.hero{
  max-width:var(--wrap);
  margin:0 auto;
  padding:72px 28px 40px;
}
.hero h1{
  font-size:clamp(38px,6vw,64px);
  line-height:1.04;
  margin-top:14px;
  max-width:16ch;
}
.hero h1 em{font-style:italic; color:var(--pine-deep);}
.hero p{
  max-width:52ch;
  font-size:18px;
  color:var(--ink-soft);
  margin-top:18px;
}
.hero__actions{
  display:flex; gap:14px; flex-wrap:wrap;
  margin-top:28px;
}
.btn-primary, .btn-ghost{
  display:inline-flex; align-items:center; gap:8px;
  padding:13px 22px;
  border-radius:999px;
  font-size:14.5px; font-weight:500;
  text-decoration:none;
  border:1px solid transparent;
  cursor:pointer;
}
.btn-primary{background:var(--pine); color:#fff;}
.btn-ghost{border-color:var(--ink); color:var(--ink); background:transparent;}
.store-btn svg{width:20px; height:20px; flex:none;}
.store-btn.soon{
  border-color:var(--line); color:var(--ink-soft); cursor:default;
}
.store-btn .soon-tag{margin-left:2px;}

/* Signature pulse line */
.pulse-wrap{
  margin-top:56px;
  padding-top:28px;
  border-top:1px solid var(--line);
}
.pulse-wrap svg{width:100%; height:64px;}
.pulse-path{
  fill:none;
  stroke:var(--brick);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:1200;
  stroke-dashoffset:1200;
  animation:draw 2.6s ease-out forwards;
}
.pulse-path--calm{ stroke:var(--pine); }
@keyframes draw{ to{ stroke-dashoffset:0; } }
.pulse-caption{
  display:flex; justify-content:space-between;
  font-family:'IBM Plex Mono',monospace;
  font-size:11.5px; color:var(--ink-soft);
  margin-top:8px;
}

/* ---------- Layout: sidebar + content ---------- */
.layout{
  max-width:var(--wrap);
  margin:0 auto;
  display:grid;
  grid-template-columns:220px 1fr;
  gap:56px;
  padding:0 28px 100px;
}
.sidebar{
  position:sticky; top:90px;
  align-self:start;
  height:fit-content;
}
.sidebar ol{list-style:none; margin:0; padding:0;}
.sidebar li{margin-bottom:2px;}
.sidebar a{
  display:flex; gap:10px;
  padding:9px 10px;
  border-radius:8px;
  text-decoration:none;
  font-size:13.5px;
  color:var(--ink-soft);
}
.sidebar a .num{
  font-family:'IBM Plex Mono',monospace;
  font-size:11.5px;
  color:var(--pine-deep);
  opacity:0.7;
}
.sidebar a.active{background:var(--paper); color:var(--ink); box-shadow:0 0 0 1px var(--line);}
.sidebar a.active .num{opacity:1;}

.content{min-width:0;}
section.chapter{
  padding:56px 0;
  border-bottom:1px solid var(--line);
  scroll-margin-top:130px;
}
section.chapter:last-child{border-bottom:none;}
.chapter__head{display:flex; gap:16px; align-items:baseline; margin-bottom:8px;}
.chapter__num{font-family:'IBM Plex Mono',monospace; font-size:13px; color:var(--pine-deep);}
.chapter h2{font-size:clamp(24px,3vw,32px);}
.chapter__intro{color:var(--ink-soft); max-width:60ch; margin-top:10px;}
.chapter h3{
  font-family:'Inter',sans-serif; font-weight:600; font-size:15.5px;
  margin-top:24px; margin-bottom:8px;
}
.chapter p{color:var(--ink-soft); font-size:15px; max-width:66ch;}
.chapter ul{color:var(--ink-soft); font-size:15px; max-width:64ch; padding-left:20px;}
.chapter li{margin-bottom:6px;}

/* Rule list */
.rule-list{
  margin-top:28px;
  display:grid;
  gap:2px;
}
.rule{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:16px;
  padding:18px 0;
  border-top:1px solid var(--line);
}
.rule:first-child{border-top:none;}
.rule .icon{color:var(--pine); margin-top:2px;}
.rule strong{display:block; font-size:15.5px; margin-bottom:3px;}
.rule span{color:var(--ink-soft); font-size:14.5px;}

/* Definition / data cards */
.data-list{margin-top:28px; display:grid; gap:10px;}
.data-item{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px 22px;
}
.data-item h3{margin:0 0 8px;}
.data-item ul{margin:0; padding-left:18px;}

/* Note / callout */
.note-box{
  margin-top:16px;
  font-size:14px;
  color:var(--ink-soft);
  background:var(--paper);
  border-left:3px solid var(--gold);
  padding:12px 16px;
  border-radius:0 8px 8px 0;
}

/* Highlighted callout card (important notice) — same palette as the rest of the page */
.highlight{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px 28px;
  margin-top:20px;
}
.highlight p{margin:0;}
.highlight p + p{margin-top:14px;}

/* Contact */
#contact{border-bottom:none;}
.contact-card{
  background:var(--pine);
  color:#fff;
  border-radius:20px;
  padding:44px 40px;
  display:flex; align-items:center; justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.contact-card h2{color:#fff; font-size:clamp(22px,3vw,28px);}
.contact-card p{color:rgba(255,255,255,0.82); margin-top:8px; max-width:44ch;}
.contact-card .btn-primary{background:#fff; color:var(--pine-deep);}
.contact-card .mono{font-family:'IBM Plex Mono',monospace; font-size:13px; opacity:.85; margin-top:10px; display:block;}

footer{
  max-width:var(--wrap); margin:0 auto; padding:32px 28px 60px;
  font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--ink-soft);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
}
footer a{text-decoration:none; color:var(--ink-soft);}
footer a:hover{color:var(--ink);}

/* ---------- Landing page ---------- */
.landing{
  max-width:var(--wrap);
  margin:0 auto;
  padding:72px 28px 100px;
}
.landing__links{
  margin-top:40px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  max-width:640px;
}
.landing__links a{
  display:block;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  text-decoration:none;
  color:var(--ink);
  transition:border-color .2s ease, transform .2s ease;
}
.landing__links a:hover{border-color:var(--pine); transform:translateY(-2px);}
.landing__links .num{font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--pine-deep); display:block; margin-bottom:8px;}
.landing__links strong{display:block; font-size:17px; margin-bottom:4px; font-family:'Inter',sans-serif; font-weight:600;}
.landing__links span{color:var(--ink-soft); font-size:14px;}

/* ---------- Responsive ---------- */
@media (max-width:880px){
  .layout{grid-template-columns:1fr;}
  .sidebar{display:none;}
  .chapters-fab{display:flex;}
  .panel-section{margin:0 -20px; padding:44px 20px;}
  .contact-card{padding:32px 24px;}
  .landing__links{grid-template-columns:1fr;}
}
@media (prefers-reduced-motion: reduce){
  .pulse-path{animation:none; stroke-dashoffset:0;}
  html{scroll-behavior:auto;}
}

/* ==========================================================================
   Language switch
   ========================================================================== */
.lang-switch{position:relative;}
.lang-btn{
  display:flex; align-items:center; gap:6px;
  height:40px; padding:0 12px;
  border-radius:999px; border:1px solid var(--line);
  background:transparent; color:var(--ink);
  font-family:'IBM Plex Mono',monospace; font-size:12.5px;
  cursor:pointer;
}
.lang-btn svg{width:15px; height:15px;}
.lang-menu{
  display:none;
  position:absolute; right:0; top:48px; z-index:60;
  background:var(--paper); border:1px solid var(--line); border-radius:12px;
  min-width:180px; padding:6px; box-shadow:0 12px 30px rgba(0,0,0,0.15);
}
.lang-menu.open{display:block;}
.lang-menu button{
  display:flex; align-items:center; justify-content:space-between;
  width:100%; text-align:left; padding:10px 12px; border-radius:8px;
  border:none; background:transparent; color:var(--ink);
  font-size:14px; cursor:pointer;
}
.lang-menu button:hover{background:var(--cloud);}
.lang-menu button[aria-checked="true"]{color:var(--pine); font-weight:600;}
.lang-menu button.soon{color:var(--ink-soft); cursor:default;}
.lang-menu button.soon:hover{background:transparent;}
.lang-menu .soon-tag{
  font-family:'IBM Plex Mono',monospace; font-size:10px;
  color:var(--ink-soft); border:1px solid var(--line); border-radius:999px;
  padding:2px 7px;
}

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */
.cookie-banner{
  position:fixed; left:0; right:0; bottom:0; z-index:95;
  background:var(--paper); border-top:1px solid var(--line);
  box-shadow:0 -8px 24px rgba(0,0,0,0.12);
  padding:20px 28px;
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  transform:translateY(120%);
  transition:transform .3s ease;
}
.cookie-banner.open{transform:translateY(0);}
.cookie-banner p{margin:0; font-size:13.5px; color:var(--ink-soft); max-width:60ch; flex:1;}
.cookie-banner p a{color:var(--pine); text-decoration:underline;}
.cookie-banner .actions{display:flex; gap:10px; flex-wrap:wrap;}
.cookie-banner .btn-primary, .cookie-banner .btn-ghost{padding:10px 18px; font-size:13.5px;}

/* ==========================================================================
   Cookie preference toggles
   ========================================================================== */
.toggle-row{
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:20px 0; border-top:1px solid var(--line);
}
.toggle-row:first-child{border-top:none;}
.toggle-row h3{margin:0 0 4px;}
.toggle-row p{margin:0; font-size:13.5px; color:var(--ink-soft); max-width:52ch;}
.toggle{
  position:relative; width:46px; height:26px; flex-shrink:0;
  border-radius:999px; background:var(--line); border:none; cursor:pointer;
}
.toggle::after{
  content:''; position:absolute; top:3px; left:3px;
  width:20px; height:20px; border-radius:50%; background:#fff;
  transition:left .2s ease; box-shadow:0 1px 3px rgba(0,0,0,0.25);
}
.toggle[aria-checked="true"]{background:var(--pine);}
.toggle[aria-checked="true"]::after{left:23px;}
.toggle[disabled]{opacity:.6; cursor:not-allowed;}

/* ==========================================================================
   FAQ accordion (Help Center)
   ========================================================================== */
.faq-list{margin-top:28px; display:grid; gap:10px;}
.faq{
  background:var(--paper); border:1px solid var(--line);
  border-radius:var(--radius); overflow:hidden;
}
.faq summary{
  list-style:none; display:flex; align-items:center; gap:14px;
  padding:16px 20px; cursor:pointer; font-weight:500; font-size:15px;
}
.faq summary::-webkit-details-marker{display:none;}
.faq summary .chev{margin-left:auto; color:var(--ink-soft); transition:transform .2s ease;}
.faq[open] summary .chev{transform:rotate(45deg);}
.faq .body{padding:0 20px 18px; color:var(--ink-soft); font-size:14.5px; max-width:60ch;}

/* ==========================================================================
   City grid
   ========================================================================== */
.city-grid{margin-top:28px; display:grid; grid-template-columns:repeat(3,1fr); gap:12px;}
.city-chip{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px 20px;
}
.city-chip strong{display:block; font-size:15.5px; margin-bottom:2px;}
.city-chip span{color:var(--ink-soft); font-size:13px;}
@media (max-width:880px){ .city-grid{grid-template-columns:1fr 1fr;} }
@media (max-width:520px){ .city-grid{grid-template-columns:1fr;} }

/* ==========================================================================
   Blog grid
   ========================================================================== */
.blog-grid{margin-top:28px; display:grid; grid-template-columns:repeat(2,1fr); gap:18px;}
.blog-card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:24px; display:flex; flex-direction:column; gap:10px;
}
.blog-card .tag{font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--pine-deep); text-transform:uppercase; letter-spacing:.08em;}
.blog-card h3{font-family:'Inter',sans-serif; font-weight:600; font-size:16.5px; margin:0;}
.blog-card p{margin:0; color:var(--ink-soft); font-size:14px;}
@media (max-width:700px){ .blog-grid{grid-template-columns:1fr;} }

/* ==========================================================================
   Profile swipe cards (hero — signals "dating app" visually)
   ========================================================================== */
.swipe-stage{
  position:relative; width:100%; max-width:300px; height:360px;
  margin:36px auto 0;
}
.profile-card{
  position:absolute; inset:0; border-radius:22px; overflow:hidden;
  background:var(--paper); border:1px solid var(--line);
  box-shadow:0 20px 40px rgba(0,0,0,0.18);
  display:flex; flex-direction:column; justify-content:flex-end;
}
.profile-card .avatar{
  position:absolute; inset:0;
  background-size:cover;
  background-position:center;
  background-color:var(--ink);
}
.profile-card.card-a{ transform:rotate(-6deg) translateX(-14px); z-index:1; }
.profile-card.card-b{ transform:rotate(4deg) translateX(18px); z-index:2; }
.profile-card .info{
  position:relative; z-index:2; padding:16px 18px 18px;
  background:linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  color:#fff;
}
.profile-card .info strong{display:block; font-size:17px; font-family:'Inter',sans-serif; font-weight:600;}
.profile-card .info span{font-size:12.5px; opacity:.85; font-family:'IBM Plex Mono',monospace;}
.swipe-actions{
  display:flex; justify-content:center; gap:16px; margin-top:22px;
}
.swipe-actions button{
  width:52px; height:52px; border-radius:50%; border:1px solid var(--line);
  background:var(--paper); display:flex; align-items:center; justify-content:center;
  cursor:default;
}
.swipe-actions .pass{color:var(--brick);}
.swipe-actions .like{color:var(--pine);}

/* ==========================================================================
   Site footer (multi-column, shared across pages)
   ========================================================================== */
.site-footer{
  max-width:var(--wrap); margin:0 auto; padding:56px 28px 40px;
  border-top:1px solid var(--line);
}
.site-footer__grid{
  display:grid; grid-template-columns:1.2fr 1fr 1fr 1fr; gap:32px;
}
.site-footer__brand .topbar__brand{padding:0; margin-bottom:10px;}
.site-footer__brand p{color:var(--ink-soft); font-size:13px; max-width:32ch; margin:0;}
.site-footer h4{
  font-family:'IBM Plex Mono',monospace; font-size:11.5px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-soft); margin:0 0 14px;
}
.site-footer ul{list-style:none; margin:0; padding:0; display:grid; gap:10px;}
.site-footer a{text-decoration:none; color:var(--ink); font-size:13.5px;}
.site-footer a:hover{color:var(--pine);}
.site-footer__bottom{
  margin-top:40px; padding-top:20px; border-top:1px solid var(--line);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--ink-soft);
}
@media (max-width:880px){
  .site-footer__grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:520px){
  .site-footer__grid{grid-template-columns:1fr;}
}
