/* Page sections: hero, feature grids, how-it-works, pricing, feature pages. */

@layer pages {

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(64px, 8vw, 128px) clamp(48px, 6vw, 96px);
  text-align: center;
  overflow: hidden;
}
.hero .wrap { position: relative; }

/* Drifting chevron field, echoing the logo mark. Pure decoration. */
.chevron-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.chevron-field span {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 3px solid var(--chevron-ink);
  border-left: 0;
  border-top: 0;
  transform: rotate(45deg);
  border-radius: 12px;
  animation: chev-drift 26s var(--ease-out) infinite alternate;
}
.chevron-field span:nth-child(1) { left: -60px; top: 8%; animation-delay: -4s; }
.chevron-field span:nth-child(2) { left: 12%; bottom: -80px; width: 320px; height: 320px; animation-delay: -12s; }
.chevron-field span:nth-child(3) { right: 6%; top: -40px; width: 280px; height: 280px; animation-delay: -8s; }
.chevron-field span:nth-child(4) { right: -90px; bottom: 4%; animation-delay: -18s; }
@keyframes chev-drift {
  from { transform: rotate(45deg) translate(0, 0); }
  to { transform: rotate(45deg) translate(26px, -20px); }
}

.hero h1 { max-width: 24ch; margin-inline: auto; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(92deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lead { margin: var(--sp-5) auto var(--sp-8); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
  margin-bottom: var(--sp-6);
}
.hero-note { font-size: var(--fs-xs); color: var(--text-faint); }
.hero-note b { color: var(--text-muted); font-weight: 600; }

.hero-term {
  max-width: 720px;
  margin: var(--sp-8) auto 0;
}

/* Floating hero dashboard */
.hero-shot {
  max-width: 980px;
  margin: var(--sp-12) auto 0;
  perspective: 1400px;
}
.hero-shot .shot {
  transform: rotateX(4deg);
  transition: transform 0.9s var(--ease-out);
}
.hero-shot.in .shot, .hero-shot:hover .shot { transform: rotateX(0deg); }

/* ---------- Logos / proof strip ---------- */
.proof-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3) var(--sp-6);
  padding-block: var(--sp-6);
  color: var(--text-faint);
  font-size: var(--fs-sm);
}
.proof-strip span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.proof-strip svg { color: var(--accent-ink); }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 980px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-grid .card p { color: var(--text-muted); font-size: var(--fs-sm); }
.feature-grid .card .more {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.feature-grid .card .more::after { content: '\2192'; transition: transform var(--dur-fast) var(--ease-out); }
.feature-grid .card:hover .more::after { transform: translateX(3px); }

/* ---------- How it works ---------- */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  counter-reset: step;
}
@media (max-width: 860px) { .how-steps { grid-template-columns: 1fr; } }
.how-step { position: relative; padding: var(--sp-6); }
.how-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  display: block;
  margin-bottom: var(--sp-4);
  background: linear-gradient(180deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.how-step h3 { margin-bottom: var(--sp-2); }
.how-step p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- Split feature sections (text + mockup) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.flip .split-copy { order: 2; }
@media (max-width: 920px) {
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip .split-copy { order: 0; }
}
.split-copy .lead { font-size: var(--fs-md); }
.split-copy ul.ticks { list-style: none; margin: var(--sp-5) 0 0; padding: 0; display: grid; gap: var(--sp-4); }
/* Grid, not flex: the bold label sits on its own line with the description
   stacked below it, and the check icon spans both rows. (Flex rendered the
   label and text as ragged side-by-side columns.) */
.split-copy ul.ticks li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: var(--sp-3);
  align-items: start;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.split-copy ul.ticks li::before {
  content: '';
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background:
    center / 10px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.8 9 10 3.5' fill='none' stroke='%238C5A00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    var(--accent-soft);
}
[data-theme='dark'] .split-copy ul.ticks li::before {
  background:
    center / 10px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.8 9 10 3.5' fill='none' stroke='%23FFC44D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    var(--accent-soft);
}
.split-copy ul.ticks li b {
  display: block;
  grid-column: 2;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2px;
}

/* ---------- Comparison ---------- */
.cmp-scroll { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.cmp-table { width: 100%; min-width: 640px; border-collapse: collapse; background: var(--surface); font-size: var(--fs-sm); }
.cmp-table th, .cmp-table td { padding: var(--sp-4) var(--sp-5); text-align: left; border-bottom: 1px solid var(--border); }
.cmp-table thead th {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  background: var(--surface-2);
}
.cmp-table thead th.hl { color: var(--accent-ink); }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table td { color: var(--text-muted); }
.cmp-table td:first-child { color: var(--text); font-weight: 600; }
.cmp-table .yes { color: var(--success-ink); font-weight: 600; }
.cmp-table .no { color: var(--text-faint); }
.cmp-table .part { color: var(--accent-ink); }

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: var(--sp-6);
  align-items: stretch;
}
@media (max-width: 820px) { .price-grid { grid-template-columns: minmax(0, 440px); } }
.price-card { display: flex; flex-direction: column; text-align: left; }
.price-card .plan-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); }
.price-card .plan-price { font-family: var(--font-display); font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; margin: var(--sp-3) 0 0; }
.price-card .plan-price small { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.price-card .plan-sub { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.price-card ul { list-style: none; margin: 0 0 var(--sp-6); padding: 0; display: grid; gap: var(--sp-3); }
.price-card ul li { display: flex; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-muted); align-items: flex-start; }
.price-card ul li b { color: var(--text); font-weight: 600; }
.price-card .btn { margin-top: auto; justify-content: center; }
.price-card.featured {
  background:
    radial-gradient(480px 220px at 50% -60px, var(--accent-aura), transparent 72%),
    var(--surface);
}
.price-card .plan-flag {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  margin: 0;
}

/* ---------- Feature page hero ---------- */
.fp-hero {
  padding-block: clamp(56px, 6vw, 96px) clamp(32px, 4vw, 56px);
  text-align: center;
}
.fp-hero h1 { max-width: 22ch; margin-inline: auto; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); }
.fp-hero .lead { margin: var(--sp-5) auto 0; }
.fp-shot { max-width: 980px; margin: var(--sp-10, 40px) auto 0; }

.fp-blocks { display: grid; gap: clamp(48px, 6vw, 96px); }

/* Fact strip on feature pages */
.fact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  max-width: 900px;
  margin-inline: auto;
}
@media (max-width: 720px) { .fact-row { grid-template-columns: 1fr; } }
.fact {
  text-align: center;
  padding: var(--sp-5);
}
.fact b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--text);
}
.fact span { font-size: var(--fs-xs); color: var(--text-muted); }

/* Prev/next feature pager */
.fp-pager {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-6);
}
.fp-pager a { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--text-muted); }
.fp-pager a:hover { color: var(--accent-ink); text-decoration: none; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--sp-2); }
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  padding: 11px 14px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.field textarea { min-height: 150px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.form-msg { margin-top: var(--sp-4); font-size: var(--fs-sm); display: none; }
.form-msg.ok { display: block; color: var(--success-ink); }
.form-msg.err { display: block; color: var(--danger-ink); }

/* ---------- Legal ---------- */
.legal { max-width: 760px; margin-inline: auto; }
.legal h2 { font-size: var(--fs-xl); margin-top: var(--sp-8); }
.legal p, .legal li { color: var(--text-muted); font-size: var(--fs-sm); }
.legal .updated { color: var(--text-faint); font-size: var(--fs-xs); }

/* ---------- 404 ---------- */
.nf { text-align: center; padding-block: clamp(80px, 12vw, 160px); }
.nf .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

}
