/* NivoraFit — monochrome editorial, mirrors the app's design tokens. */
:root {
  --bg: #f1eee8;        /* screenBackground */
  --card: #faf8f4;      /* cardBackground */
  --ink: #131311;       /* ink */
  --subtle: #85827b;    /* subtleText */
  --hairline: #e3ded5;  /* hairline */
  --field: #f2eee6;     /* fieldBackground */
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

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

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

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark .fit { font-weight: 800; }
.wordmark > span { display: inline; }
.glyph {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--hairline);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(19, 19, 17, 0.07);
}
.pill {
  text-decoration: none;
  font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  background: var(--ink); color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 48px;
  align-items: center; padding: 56px 0 40px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.01em;
}
.hero p.sub {
  margin-top: 20px; font-size: 18px; color: var(--subtle); max-width: 460px;
}
.cta {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px; display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 16px 26px; font-size: 16px; font-weight: 600;
  border: none; cursor: default;
}
.cta .apple { font-size: 19px; line-height: 1; }
.cta-note { margin-top: 12px; font-size: 13px; color: var(--subtle); }

/* ---------- Sections ---------- */
section.feature {
  display: grid; grid-template-columns: 1fr auto; gap: 56px;
  align-items: center; padding: 64px 0;
  border-top: 1px solid var(--hairline);
}
section.feature.flip { grid-template-columns: auto 1fr; }
section.feature.flip .copy { order: 2; }
section.feature.flip .demo { order: 1; }

.kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--subtle); text-transform: uppercase;
}
section h2 {
  font-family: var(--serif); font-size: clamp(30px, 4vw, 40px);
  font-weight: 600; line-height: 1.15; margin-top: 10px;
}
section p.body {
  margin-top: 14px; font-size: 16px; color: var(--subtle); max-width: 420px;
}

/* ---------- Phone frame ---------- */
.phone {
  width: 300px; height: 620px; border-radius: 46px;
  background: var(--ink); padding: 10px; flex-shrink: 0;
  box-shadow: 0 30px 60px rgba(19, 19, 17, 0.18), 0 6px 18px rgba(19, 19, 17, 0.12);
  margin: 0 auto;
}
.screen {
  width: 100%; height: 100%; border-radius: 38px; background: var(--bg);
  overflow: hidden; position: relative; display: flex; flex-direction: column;
  padding: 18px 14px 14px;
}
.notch {
  width: 84px; height: 22px; border-radius: 999px; background: var(--ink);
  margin: 0 auto 14px; flex-shrink: 0;
}
.screen-title {
  font-family: var(--serif); font-size: 30px; font-weight: 700;
  padding: 2px 4px 10px;
}

/* app-style cards inside phones */
.feed { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.wcard {
  background: var(--card); border-radius: 20px; padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 20px rgba(19, 19, 17, 0.06);
  opacity: 0; transform: scale(0.95) translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.wcard.on { opacity: 1; transform: none; }
.wcard .head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.wcard .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--ink);
  color: #fff; font-family: var(--serif); font-size: 13px; font-weight: 600;
  display: grid; place-items: center; flex-shrink: 0;
}
.wcard .name { font-size: 14px; font-weight: 600; }
.tag {
  font-size: 8px; font-weight: 700; letter-spacing: 0.08em;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 7px;
}
.setrow {
  display: flex; align-items: center; gap: 10px;
  background: var(--field); border-radius: 11px; padding: 9px 11px;
  font-size: 13px; margin-top: 6px;
  opacity: 0; transform: scale(0.94);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.setrow.on { opacity: 1; transform: none; }
.setrow .lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--subtle);
  width: 38px; flex-shrink: 0;
}
.setrow .val { font-weight: 500; font-variant-numeric: tabular-nums; }
.setrow .check { margin-left: auto; font-size: 13px; }

/* input bar */
.inputbar {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--hairline); border-radius: 22px;
  padding: 10px 6px 10px 13px; margin-top: 12px;
  box-shadow: 0 10px 24px rgba(19, 19, 17, 0.08);
}
.inputbar .typed { font-size: 13px; white-space: nowrap; overflow: hidden; }
.inputbar .cursor {
  width: 2px; height: 16px; background: var(--subtle); flex-shrink: 0;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.inputbar .spacer { flex: 1; }
.roundbtn {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px;
  background: var(--field); color: var(--ink);
}
.roundbtn.send { background: var(--ink); color: #fff; font-weight: 700; }
.roundbtn.mic.rec {
  background: var(--ink); color: #fff;
  animation: micpulse 1.2s ease-in-out infinite;
}
@keyframes micpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(19, 19, 17, 0.35); }
  50% { box-shadow: 0 0 0 9px rgba(19, 19, 17, 0); }
}

/* history-demo chips */
.chips { display: flex; gap: 6px; padding: 2px 2px 10px; flex-shrink: 0; }
.chip {
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 6px 12px;
  background: var(--card); border: 1px solid var(--hairline);
  transition: background 0.25s, color 0.25s;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.daterow {
  background: var(--card); border-radius: 18px; padding: 12px;
  box-shadow: 0 8px 20px rgba(19, 19, 17, 0.06);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s;
}
.daterow.on { opacity: 1; transform: none; }
.daterow .d { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.daterow .s { font-size: 11px; color: var(--subtle); margin-top: 1px; }

/* stats-demo pieces */
.statcard {
  background: var(--card); border-radius: 18px; padding: 13px;
  box-shadow: 0 8px 20px rgba(19, 19, 17, 0.06); flex-shrink: 0;
}
.statcard h4 { font-family: var(--serif); font-size: 16px; font-weight: 600; margin-bottom: 9px; }
.bar { display: flex; align-items: center; gap: 9px; margin-top: 7px; font-size: 11px; }
.bar .bl { width: 52px; font-weight: 500; flex-shrink: 0; }
.bar .track { flex: 1; display: block; }
.bar .fill {
  display: block; height: 7px; border-radius: 999px; background: var(--ink);
  width: 6%; transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar .bv { width: 44px; text-align: right; color: var(--subtle); font-variant-numeric: tabular-nums; }
.bignum { font-family: var(--serif); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bignum small { font-family: var(--sans); font-size: 11px; color: var(--subtle); font-weight: 500; margin-left: 5px; }
.prdot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff;
  display: inline-grid; place-items: center; font-size: 9px; flex-shrink: 0; margin-right: 6px;
}
.chartbox { margin-top: 6px; }
.chartbox polyline {
  fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 400; stroke-dashoffset: 400;
}
.chartbox.draw polyline { transition: stroke-dashoffset 1.6s ease; stroke-dashoffset: 0; }
.chartbox circle { fill: var(--ink); opacity: 0; transition: opacity 0.4s ease; }
.chartbox.draw circle { opacity: 1; }

/* ---------- Pricing strip ---------- */
.pricing {
  border-top: 1px solid var(--hairline);
  text-align: center; padding: 72px 0;
}
.pricing h2 { font-family: var(--serif); font-size: clamp(28px, 4vw, 38px); font-weight: 600; }
.pricing p { margin-top: 12px; color: var(--subtle); font-size: 16px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--hairline);
  padding: 30px 0 44px; display: flex; align-items: center;
  justify-content: space-between; font-size: 13px; color: var(--subtle);
}
footer a { color: var(--subtle); text-decoration: none; margin-left: 18px; }
footer a:hover { color: var(--ink); }

/* ---------- Legal pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 24px 24px 80px; }
.legal h1 { font-family: var(--serif); font-size: 38px; font-weight: 700; margin: 28px 0 6px; }
.legal .date { color: var(--subtle); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 30px 0 8px; }
.legal p, .legal li { font-size: 15px; color: #3b3a36; margin-bottom: 10px; }
.legal ul { padding-left: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero, section.feature, section.feature.flip { grid-template-columns: 1fr; gap: 36px; }
  section.feature.flip .copy { order: 1; }
  section.feature.flip .demo { order: 2; }
  .hero { padding-top: 28px; text-align: center; }
  .hero p.sub { margin-left: auto; margin-right: auto; }
  section .copy { text-align: center; }
  section p.body { margin-left: auto; margin-right: auto; }
  .phone { width: 280px; height: 580px; }
}
