/* Chainday — chainday.yvzlabs.com */
:root {
  --bg: #f4f4f6;
  --card: #ffffff;
  --ink: #15161a;
  --ink-soft: #24262c;
  --muted: #5b5f6b;
  --border: #dcdde2;
  --hairline: #e4e5e9;
  --flame: #ff7a1a;
  --flame-soft: #fff1e6;
  --dark: #0f1013;
  --dark-card: #1c1d22;
  --dark-card-2: #26272d;
  --on-dark: #a1a4ae;
  --blue: #3b82f6;
  --green: #22c55e;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --radius: 22px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--hairline); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand img { width: 46px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--card); }
.nav-links .btn { margin-left: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; border: 0;
  font: 600 15px/1 var(--text); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff !important; }
.btn-dark:hover { box-shadow: 0 10px 24px -10px rgba(21,22,26,.55); }
.btn-flame { background: var(--flame); color: var(--ink) !important; }
.btn-flame:hover { box-shadow: 0 10px 24px -10px rgba(255,122,26,.7); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--border); }
.btn-store { padding: 12px 22px 12px 18px; }
.btn-store svg { width: 22px; height: 22px; }
.btn-store span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.btn-store small { font-size: 11px; font-weight: 500; opacity: .75; }
.btn-store strong { font-size: 17px; font-family: var(--display); }
.nav-links .btn { padding: 10px 16px; }
.nav-links .btn:hover { background: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(255,122,26,.22), transparent 70%);
  pointer-events: none;
}
.hero-grid > * { min-width: 0; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--hairline);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.eyebrow .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--flame-soft); display: grid; place-items: center; }
.eyebrow .dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--flame); }
.hero h1 { font-size: clamp(44px, 6.4vw, 78px); margin: 22px 0 20px; }
.hero h1 em { font-style: normal; color: var(--flame); }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 34px; }
.hero-note { font-size: 14px; color: var(--muted); }
.hero-stats { display: flex; gap: 32px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--hairline); }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--display); font-size: 26px; }
.hero-stats span { font-size: 14px; color: var(--muted); }

/* ---------- Phone mockup ---------- */
.phone-stage { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: 320px; padding: 12px; border-radius: 52px;
  background: var(--ink);
  box-shadow: 0 50px 80px -30px rgba(21,22,26,.45), 0 0 0 1px rgba(255,255,255,.06) inset;
  transform: rotate(-3deg);
}
.screen { border-radius: 42px; background: var(--bg); padding: 46px 16px 20px; overflow: hidden; position: relative; }
.screen::before { content: ''; position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 96px; height: 28px; border-radius: 20px; background: var(--ink); }
.s-greet { font-size: 12px; color: var(--muted); font-weight: 500; }
.s-title { font-family: var(--display); font-weight: 700; font-size: 22px; margin-bottom: 14px; }
.s-streak { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 22px; background: var(--dark); color: #fff; margin-bottom: 14px; }
.s-streak .flame { width: 44px; height: 44px; border-radius: 14px; background: var(--flame); display: grid; place-items: center; }
.s-streak .flame svg { width: 24px; height: 24px; }
.s-streak strong { font-family: var(--display); font-size: 26px; line-height: 1; display: block; }
.s-streak span { font-size: 12px; color: var(--on-dark); }
.s-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-left: auto; }
.s-week i { width: 9px; height: 9px; border-radius: 3px; background: var(--flame); display: block; }
.s-week i.off { background: var(--dark-card-2); }
.s-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 4px 8px; }
.s-habit { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card); margin-bottom: 8px; }
.s-habit .ring { --p: 100; --c: var(--blue); width: 40px; height: 40px; border-radius: 50%; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--hairline) 0); display: grid; place-items: center; }
.s-habit .ring::after { content: ''; width: 30px; height: 30px; border-radius: 50%; background: var(--card); }
.s-habit .ring.done { background: var(--c); }
.s-habit .ring.done::after { width: 14px; height: 8px; border-radius: 0; background: none; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: translateY(-2px) rotate(-45deg); }
.s-habit b { font-size: 14px; font-weight: 600; display: block; }
.s-habit small { font-size: 12px; color: var(--muted); }
.s-habit .count { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--muted); }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 18px; background: var(--card);
  box-shadow: 0 20px 40px -18px rgba(21,22,26,.3); font-size: 13px; font-weight: 600;
  animation: float 6s ease-in-out infinite;
}
.float-card .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; }
.float-card small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.float-a { top: -6px; left: 0; }
.float-b { bottom: 70px; right: -6px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--flame); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); }
.section-head p { margin-top: 16px; font-size: 18px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--hairline); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(21,22,26,.35); }
.feature .ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 20px; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 21px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature.span2 { grid-column: span 2; }
.feature.wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.heatmap { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.heatmap i { aspect-ratio: 1; border-radius: 4px; background: var(--hairline); display: block; }
.heatmap i.l1 { background: #ffd2b0; } .heatmap i.l2 { background: #ffa868; } .heatmap i.l3 { background: var(--flame); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius); border: 1px dashed var(--border); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--flame); display: block; margin-bottom: 18px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* Pro */
.pro { background: var(--dark); color: #fff; border-radius: 36px; padding: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; position: relative; overflow: hidden; }
.pro::after { content: ''; position: absolute; right: -120px; bottom: -160px; width: 460px; height: 460px; background: radial-gradient(closest-side, rgba(255,122,26,.35), transparent); }
.pro h2 { font-size: clamp(32px, 4vw, 46px); }
.pro p { color: var(--on-dark); margin-top: 14px; font-size: 17px; }
.pro .price { margin-top: 28px; display: flex; align-items: baseline; gap: 8px; }
.pro .price strong { font-family: var(--display); font-size: 48px; }
.pro .price span { color: var(--on-dark); }
.plans { display: grid; gap: 12px; position: relative; z-index: 1; }
.plan { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: var(--dark-card); }
.plan .ico { width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--dark-card-2); display: grid; place-items: center; color: var(--flame); }
.plan .ico svg { width: 22px; height: 22px; }
.plan b { display: block; font-weight: 600; }
.plan small { color: var(--on-dark); font-size: 14px; }
.compare { margin-top: 28px; display: grid; grid-template-columns: 1fr auto auto; gap: 10px 24px; font-size: 14px; color: var(--on-dark); }
.compare b { color: #fff; font-weight: 600; }
.compare .h { font-weight: 700; color: #fff; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.compare .y { color: var(--flame); font-weight: 700; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 10px; }
details { background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; padding: 0 22px; transition: box-shadow .2s; }
details[open] { box-shadow: 0 18px 36px -28px rgba(21,22,26,.35); }
summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-family: var(--display); font-size: 24px; font-weight: 500; color: var(--muted); transition: transform .2s; flex: none; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding-bottom: 20px; color: var(--muted); }
details > div p + p { margin-top: 10px; }
details a { color: var(--ink); font-weight: 600; }

/* CTA band */
.cta-band { text-align: center; padding: 96px 0 112px; }
.cta-band img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 26px; box-shadow: 0 20px 40px -20px rgba(21,22,26,.5); }
.cta-band h2 { font-size: clamp(34px, 5vw, 56px); }
.cta-band p { color: var(--muted); font-size: 18px; margin: 16px auto 32px; max-width: 520px; }

/* ---------- Doc pages (privacy / terms) ---------- */
.page-hero { padding: 64px 0 40px; }
.page-hero h1 { font-size: clamp(40px, 5.5vw, 64px); margin-top: 16px; }
.page-hero p { color: var(--muted); font-size: 18px; margin-top: 16px; max-width: 640px; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--hairline); color: var(--ink-soft); }

.doc-grid { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; padding-bottom: 96px; }
.toc { position: sticky; top: 96px; display: grid; gap: 2px; font-size: 14px; }
.toc strong { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-left: 2px solid var(--hairline); transition: color .15s, border-color .15s; }
.toc a:hover, .toc a.active { color: var(--ink); border-left-color: var(--flame); }

.doc { background: var(--card); border: 1px solid var(--hairline); border-radius: 28px; padding: 48px 56px; }
.doc section { padding: 0; scroll-margin-top: 96px; }
.doc section + section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--hairline); }
.doc h2 { font-size: 26px; margin-bottom: 14px; }
.doc h3 { font-size: 18px; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin: 12px 0 0; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--ink); font-weight: 600; text-decoration-color: var(--flame); text-underline-offset: 3px; }
.tldr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.tldr div { padding: 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--hairline); }
.tldr b { display: block; font-family: var(--display); font-size: 17px; margin: 10px 0 4px; }
.tldr p { font-size: 14px; color: var(--muted); }
.tldr .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.tldr .ico svg { width: 20px; height: 20px; }

table.data { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
table.data td:first-child { font-weight: 600; white-space: nowrap; }

/* ---------- Support ---------- */
.support-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 72px; }
.support-card { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: transform .2s, box-shadow .2s; }
a.support-card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(21,22,26,.35); }
.support-card .ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 8px; }
.support-card .ico svg { width: 24px; height: 24px; }
.support-card h3 { font-size: 20px; }
.support-card p { color: var(--muted); font-size: 15px; }
.support-card .go { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: 15px; color: var(--ink); }
.support-card.dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.support-card.dark p { color: var(--on-dark); }
.support-card.dark .go { color: var(--flame); }
.faq-group { margin-bottom: 48px; }
.faq-group h2 { font-size: 24px; max-width: 760px; margin: 0 auto 16px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px; }
.foot .brand { color: var(--ink); margin-bottom: 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.foot nav a:hover { color: var(--ink); }
.foot-bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Icon tints */
.t-flame { background: var(--flame-soft); color: var(--flame); }
.t-blue { background: #dbeafe; color: #1d4ed8; }
.t-green { background: #dcfce7; color: #15803d; }
.t-purple { background: #ede9fe; color: #6d28d9; }
.t-pink { background: #fce7f3; color: #be185d; }
.t-teal { background: #ccfbf1; color: #0f766e; }
.t-amber { background: #fef3c7; color: #b45309; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-card { animation: none; }
  .btn:hover, .feature:hover, a.support-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .pro { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .phone-stage { margin-top: 16px; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature.wide { grid-column: span 2; }
  .steps, .support-cards, .tldr { grid-template-columns: 1fr; }
  .pro { padding: 44px 28px; }
  .doc-grid { grid-template-columns: 1fr; gap: 24px; }
  .toc { display: none; }
}
@media (max-width: 640px) {
  section { padding: 72px 0; }
  .nav-links a:not(.btn) { display: none; }
  .features { grid-template-columns: 1fr; }
  .feature.wide, .feature.span2 { grid-column: auto; grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .phone { width: 280px; }
  .float-a { left: -4px; }
  .float-b { right: -2px; }
  .doc { padding: 28px 22px; border-radius: 22px; }
  table.data td:first-child { white-space: normal; }
}
