/* ==========================================================================
   RoamX — legal pages stylesheet
   Palette and type derived from the RoamX app UI.
   ========================================================================== */

:root{
  --cream:#F5F0EB;
  --cream-2:#EFE8E1;
  --card:#FFFFFF;
  --ink:#1C1B1A;
  --ink-2:#4E4842;
  --muted:#8C837B;
  --red:#E11B2E;
  --red-2:#C2101F;
  --amber:#F0821E;
  --yellow:#F5C518;
  --dark:#2E2C2B;
  --line:rgba(28,27,26,.09);
  --line-2:rgba(28,27,26,.16);
  --shadow:0 1px 2px rgba(28,27,26,.04), 0 8px 24px rgba(28,27,26,.05);
  --r-sm:12px; --r-md:18px; --r-lg:26px; --r-xl:34px;
  --maxw:1220px;
  --sans:'Outfit',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%; scroll-behavior:smooth; scroll-padding-top:104px}
body{
  margin:0; background:var(--cream); color:var(--ink);
  font-family:var(--sans); font-size:16.5px; line-height:1.72; font-weight:400;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
a{color:var(--red-2); text-underline-offset:3px; text-decoration-thickness:1.5px}
a:hover{color:var(--red)}
::selection{background:rgba(225,27,46,.16)}

/* ---------- decorative background ---------- */
.glow{position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden}
.glow::before,.glow::after{content:""; position:absolute; border-radius:50%; filter:blur(90px); opacity:.30}
.glow::before{width:620px; height:620px; top:-260px; right:-180px;
  background:radial-gradient(circle at 30% 30%, var(--yellow), var(--red) 70%)}
.glow::after{width:520px; height:520px; bottom:-280px; left:-200px;
  background:radial-gradient(circle at 60% 40%, var(--red), transparent 72%); opacity:.18}

/* ---------- header ---------- */
.topbar{
  position:sticky; top:0; z-index:60;
  background:rgba(245,240,235,.82);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.topbar-in{max-width:var(--maxw); margin:0 auto; padding:14px 26px; display:flex; align-items:center; gap:14px}
.brand{display:flex; align-items:center; gap:11px; text-decoration:none; color:inherit}
.brand svg{width:34px; height:34px; display:block; flex:none}
.brand-text{display:flex; flex-direction:column}
.brand-name{font-weight:800; font-size:20px; letter-spacing:-.4px; line-height:1}
.brand-sub{font-size:11.5px; font-weight:500; color:var(--muted); letter-spacing:.14em;
  text-transform:uppercase; line-height:1; margin-top:4px}

.nav{display:flex; align-items:center; gap:4px; margin-left:14px; padding-left:16px; border-left:1px solid var(--line-2)}
.nav a{
  font-size:14.5px; font-weight:600; color:var(--ink-2); text-decoration:none;
  padding:8px 14px; border-radius:999px; transition:background .15s ease, color .15s ease;
}
.nav a:hover{background:var(--cream-2); color:var(--ink)}
.nav a[aria-current="page"]{
  background:linear-gradient(100deg,rgba(225,27,46,.11),rgba(245,197,24,.11)); color:var(--ink);
}
.spacer{flex:1}

.btn{
  display:inline-flex; align-items:center; gap:8px;
  font:inherit; font-weight:600; font-size:14.5px;
  padding:10px 18px; border-radius:999px; border:1px solid var(--line-2);
  background:var(--card); color:var(--ink); cursor:pointer; text-decoration:none;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space:nowrap;
}
.btn:hover{transform:translateY(-1px); box-shadow:var(--shadow); color:var(--ink)}
.btn svg{width:16px; height:16px}
.btn-toc{display:none}

/* ---------- hero ---------- */
.hero{position:relative; z-index:1; max-width:var(--maxw); margin:0 auto; padding:66px 26px 40px}
.eyebrow{
  display:inline-flex; align-items:center; gap:9px;
  background:var(--card); border:1px solid var(--line);
  padding:7px 15px 7px 9px; border-radius:999px;
  font-size:13px; font-weight:600; color:var(--ink-2); box-shadow:var(--shadow);
}
.dot{width:8px; height:8px; border-radius:50%; background:linear-gradient(135deg,var(--yellow),var(--red)); flex:none}
h1{font-size:clamp(38px,6.4vw,68px); line-height:1.03; letter-spacing:-.035em;
  font-weight:800; margin:22px 0 0; max-width:16ch}
h1 .grad{
  background:linear-gradient(102deg,var(--red-2) 8%,var(--red) 42%,var(--amber) 76%,var(--yellow) 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.lede{font-size:clamp(17px,2vw,20px); color:var(--ink-2); max-width:66ch; margin:22px 0 0}
.meta{display:flex; flex-wrap:wrap; gap:10px; margin-top:26px}
.chip{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--card); border:1px solid var(--line); border-radius:999px;
  padding:8px 16px; font-size:13.5px; font-weight:500; color:var(--ink-2); text-decoration:none;
}
a.chip{transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease}
a.chip:hover{transform:translateY(-1px); box-shadow:var(--shadow); border-color:rgba(225,27,46,.35); color:var(--ink-2)}
.chip b{font-weight:700; color:var(--ink)}
.chip svg{width:15px; height:15px; color:var(--red); flex:none}

/* ---------- layout ---------- */
.wrap{position:relative; z-index:1; max-width:var(--maxw); margin:0 auto; padding:0 26px 96px;
  display:grid; grid-template-columns:288px minmax(0,1fr); gap:44px; align-items:start}
.content{min-width:0}

/* ---------- table of contents ---------- */
.toc{position:sticky; top:96px; max-height:calc(100vh - 128px); display:flex; flex-direction:column}
.toc-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:20px 14px 14px; box-shadow:var(--shadow); overflow:hidden;
  display:flex; flex-direction:column; min-height:0;
}
.toc-title{font-size:11.5px; font-weight:700; letter-spacing:.15em; text-transform:uppercase;
  color:var(--muted); padding:0 12px; margin-bottom:12px}
.toc-list{list-style:none; margin:0; padding:0 4px 4px; overflow-y:auto; scrollbar-width:thin}
.toc-list::-webkit-scrollbar{width:6px}
.toc-list::-webkit-scrollbar-thumb{background:var(--line-2); border-radius:99px}
.toc-list a{
  display:flex; gap:10px; align-items:baseline;
  padding:8px 12px; border-radius:12px; text-decoration:none;
  color:var(--ink-2); font-size:14.5px; font-weight:500; line-height:1.4;
  transition:background .15s ease, color .15s ease;
}
.toc-list a:hover{background:var(--cream-2); color:var(--ink)}
.toc-list a .n{font-size:12px; font-weight:700; color:var(--muted); min-width:17px; font-variant-numeric:tabular-nums}
.toc-list a.active{background:linear-gradient(100deg,rgba(225,27,46,.10),rgba(245,197,24,.10)); color:var(--ink); font-weight:600}
.toc-list a.active .n{color:var(--red)}

/* ---------- content cards ---------- */
.intro{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-xl);
  padding:38px 40px; box-shadow:var(--shadow); margin-bottom:22px;
}
.intro p{margin:0 0 18px; color:var(--ink-2)}
.intro p:last-child{margin-bottom:0}
.intro strong{color:var(--ink); font-weight:600}

.notice{
  display:flex; gap:16px; align-items:flex-start;
  background:linear-gradient(100deg,rgba(225,27,46,.06),rgba(245,197,24,.07));
  border:1px solid rgba(225,27,46,.22); border-radius:var(--r-md);
  padding:20px 22px; margin:26px 0 0;
}
.notice svg{width:22px; height:22px; color:var(--red); flex:none; margin-top:2px}
.notice p{margin:0; font-weight:600; color:var(--ink)}

section.sec{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-xl);
  padding:34px 40px 38px; box-shadow:var(--shadow); margin-bottom:22px; scroll-margin-top:104px;
}
.sec-head{display:flex; gap:16px; align-items:center; margin-bottom:8px}
.sec-num{
  flex:none; width:42px; height:42px; border-radius:14px;
  display:grid; place-items:center; font-weight:700; font-size:16px; color:#fff;
  background:linear-gradient(140deg,var(--red-2),var(--red) 55%,var(--amber));
  box-shadow:0 4px 12px rgba(225,27,46,.24); font-variant-numeric:tabular-nums;
}
h2{font-size:clamp(21px,2.6vw,26px); line-height:1.22; letter-spacing:-.02em; font-weight:700; margin:0}
.sec-rule{height:1px; background:var(--line); margin:20px 0 24px}

/* numbered clauses (Terms) */
ol.clauses{list-style:none; margin:0; padding:0}
ol.clauses > li{display:grid; grid-template-columns:52px minmax(0,1fr); gap:6px 12px; padding:0 0 20px}
ol.clauses > li:last-child{padding-bottom:0}
.cl-n{font-size:13.5px; font-weight:700; color:var(--red); font-variant-numeric:tabular-nums;
  padding-top:5px; letter-spacing:-.01em}
.cl-b{color:var(--ink-2)}
.cl-b p{margin:0 0 12px}
.cl-b p:last-child{margin-bottom:0}
.cl-b strong{color:var(--ink); font-weight:600}
.cl-b em{font-style:normal; color:var(--ink); font-weight:600}

/* prose body (Privacy Policy) */
.prose{color:var(--ink-2)}
.prose > p{margin:0 0 16px}
.prose > p:last-child{margin-bottom:0}
.prose strong{color:var(--ink); font-weight:600}
.prose em{font-style:normal; color:var(--ink); font-weight:600}
h3{
  font-size:16px; font-weight:700; color:var(--ink); margin:26px 0 10px;
  letter-spacing:-.01em; display:flex; align-items:center; gap:10px;
}
h3::before{content:""; width:16px; height:3px; border-radius:99px; flex:none;
  background:linear-gradient(90deg,var(--red),var(--amber))}
h3:first-child{margin-top:0}

ul.sub,ul.bullets{margin:12px 0 0; padding:0; list-style:none; display:grid; gap:10px}
ul.bullets{margin:0 0 16px}
ul.sub li,ul.bullets li{position:relative; padding-left:22px}
ul.sub li::before,ul.bullets li::before{
  content:""; position:absolute; left:4px; top:11px; width:7px; height:7px; border-radius:50%;
  background:linear-gradient(135deg,var(--red),var(--amber));
}
ul.bullets.tight{gap:6px}

.statement{
  display:flex; gap:14px; align-items:center;
  background:var(--cream); border:1px solid var(--line); border-radius:var(--r-md);
  padding:16px 20px; margin:0 0 20px; font-weight:600; color:var(--ink);
}
.statement svg{width:20px; height:20px; color:var(--red); flex:none}

/* contact cards */
.contact-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; margin-top:16px}
.contact-card{
  display:flex; gap:14px; align-items:center; text-decoration:none;
  background:var(--cream); border:1px solid var(--line); border-radius:var(--r-md);
  padding:18px 20px; color:inherit;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.contact-card:hover{transform:translateY(-2px); box-shadow:var(--shadow); border-color:rgba(225,27,46,.35); color:inherit}
.contact-ico{flex:none; width:42px; height:42px; border-radius:13px; display:grid; place-items:center;
  background:var(--dark); color:#fff}
.contact-ico svg{width:19px; height:19px}
.contact-k{display:block; font-size:11.5px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--muted); line-height:1}
.contact-v{display:block; font-weight:600; font-size:16px; margin-top:5px; line-height:1.3; word-break:break-word}
.contact-group{margin-top:22px}
.contact-group:first-child{margin-top:0}
.contact-org{font-size:15px; font-weight:700; color:var(--ink); margin:0 0 12px}

/* cross-link to the sibling legal page */
.crosslink{
  display:flex; gap:18px; align-items:center; text-decoration:none; color:inherit;
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-xl);
  padding:26px 32px; box-shadow:var(--shadow);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.crosslink:hover{transform:translateY(-2px); box-shadow:0 2px 4px rgba(28,27,26,.05),0 18px 48px rgba(28,27,26,.10);
  border-color:rgba(225,27,46,.35); color:inherit}
.crosslink .cl-ico{flex:none; width:46px; height:46px; border-radius:15px; display:grid; place-items:center; color:#fff;
  background:linear-gradient(140deg,var(--red-2),var(--red) 55%,var(--amber))}
.crosslink .cl-ico svg{width:21px; height:21px}
.crosslink .cl-k{display:block; font-size:11.5px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--muted); line-height:1}
.crosslink .cl-t{display:block; font-size:19px; font-weight:700; margin-top:6px; letter-spacing:-.015em}
.crosslink .cl-arrow{margin-left:auto; color:var(--red)}
.crosslink .cl-arrow svg{width:22px; height:22px; display:block}

/* ---------- footer ---------- */
footer{position:relative; z-index:1; border-top:1px solid var(--line); background:var(--cream-2)}
.foot-in{max-width:var(--maxw); margin:0 auto; padding:40px 26px 56px;
  display:flex; flex-wrap:wrap; gap:22px; align-items:center; justify-content:space-between}
.foot-in p{margin:0; color:var(--muted); font-size:14px; max-width:60ch}
.foot-links{display:flex; flex-wrap:wrap; gap:22px}
.foot-links a{font-size:14px; font-weight:600; color:var(--ink-2); text-decoration:none}
.foot-links a:hover{color:var(--red)}

/* ---------- back to top ---------- */
#toTop{
  position:fixed; right:24px; bottom:24px; z-index:70;
  width:48px; height:48px; border-radius:50%; border:none; cursor:pointer;
  background:var(--red); color:#fff; display:grid; place-items:center;
  box-shadow:0 8px 24px rgba(225,27,46,.34);
  opacity:0; visibility:hidden; transform:translateY(10px);
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease, background .15s ease;
}
#toTop.show{opacity:1; visibility:visible; transform:none}
#toTop:hover{background:var(--red-2)}
#toTop svg{width:20px; height:20px}

/* ---------- responsive ---------- */
@media (max-width:1040px){
  .wrap{grid-template-columns:1fr; gap:0}
  .btn-toc{display:inline-flex}
  .toc{position:static; max-height:none; margin-bottom:22px}
  .toc-card{display:none}
  .toc.open .toc-card{display:flex}
  .toc-list{max-height:56vh}
}
@media (max-width:860px){
  .nav{margin-left:auto; padding-left:0; border-left:none}
  .nav a{padding:8px 11px; font-size:14px}
  .btn-print span{display:none}
  .btn-print{padding:10px 12px}
}
@media (max-width:680px){
  body{font-size:16px}
  .topbar-in{padding:12px 18px; gap:8px; flex-wrap:wrap}
  .brand-sub{display:none}
  .nav{order:3; width:100%; margin:2px -4px 0; padding-left:0; border-left:none; overflow-x:auto}
  .spacer{display:none}
  .hero{padding:40px 18px 28px}
  .wrap{padding:0 18px 72px}
  .intro,section.sec,.crosslink{padding:26px 22px; border-radius:24px}
  ol.clauses > li{grid-template-columns:1fr; gap:2px}
  .cl-n{padding-top:0}
  .sec-num{width:38px; height:38px; border-radius:12px; font-size:15px}
  .crosslink{gap:14px}
  .foot-in{padding:32px 18px 44px}
  #toTop{right:16px; bottom:16px}
}

/* ---------- dark ---------- */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --cream:#141312; --cream-2:#1B1A18; --card:#1F1E1C;
    --ink:#F4F0EB; --ink-2:#C3BCB4; --muted:#8E867E; --dark:#0E0D0C;
    --line:rgba(255,255,255,.09); --line-2:rgba(255,255,255,.17);
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
    --red:#FF3B4E; --red-2:#FF5C6B;
  }
  :root:not([data-theme="light"]) .contact-ico{background:var(--red)}
  :root:not([data-theme="light"]) .topbar{background:rgba(20,19,18,.82)}
}
:root[data-theme="dark"]{
  --cream:#141312; --cream-2:#1B1A18; --card:#1F1E1C;
  --ink:#F4F0EB; --ink-2:#C3BCB4; --muted:#8E867E; --dark:#0E0D0C;
  --line:rgba(255,255,255,.09); --line-2:rgba(255,255,255,.17);
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --red:#FF3B4E; --red-2:#FF5C6B;
}
:root[data-theme="dark"] .contact-ico{background:var(--red)}
:root[data-theme="dark"] .topbar{background:rgba(20,19,18,.82)}

/* ---------- print ---------- */
@media print{
  :root{--cream:#fff; --cream-2:#fff; --card:#fff; --ink:#000; --ink-2:#222; --line:#ddd}
  .topbar,.toc,#toTop,.glow,.btn,.hero .meta,.crosslink,footer .foot-links{display:none !important}
  body{background:#fff; font-size:10.5pt; line-height:1.5}
  .hero{padding:0 0 12pt}
  h1{font-size:24pt}
  h1 .grad{color:#000 !important; -webkit-text-fill-color:#000}
  .wrap{display:block; padding:0; max-width:none}
  .intro,section.sec{box-shadow:none; border:none; border-top:1pt solid #ddd; border-radius:0;
    padding:14pt 0; margin:0; break-inside:auto}
  .sec-head{break-after:avoid}
  ol.clauses > li,ul.bullets li,.contact-card{break-inside:avoid}
  .sec-num{background:#000 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact}
  a{color:#000; text-decoration:none}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none !important; animation:none !important}
}

/* ==========================================================================
   Home / landing page
   ========================================================================== */
.home{
  position:relative; z-index:1;
  max-width:760px; margin:0 auto;
  min-height:100vh; min-height:100dvh;
  display:flex; flex-direction:column; justify-content:center;
  padding:72px 26px 56px; text-align:center;
}
.home-mark{width:112px; height:112px; margin:0 auto 26px; display:block}
.home h1{
  font-size:clamp(44px,9vw,76px); line-height:1; letter-spacing:-.04em;
  font-weight:800; margin:0; max-width:none;
}
.home .tagline{
  font-size:clamp(17px,2.4vw,21px); color:var(--ink-2);
  margin:18px auto 0; max-width:44ch;
}
.home-links{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px; margin:44px 0 0; text-align:left;
}
.home-links .crosslink{padding:24px 26px}
.home-note{
  margin:40px auto 0; max-width:56ch;
  font-size:14px; color:var(--muted); line-height:1.65;
}
.home-note a{color:var(--muted); text-decoration-color:var(--line-2)}
.home-note a:hover{color:var(--red)}

@media (max-width:680px){
  .home{padding:56px 18px 44px; min-height:0}
  .home-mark{width:88px; height:88px; margin-bottom:20px}
  .home-links{margin-top:34px}
}
@media print{ .home{min-height:0; padding:0} }
