/* TOLVYN — page-specific styles
   Tokens live in tokens.css. Layout in layout.css.
   Components in components.css. Nav in nav.css. Footer in footer.css.
   This file holds typography defaults and page-section styles.
*/

/* ── Typography defaults ─────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { color: var(--text-secondary); }

.label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding-top: 160px;
  padding-bottom: 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, var(--accent-muted) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-muted);
  border: 1px solid rgba(0, 217, 163, 0.25);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero h1 {
  max-width: 880px;
  margin-inline: auto;
  margin-bottom: 24px;
}

.hero h1 span { color: var(--accent); }

.hero__sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 40px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero__trust {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 56px;
}

/* ── Page hero (inner pages) ─────────────────────────────────────── */
.page-hero {
  padding-top: 132px;
  padding-bottom: 56px;
}
.page-hero .label { margin-bottom: 12px; }
.page-hero h1 { margin-bottom: 16px; max-width: 820px; }
.page-hero p {
  font-size: 1.1rem;
  max-width: 680px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Live dot ────────────────────────────────────────────────────── */
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

/* ── Terminal mockup ─────────────────────────────────────────────── */
.terminal-wrap {
  max-width: 820px;
  margin-inline: auto;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 60px var(--accent-glow), 0 8px 40px rgba(0,0,0,0.6);
  position: relative;
}

.terminal-bar {
  background: #14171e;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
}

.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.terminal-dot--red    { background: #ff5f57; }
.terminal-dot--yellow { background: var(--yellow); }
.terminal-dot--green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: -38px;
}

.terminal-screen {
  background: #06080c;
  padding: 20px 24px 28px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

/* subtle scanline overlay */
.terminal-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 217, 163, 0.02) 2px,
    rgba(0, 217, 163, 0.02) 4px
  );
  pointer-events: none;
}

.terminal-lines {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
  position: relative;
  z-index: 1;
}

/* terminal line types — mint green system */
.tl-cmd     { color: var(--text); }
.tl-hdr     { color: var(--text-muted); }
.tl-time    { color: var(--text-muted); }
.tl-team    { color: var(--accent); }
.tl-model   { color: #60a5fa; }
.tl-cost    { color: #a78bfa; }
.tl-latency { color: var(--text-secondary); }
.tl-pipe    { color: var(--border-light); }
.tl-row     { color: var(--text-secondary); }
.tl-alert   { color: #f59e0b; font-weight: 600; }
.tl-budget  { color: #f59e0b; font-weight: 600; }
.tl-success { color: var(--accent); font-weight: 600; }
.tl-save    { color: var(--accent); font-weight: 600; }
.tl-ledger  { color: #a78bfa; font-weight: 500; }

.terminal-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (max-width: 768px) {
  .terminal-screen { padding: 14px 14px 18px; }
  .terminal-lines  { font-size: 0.62rem; }
}

/* ── Proof bar (hero) ────────────────────────────────────────────── */
.proof-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
}
.proof-bar__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border-light);
}

/* ── Diagram (How it Works) ──────────────────────────────────────── */
.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  overflow-x: auto;
}
.diagram svg { width: 100%; height: auto; min-width: 600px; }

/* ── Steps (How it Works inner) ──────────────────────────────────── */
.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.hiw-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
}
.hiw-step__num {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
}
.hiw-step__body h3 { font-size: 1.4rem; margin-bottom: 12px; }
.hiw-step__body p  { margin-bottom: 16px; color: var(--text-secondary); line-height: 1.7; }

/* ── Steps (homepage preview) ────────────────────────────────────── */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}
.step {
  flex: 1;
  text-align: center;
  padding: 24px 16px;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 36px;
  right: -1px;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.step:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 36px;
  left: -1px;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.step__num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  margin-inline: auto;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  position: relative;
  z-index: 1;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.875rem; color: var(--text-secondary); }

/* ── Pricing teaser / Final CTA ──────────────────────────────────── */
.pricing-teaser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pricing-teaser::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top center, var(--accent-muted) 0%, transparent 60%);
  pointer-events: none;
}
.pricing-teaser > * { position: relative; z-index: 1; }
.pricing-teaser h2 { margin-bottom: 16px; }
.pricing-teaser p  { margin-bottom: 32px; font-size: 1.05rem; color: var(--text-secondary); }

/* ── Pricing page ────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.plan:hover {
  border-color: var(--accent-muted);
  box-shadow: 0 4px 40px rgba(0,0,0,0.4);
  transform: translateY(-3px);
}
.plan--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 40px var(--accent-glow);
  position: relative;
}
.plan__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #001a13;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}
.plan__name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.plan__price { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.plan__amount { font-size: 2.4rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.plan__period { color: var(--text-secondary); font-size: 0.9rem; }
/* INR is the price; the USD figure is an approximation and is styled to read
   as one — subordinate to .plan__amount, never beside it in the same weight. */
.plan__approx { color: var(--text-muted); font-size: 0.82rem; margin-top: 2px; }
.plan__features { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan__feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.plan__feature svg {
  width: 16px; height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Discount banners ────────────────────────────────────────────── */
.discount-banner {
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 16px;
}
.discount-banner--founders {
  background: linear-gradient(135deg, var(--accent-muted) 0%, rgba(0, 217, 163, 0.04) 100%);
  border: 1px solid rgba(0, 217, 163, 0.35);
}
.discount-banner--early {
  background: var(--surface);
  border: 1px solid var(--border);
}
.discount-banner h3 { margin-bottom: 6px; font-size: 1.15rem; }
.discount-banner p  { font-size: 0.92rem; line-height: 1.6; color: var(--text-secondary); }

/* ── Pricing toggle (annual/monthly UI placeholder) ──────────────── */
.pricing-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  margin: 0 auto 32px;
}
.pricing-toggle button {
  background: transparent;
  border: none;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 100px;
  transition: all var(--transition);
}
.pricing-toggle button.active {
  background: var(--accent);
  color: #001a13;
}
.pricing-toggle .save-pill {
  font-size: 0.7rem;
  background: var(--accent-muted);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
}

/* ── Migration strip ─────────────────────────────────────────────── */
.migration {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.migration h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text);
}
.migration__list {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.migration__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.migration__item:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.migration__note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Sticky sidebar (product page) ───────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  border-right: 1px solid var(--border);
  padding-right: 24px;
}
.docs-sidebar__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.docs-sidebar ul { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.docs-sidebar a {
  display: block;
  padding: 6px 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all var(--transition);
}
.docs-sidebar a:hover {
  color: var(--text);
  background: var(--surface);
}
.docs-sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-muted);
}
.docs-main { min-width: 0; }
.docs-main section {
  padding-block: 48px;
  scroll-margin-top: 96px;
}
.docs-main section:first-child { padding-top: 0; }
.docs-main h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--text);
}
.docs-main h3 {
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text);
}
.docs-main p, .docs-main li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.docs-main ul, .docs-main ol {
  margin-left: 20px;
  margin-bottom: 16px;
}
.docs-main ul li { list-style: disc; }
.docs-main ol li { list-style: decimal; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 32px; }
  .docs-sidebar { position: relative; top: 0; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 20px; }
}

/* ── Problem cards (homepage) ────────────────────────────────────── */
.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition);
}
.problem-card:hover { border-color: var(--accent-muted); }
.problem-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.problem-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Differentiator tiles ────────────────────────────────────────── */
.diff-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
@media (min-width: 900px) {
  .diff-grid { grid-template-columns: repeat(3, 1fr); }
}
.diff-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}
.diff-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-muted);
}
.diff-tile h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
}
.diff-tile p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Legal content ───────────────────────────────────────────────── */
.legal-body {
  max-width: 820px;
  margin-inline: auto;
  padding-bottom: 96px;
}
.legal-body h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legal-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
}
.legal-body p { font-size: 0.95rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 14px; }
.legal-body ul, .legal-body ol { padding-left: 20px; margin-bottom: 14px; }
.legal-body li { font-size: 0.95rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 6px; }
.legal-body ul li { list-style: disc; }
.legal-body ol li { list-style: decimal; }
.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-body a:hover { color: var(--text); }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.88rem;
}
.legal-body th {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.legal-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.legal-body .toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 40px;
}
.legal-body .toc p { font-weight: 600; color: var(--text); margin-bottom: 12px; }
.legal-body .toc ol { margin-bottom: 0; }
.legal-body .toc li { margin-bottom: 4px; }
.legal-body .toc a { color: var(--text-secondary); text-decoration: none; }
.legal-body .toc a:hover { color: var(--accent); }

/* ── Docs redirect (docs.html) ───────────────────────────────────── */
.redirect-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.redirect-wrap p { margin-bottom: 24px; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .steps { flex-direction: column; gap: 0; }
  .step:not(:last-child)::after,
  .step:not(:first-child)::before { display: none; }
  .hiw-step { grid-template-columns: 1fr; }
  .hiw-step__num { margin-bottom: 8px; }
  .pricing-teaser { padding: 32px 24px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .legal-body table { font-size: 0.8rem; }
  .legal-body th, .legal-body td { padding: 8px 10px; }
}
