/*
 * Temper — public site.
 *
 * Shares the app's tokens (paper, ink, serif display) but pushes contrast and
 * scale much further: a landing page has one job, and restraint that reads as
 * tasteful inside a product reads as timid on a home page.
 */

:root {
  --paper: #F1F0EB;
  --ink: #001371;
  --ink-90: rgba(0, 19, 113, 0.9);
  --ink-55: rgba(0, 19, 113, 0.55);
  --ink-35: rgba(0, 19, 113, 0.35);
  --black: #101010;
  --green: #2FA96B;
  --pink: #E85BA0;
  --sand: #E5CE93;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink-90);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

/* ---------- Chrome ---------- */

.ribbon {
  background: var(--black);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
  padding: 11px 16px;
}

.ribbon a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 32px;
  background: rgba(241, 240, 235, 0.88);
  backdrop-filter: blur(18px);
}

.nav-logo { font-family: var(--display); font-size: 24px; color: var(--ink); }

.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; color: var(--ink-55); }
.nav-links a:hover { color: var(--ink-90); }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-login { font-size: 15px; color: var(--ink-55); }
.nav-login:hover { color: var(--ink-90); }

.btn {
  display: inline-block;
  font-size: 15px;
  border-radius: 100px;
  padding: 12px 26px;
  transition: opacity 0.15s, transform 0.12s;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-dark { background: var(--black); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-lg { font-size: 17px; padding: 17px 38px; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 90px;
}

/* Constrains the hero copy so long lines don't stretch to the grid column. */
.hero-inner { max-width: 620px; }

.price-left { display: flex; flex-direction: column; align-items: flex-start; }

.badge {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-55);
  border: 1px solid rgba(0, 19, 113, 0.16);
  border-radius: 100px;
  padding: 7px 15px;
  margin-bottom: 26px;
}

/* Fluid down to phones without a pile of breakpoints. */
.hero-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.03;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 19px;
  color: var(--ink-55);
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-fine { font-size: 14px; color: var(--ink-35); margin-top: 16px; }

/* A concrete example instead of a stock photo: the product's whole argument is
   a specific connection, and a smiling model can't show one. */
.hero-art { position: relative; min-height: 380px; }

.art-card {
  position: absolute;
  background: #fff;
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: 0 16px 44px rgba(0, 19, 113, 0.09);
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 210px;
}

.art-a { top: 10px; left: 0; }
.art-b { top: 120px; right: 10px; }

.art-label { font-size: 14px; color: var(--ink-35); }
.art-value { font-family: var(--display); font-size: 30px; color: var(--ink); }
.art-value i { font-size: 14px; font-style: normal; color: var(--ink-35); }
.art-status { font-size: 13px; }
.art-status.low { color: var(--pink); }
.art-status.warn { color: #C79A2E; }

.art-link {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--black);
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.45;
  border-radius: 20px;
  padding: 20px 22px;
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(0, 19, 113, 0.08);
  border-bottom: 1px solid rgba(0, 19, 113, 0.08);
  padding: 20px 0;
}

.marquee-track {
  display: flex;
  gap: 22px;
  align-items: center;
  white-space: nowrap;
  font-size: 17px;
  color: var(--ink-55);
  animation: slide 34s linear infinite;
}

.marquee-track i { color: var(--ink-35); font-style: normal; }

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Honour the OS setting — motion for its own sake shouldn't be forced. */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Sections ---------- */

.section { max-width: 1120px; margin: 0 auto; padding: 96px 32px; }

.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 18px;
}

.section-lede { font-size: 18px; color: var(--ink-55); max-width: 560px; margin-bottom: 40px; }
.section-foot { font-size: 16px; color: var(--ink-35); margin-top: 28px; }

.section.dark {
  max-width: none;
  background: var(--black);
  color: #fff;
  padding-left: max(32px, calc(50vw - 528px));
  padding-right: max(32px, calc(50vw - 528px));
}

.section.dark .section-title { color: #fff; }
.section.dark .section-lede { color: rgba(255, 255, 255, 0.55); }
.section.dark .section-foot { color: rgba(255, 255, 255, 0.4); }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }

.step { background: #fff; border-radius: 26px; padding: 30px 28px 34px; }

.step-num {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  color: var(--ink-35);
  margin-bottom: 40px;
}

.step h3 { font-size: 21px; font-weight: 500; color: var(--ink); margin-bottom: 10px; }
.step p { font-size: 16px; color: var(--ink-55); }

/* ---------- Categories ---------- */

.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.cat {
  background: #1A1A1A;
  border-radius: 22px;
  padding: 24px 26px 26px;
  position: relative;
}

.cat h3 { font-size: 18px; font-weight: 500; color: #fff; margin-bottom: 6px; padding-right: 40px; }

.cat span {
  position: absolute;
  top: 24px;
  right: 26px;
  font-family: var(--display);
  font-size: 22px;
  color: var(--green);
}

.cat p { font-size: 14px; color: rgba(255, 255, 255, 0.42); line-height: 1.5; }

/* ---------- Compare ---------- */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; }

.compare-col { background: #fff; border-radius: 26px; padding: 30px 30px 34px; }

.compare-col.accent { background: var(--ink); color: #fff; }

.compare-head { font-size: 18px; margin-bottom: 20px; }
.compare-head.muted { color: var(--ink-35); }

.compare-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.compare-col li {
  font-size: 16px;
  color: var(--ink-55);
  padding-left: 26px;
  position: relative;
}

.compare-col li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-35);
}

.compare-col.accent li { color: rgba(255, 255, 255, 0.88); }
.compare-col.accent li::before { content: "✓"; color: #6BE39B; }

/* ---------- Quote ---------- */

.quote-section { text-align: center; }

.big-quote {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.32;
  color: var(--ink);
  max-width: 900px;
  margin: 0 auto;
}

.big-quote em { font-style: italic; color: var(--pink); }

.quote-note {
  font-size: 16px;
  color: var(--ink-35);
  max-width: 560px;
  margin: 26px auto 0;
}

/* ---------- Price ---------- */

.price-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--ink);
  color: #fff;
  border-radius: 32px;
  padding: 44px 46px;
  margin-top: 40px;
}

.price-name { font-size: 17px; opacity: 0.7; margin-bottom: 12px; }

.price-value { font-family: var(--display); font-size: 60px; line-height: 1; }
.price-value span { font-size: 18px; font-family: var(--font); opacity: 0.7; }

.price-note { font-size: 15px; opacity: 0.7; margin: 14px 0 26px; }

.price-list { list-style: none; display: flex; flex-direction: column; gap: 13px; }

.price-list li {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  padding-left: 26px;
  position: relative;
}

.price-list li::before { content: "✓"; position: absolute; left: 0; color: #6BE39B; }

/* ---------- FAQ ---------- */

.faq { margin-top: 36px; border-top: 1px solid rgba(0, 19, 113, 0.1); }

.faq details { border-bottom: 1px solid rgba(0, 19, 113, 0.1); }

.faq summary {
  font-size: 19px;
  color: var(--ink);
  padding: 24px 40px 24px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 22px;
  font-size: 24px;
  color: var(--ink-35);
  transition: transform 0.2s;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq p { font-size: 17px; color: var(--ink-55); padding: 0 60px 26px 0; max-width: 760px; }

/* ---------- Closer ---------- */

.closer {
  text-align: center;
  padding: 110px 32px 120px;
}

.closer h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 34px;
}

/* ---------- Footer ---------- */

.footer { background: var(--black); color: rgba(255, 255, 255, 0.75); padding: 64px 32px 34px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  max-width: 1120px;
  margin: 0 auto 54px;
}

.footer-logo { font-family: var(--display); font-size: 26px; color: #fff; margin-bottom: 12px; }
.footer-note { font-size: 15px; color: rgba(255, 255, 255, 0.45); max-width: 300px; }

.footer h4 { font-size: 14px; color: #fff; font-weight: 500; margin-bottom: 16px; }
.footer-grid a { display: block; font-size: 15px; color: rgba(255, 255, 255, 0.5); margin-bottom: 11px; }
.footer-grid a:hover { color: #fff; }

.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 30px;
  align-items: flex-end;
}

.footer-bottom p { font-size: 13px; color: rgba(255, 255, 255, 0.35); max-width: 700px; line-height: 1.55; }
.footer-bottom span { margin-left: auto; font-size: 13px; color: rgba(255, 255, 255, 0.35); white-space: nowrap; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { min-height: 300px; margin-top: 20px; }
  .steps, .cats, .compare, .footer-grid { grid-template-columns: 1fr; }
  .price-card { grid-template-columns: 1fr; padding: 32px; }
  .section { padding: 64px 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-bottom span { margin-left: 0; }
}

/* ============================================================
 * Motion
 * ============================================================ */

/* The reveal itself. Elements ship visible in the markup and are offset by this
   class only after the script confirms it can animate — so a failed script or a
   reduced-motion preference leaves a perfectly readable page. */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-in { opacity: 1; transform: none; }

.nav { transition: box-shadow 0.25s, background 0.25s; }
.nav.is-stuck { box-shadow: 0 1px 0 rgba(0, 19, 113, 0.08); }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 84px 32px 20px;
}

.stat { text-align: left; }

.stat-num {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1;
  color: var(--ink);
  margin-bottom: 14px;
}

.stat-num i { font-size: 0.42em; font-style: normal; color: var(--ink-35); margin-left: 2px; }

.stat-label { font-size: 16px; color: var(--ink-55); line-height: 1.45; }

/* ---------- Trend section ---------- */

/* Slightly tighter than a normal section: the chart already carries the
   visual weight, so extra air around it just pushes it off the fold. */
.trend-section { padding-top: 72px; padding-bottom: 88px; }

.trend-copy { max-width: 460px; }

.trend-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.trend-legend { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }

.trend-legend li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  color: var(--ink-55);
}

.trend-legend .dot { width: 11px; height: 11px; border-radius: 50%; }
.trend-legend .pink { background: var(--pink); }
.trend-legend .green { background: var(--green); }
.trend-legend .band { background: rgba(47, 169, 107, 0.25); border-radius: 3px; }

.trend-chart {
  background: #fff;
  border-radius: 28px;
  padding: 18px 14px 6px;
  box-shadow: 0 18px 50px rgba(0, 19, 113, 0.07);
}

.tchart { width: 100%; height: auto; display: block; }

/* The line draws itself; the dots pop in behind it, each a beat later, so the
   eye follows the same left-to-right path a reader would take anyway. */
#tline { transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.trend-chart.is-drawn #tline { stroke-dashoffset: 0 !important; }

.tdot { transition: opacity 0.35s ease; }
.trend-chart.is-drawn .tdot {
  opacity: 1 !important;
  transition-delay: calc(0.35s + var(--i) * 0.24s);
}

.trend-caption {
  font-size: 15px;
  color: var(--ink-35);
  margin-top: 26px;
}

@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr; gap: 34px; padding-top: 56px; }
  .trend-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  #tline, .tdot { transition: none; }
}
