/* ==========================================================================
   Halvyn / Planvio site
   Single LIGHT theme. One accent (periwinkle violet). See BRAND.md for the palette.

   Radius rule (applied everywhere, no exceptions):
     chips / pills .......... 999px
     buttons, inputs ........ 8px
     panels, cards .......... 16px
     large media frames ..... 20px
   ========================================================================== */

:root {
  color-scheme: light;

  --paper:       #FBFAFC;
  --surface:     #FFFFFF;
  --surface-2:   #F4F1F7;
  --surface-3:   #ECE6F0;
  --line:        #E5DEEA;
  --line-soft:   #EFEAF2;
  --text:        #241A2B;
  --text-mid:    #4A3D54;
  --text-mute:   #6B5F76;
  --accent:      #5C4BB8;
  --accent-deep: #40317F;
  --accent-wash: #F1EEFB;
  --rose:        #C77E96;
  --on-accent:   #FFFFFF;
  --danger:      #A8262C;

  --shadow-sm: 0 1px 2px rgba(36, 26, 43, .05);
  --shadow:    0 6px 20px rgba(36, 26, 43, .07);
  --shadow-lg: 0 18px 46px rgba(36, 26, 43, .10);

  --r-pill: 999px;
  --r-btn:  8px;
  --r-card: 16px;
  --r-media: 20px;

  --shell: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.1; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(72px, 9vw, 124px); }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.h-display { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.h-section { font-size: clamp(1.85rem, 3.5vw, 2.65rem); }
.h-card    { font-size: 1.14rem; font-weight: 700; letter-spacing: -0.02em; }

.lede {
  color: var(--text-mute);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  max-width: 56ch;
}

.body-mute { color: var(--text-mute); max-width: 65ch; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 13px 22px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              transform .12s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-deep); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { background: var(--surface-2); border-color: #D8D0DF; }

.btn--block { width: 100%; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  display: flex;
  align-items: center;
  background: rgba(251, 250, 252, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.035em;
  color: var(--text);
}
.logo img { width: 28px; height: 28px; display: block; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-mute);
  transition: color .18s var(--ease);
}
.nav a:hover { color: var(--text); }

.header .btn { padding: 10px 18px; font-size: 14.5px; }

@media (max-width: 900px) {
  .nav { display: none; }
}

/* ---------- hero ---------- */

.hero { padding-top: clamp(52px, 6.5vw, 88px); padding-bottom: clamp(56px, 7vw, 92px); }

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 22px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* honest schematic, not a product screenshot */
.diagram {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-media);
  padding: 30px 28px;
  box-shadow: var(--shadow);
}
.diagram__title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 22px;
}

@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 100%; }
}

/* ---------- capability strip ---------- */

.proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 34px;
  padding-block: 30px;
}
.proof__label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.proof__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.proof__item svg { width: 19px; height: 19px; flex: none; color: var(--accent); }

/* ---------- bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 52px;
}
.tile {
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease),
              transform .2s var(--ease);
}
.tile:hover {
  border-color: #D8D0E6;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tile--wide  { grid-column: span 3; }
.tile--lead  {
  grid-column: span 6;
  background:
    radial-gradient(120% 160% at 10% 0%, var(--accent-wash), transparent 62%),
    var(--surface);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 34px;
  align-items: center;
  padding: 34px 32px;
}
.tile--accent {
  background: linear-gradient(155deg, var(--accent-wash), var(--surface) 70%);
  border-color: #D8D0E6;
}

.tile__icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-btn);
  background: var(--accent-wash);
  border: 1px solid #D8D0E6;
  color: var(--accent);
  margin-bottom: 6px;
}
.tile__icon svg { width: 20px; height: 20px; }
.tile p { color: var(--text-mute); font-size: 15px; line-height: 1.6; }

.tile__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px 16px 14px;
}
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 1.42rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}
.stat span { font-size: 13px; color: var(--text-mute); }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile--wide { grid-column: span 1; }
  .tile--lead { grid-column: span 2; grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .tile--lead { grid-column: span 1; }
}

/* ---------- flow ---------- */

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.step { padding: 30px 22px 8px; position: relative; }
.step + .step { border-left: 1px solid var(--line-soft); }
.step__dot {
  position: absolute;
  top: -6px; left: 22px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-wash);
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--text-mute); font-size: 14.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; border-top: 0; }
  .step { padding: 26px 0 0 26px; border-left: 1px solid var(--line); }
  .step__dot { top: 30px; left: -6px; }
}

/* ---------- audience ---------- */

.audience {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 52px;
}
.aud {
  border: 1px solid var(--line);
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.aud__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.aud__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aud__body { padding: 26px 26px 30px; }
.aud h3 { font-size: 1.28rem; margin-bottom: 10px; }
.aud p { color: var(--text-mute); font-size: 15px; }
.aud ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 9px; }
.aud li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14.5px; color: var(--text-mid);
}
.aud li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--accent); }

@media (max-width: 820px) { .audience { grid-template-columns: 1fr; } }

/* ---------- replaces ---------- */

.replaces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.repl {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
}
.repl h3 { font-size: 1rem; margin-bottom: 14px; color: var(--accent); }
.repl ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.repl li { font-size: 14.5px; color: var(--text-mute); }
.repl li strong { color: var(--text); font-weight: 600; }

@media (max-width: 820px) { .replaces { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  margin-top: 52px;
  align-items: start;
}
.plan {
  border: 1px solid var(--line);
  border-radius: var(--r-media);
  background: var(--surface);
  padding: 32px 30px 34px;
  box-shadow: var(--shadow-sm);
}
.plan--feature {
  border-color: #CFC5E8;
  background: radial-gradient(110% 130% at 92% 0%, var(--accent-wash), transparent 62%), var(--surface);
  box-shadow: var(--shadow);
}
.plan__chip {
  display: inline-block;
  border-radius: var(--r-pill);
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent-wash);
  border: 1px solid #D5CCEF;
  color: var(--accent-deep);
  margin-bottom: 18px;
}
.plan__chip--quiet {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text-mute);
}
.plan h3 { font-size: 1.48rem; margin-bottom: 12px; }
.plan__price {
  font-family: var(--mono);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  margin: 20px 0 4px;
  color: var(--text);
}
.plan__price small { font-family: var(--font); font-size: .82rem; color: var(--text-mute); font-weight: 500; }
.plan ul { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.8px; }
.plan li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--accent); }

@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */

.faq { margin-top: 44px; max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 40px 20px 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-mute);
  border-bottom: 2px solid var(--text-mute);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq p { color: var(--text-mute); font-size: 15.5px; padding-bottom: 22px; max-width: 68ch; }

/* ---------- product feature panel ---------- */

.feature {
  margin-top: 48px;
  border: 1px solid #CFC5E8;
  border-radius: var(--r-media);
  background: radial-gradient(85% 130% at 5% 0%, var(--accent-wash), transparent 60%), var(--surface);
  padding: clamp(30px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
  box-shadow: var(--shadow);
}
.feature__brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
}
.feature__brand img { width: 40px; height: 40px; display: block; }
.feature__tag {
  margin-top: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--accent);
}
.feature__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

@media (max-width: 880px) { .feature { grid-template-columns: 1fr; } }

/* ---------- sticky-lead split ---------- */

.split {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.split__lead { position: sticky; top: 108px; }

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split__lead { position: static; }
}

.approach {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.approach li {
  counter-increment: step;
  position: relative;
  padding: 26px 0 26px 58px;
  border-top: 1px solid var(--line);
}
.approach li:first-child { border-top: 0; padding-top: 6px; }
.approach li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 28px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
}
.approach li:first-child::before { top: 8px; }
.approach h3 { font-size: 1.16rem; margin-bottom: 9px; }
.approach p { color: var(--text-mute); font-size: 15.5px; max-width: 62ch; }

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  margin-top: 34px;
  align-items: start;
}
.facts {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-sm);
}
.facts h3 {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  margin-bottom: 18px;
}
.facts dl { margin: 0; display: grid; }
.facts dl > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}
.facts dl > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 14.5px; color: var(--text-mute); }
.facts dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--text); text-align: right; }

@media (max-width: 880px) { .about { grid-template-columns: 1fr; } }

/* ---------- demo / contact panel ---------- */

.demo {
  border: 1px solid var(--line);
  border-radius: var(--r-media);
  background: radial-gradient(85% 120% at 6% 0%, var(--accent-wash), transparent 58%), var(--surface);
  padding: clamp(32px, 4.5vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  box-shadow: var(--shadow);
}
.demo__points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.demo__points li { display: flex; gap: 11px; font-size: 15px; color: var(--text-mid); }
.demo__points svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--accent); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--text-mute); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #D8D2DE;
  border-radius: var(--r-btn);
  padding: 12px 14px;
  width: 100%;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #8B8095; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(92, 75, 184, .16);
}
.field textarea { resize: vertical; min-height: 88px; }
.field__error { font-size: 12.5px; color: var(--danger); display: none; }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--danger); }
.field.is-invalid .field__error { display: block; }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__note { font-size: 12.5px; color: var(--text-mute); }

.form__status { display: none; font-size: 14.5px; padding: 12px 14px; border-radius: var(--r-btn); }
.form__status.is-ok  { display: block; background: var(--accent-wash); border: 1px solid #D5CCEF; color: var(--accent-deep); }
.form__status.is-err { display: block; background: #FBEEEE; border: 1px solid #EBC9CB; color: var(--danger); }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding-block: 46px 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 36px;
}
.footer h4 {
  margin: 0 0 14px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; font-size: 14.5px; color: var(--text-mute); transition: color .18s var(--ease); }
.footer a:hover { color: var(--text); }
.footer__bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-mute);
}
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}
