/* Riyoflow site — layout + components. Depends on css/tokens.css. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--read);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  transition: background .35s, color .35s;
  -webkit-font-smoothing: antialiased;
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .04;
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
h1, h2, h3 { font-weight: 600; line-height: 1.08; margin: 0; color: var(--text); letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: 0; }
p { margin: 0 0 1rem; font-size: 16.5px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text); margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--crimson); }
.muted { color: var(--muted); }
section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--crimson); color: var(--on-crimson);
  padding: 10px 18px; border-radius: 0 0 10px 0; font-size: 13px; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- nav ---------- */
nav.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--navbg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.navin { max-width: var(--maxw); margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 16px; }
.brand { font-size: 21px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.brand b { color: var(--gold); font-weight: 600; }
.navlinks { display: flex; gap: 22px; margin-left: 18px; }
.navlinks a { font-size: 13px; color: var(--muted); }
.navlinks a:hover, .navlinks a:focus-visible { color: var(--text); }
.sp { flex: 1; }
.tmode { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.tmode button {
  background: transparent; border: 0; padding: 7px 9px; cursor: pointer;
  color: var(--muted); display: inline-flex; align-items: center; line-height: 0;
}
.tmode button.on { background: var(--surface2); color: var(--crimson); }
.tmode button:hover { color: var(--text); }
.tmode svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 11px 20px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; display: inline-block;
  transition: transform .18s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--crimson); color: var(--on-crimson); }
.btn-primary:hover { background: var(--crimson-deep); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line2); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); transform: translateY(-2px); }
.navcta { padding: 9px 16px; font-size: 13px; }

/* ---------- duality hero ---------- */
.duality { border-top: none; padding: 0; }
.faces { display: flex; min-height: clamp(420px, 58vh, 560px); }
.face {
  flex: 1; position: relative; overflow: hidden;
  background: var(--bg); color: var(--read);
  padding: clamp(44px, 6vw, 84px) clamp(24px, 4vw, 56px) clamp(96px, 10vw, 128px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.face::before {
  content: ""; position: absolute; top: -160px; left: 50%; width: 620px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow), transparent 62%);
  pointer-events: none;
}
.face .eyebrow { color: var(--dim); }
.face h1 { font-size: clamp(1.9rem, 3.6vw, 3rem); color: var(--text); }
.face > * { position: relative; }
.face .mini { margin-top: clamp(24px, 3.5vw, 40px); }
.duality .joinline {
  text-align: center; position: relative; z-index: 3;
  margin: -58px auto 0; max-width: 620px; padding: 0 24px;
}
.duality .joinline p {
  display: inline-block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 26px; margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--text);
  box-shadow: 0 18px 50px var(--shadow);
}
.duality .btns { justify-content: center; padding: 0 24px; }
.btns { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 30px; align-items: center; }
.trust { font-size: 12.5px; color: var(--dim); margin-top: 20px; text-align: center; letter-spacing: .02em; }

/* mini dashboard card inside each hero face */
.mini {
  width: 250px; text-align: left;
  background: var(--surface); border: 1px solid var(--line2); border-radius: 20px;
  padding: 16px; box-shadow: 0 22px 60px var(--shadow);
}
.mini .mhd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mini .nm { font-size: 15px; font-weight: 600; color: var(--text); }
.mini .sq { font-size: 11px; color: var(--muted); }
.mini .pill { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--gold); color: #2E2008; }
.mini .mcard {
  background: var(--surface2); border-left: 3px solid var(--crimson);
  border-radius: 0 11px 11px 0; padding: 9px 12px; margin-bottom: 10px;
}
.mini .mcard .t { font-size: 12.5px; font-weight: 600; color: var(--text); }
.mini .mcard .m { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.mini .mtiles { display: flex; gap: 7px; }
.mini .mtile { flex: 1; background: var(--surface2); border-radius: 10px; padding: 8px 4px; text-align: center; }
.mini .mtile .n { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini .mtile .l { font-size: 9.5px; color: var(--muted); margin-top: 1px; }

/* ---------- stat band ---------- */
.statband { background: var(--bg2); padding: clamp(44px, 6vw, 72px) 0; }
.stats { display: flex; gap: clamp(24px, 5vw, 64px); justify-content: center; flex-wrap: wrap; text-align: center; }
.stat .n {
  font-size: clamp(3rem, 8vw, 5.4rem); font-weight: 600; line-height: 1;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text);
}
.stat .n.c { color: var(--crimson); }
.stat .n.s { color: var(--sage); }
.stat .n.g { color: var(--gold); }
.stat .l { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }

/* ---------- features ---------- */
.grid { display: grid; gap: 18px; margin-top: 42px; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-5px); border-color: var(--line2); }
.ic {
  width: 42px; height: 42px; border-radius: 11px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--crimson);
}
.ic.g { color: var(--gold); } .ic.s { color: var(--sage); } .ic.i { color: var(--indigo); }
.ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; margin: 0; color: var(--muted); }

/* ---------- microchart moment ---------- */
.charts { display: flex; gap: clamp(28px, 6vw, 72px); align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 42px; }
.chartfig { text-align: center; }
.chartfig svg { display: block; margin: 0 auto; }
.chartfig .cl { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.radar-poly { transform-origin: 90px 90px; transform: scale(.5); opacity: 0; transition: transform 1s cubic-bezier(.16,1,.3,1), opacity .8s; }
.reveal.in .radar-poly { transform: scale(1); opacity: 1; }
.ring-arc { stroke-dasharray: 320; stroke-dashoffset: 320; transition: stroke-dashoffset 1.2s cubic-bezier(.16,1,.3,1) .15s; }
.reveal.in .ring-arc { stroke-dashoffset: 20; }
.chartcopy { max-width: 380px; }
.chartcopy p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ---------- phone mockup (households) ---------- */
.hrow { display: flex; gap: 52px; align-items: center; flex-wrap: wrap; }
.hcol { flex: 1; min-width: 300px; }
.phone {
  width: 268px; background: var(--bg); border: 1px solid var(--line2);
  border-radius: 34px; padding: 18px 16px 22px; flex: 0 0 auto;
  box-shadow: 0 26px 70px var(--shadow);
}
.pst { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 11px; color: var(--muted); }
.pst .w { letter-spacing: 3px; }
.phd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.phd .nm { font-size: 18px; font-weight: 600; color: var(--text); }
.phd .sq { font-size: 11px; color: var(--muted); }
.pill { font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 20px; background: var(--gold); color: #2E2008; }
.pcard {
  background: var(--surface); border-left: 3px solid var(--crimson);
  border-radius: 0 13px 13px 0; padding: 11px 14px; margin-bottom: 13px;
}
.pcard .t { font-size: 13px; font-weight: 600; color: var(--text); }
.pcard .m { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ptiles { display: flex; gap: 8px; margin-bottom: 15px; }
.ptile { flex: 1; background: var(--surface); border-radius: 11px; padding: 11px 6px; text-align: center; }
.ptile .n { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ptile .l { font-size: 10px; color: var(--muted); margin-top: 2px; }
.pcta { background: var(--crimson); color: var(--on-crimson); text-align: center; font-size: 13px; font-weight: 600; padding: 12px; border-radius: 12px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 42px; }
.step { position: relative; padding-top: 8px; }
.step .no {
  font-size: 15px; font-weight: 600; color: var(--on-crimson); background: var(--crimson);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 42px; }
.tier {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px; text-align: center; transition: transform .2s;
}
.tier:hover { transform: translateY(-5px); }
.tier.feat { border: 1px solid var(--gold); }
.tier .bdg { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--crimson); margin-bottom: 10px; height: 13px; }
.tier .tn { font-size: 23px; font-weight: 600; color: var(--text); }
.tier .pr { margin-top: 8px; color: var(--muted); font-size: 13px; }
.tier .pr b { display: block; font-size: 32px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tier ul { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; font-size: 13.5px; color: var(--muted); }
.tier li { padding: 5px 0 5px 22px; position: relative; }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 10px; height: 6px;
  border-left: 2px solid var(--sage); border-bottom: 2px solid var(--sage); transform: rotate(-45deg);
}
.pnote { text-align: center; font-size: 13px; color: var(--dim); margin-top: 22px; }
.truststrip { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.truststrip .chip { font-size: 12px; color: var(--muted); background: var(--surface2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 13px; }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin-top: 36px; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary {
  cursor: pointer; font-weight: 600; color: var(--text); font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--crimson); font-size: 20px; font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); }

/* ---------- cta band ---------- */
.band { margin-top: 0; text-align: center; }
.band .inner { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(36px, 5vw, 64px); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 46px 0 60px; }
.frow { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.fbrand { font-size: 23px; font-weight: 600; color: var(--text); }
.flinks { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.flinks a:hover, .flinks a:focus-visible { color: var(--text); }
.fnote { font-size: 12px; color: var(--dim); margin-top: 26px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.chip { font-size: 12px; color: var(--muted); background: var(--surface2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 13px; }

/* ---------- legal / prose pages ---------- */
.prosewrap { max-width: 720px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 28px 80px; position: relative; z-index: 2; }
.prosewrap h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.effective { font-size: 13px; color: var(--dim); margin: 12px 0 0; }
.prose { margin-top: 36px; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.prose p, .prose li { font-size: 16.5px; line-height: 1.7; color: var(--read); }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 1rem; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--crimson); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--crimson-deep); }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0 0 1rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface2); color: var(--text); }
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--crimson);
  border-radius: 0 13px 13px 0; padding: 14px 18px; margin: 0 0 1rem; font-size: 15px;
}

/* ---------- 404 ---------- */
.notfound { min-height: 62vh; display: flex; align-items: center; text-align: center; border-top: none; }
.notfound .code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--crimson); font-variant-numeric: tabular-nums; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .tier:hover { transform: none; }
  body { transition: none; }
  .radar-poly { transform: scale(1); opacity: 1; transition: none; }
  .ring-arc { stroke-dashoffset: 20; transition: none; }
}

@media (max-width: 760px) { .navlinks { display: none; } }
@media (max-width: 420px) {
  .navin { gap: 8px; }
  .brand { font-size: 18px; }
  .navcta { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
  .tmode button { padding: 6px 7px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .navin { padding: 11px 18px; gap: 10px; }
  .navcta { padding: 8px 13px; font-size: 12.5px; }
  .faces { flex-direction: column; min-height: 0; }
  .face { padding: 44px 22px 56px; }
  .duality .joinline { margin-top: -26px; }
  .hrow { gap: 32px; }
  .hrow > .hcol { flex: 1 1 100%; min-width: 0; }
  .phone { width: 100%; max-width: 288px; margin-left: auto; margin-right: auto; }
}
