/* ============================================================
   Loyza — main stylesheet. Tokens live in tokens.css.
   ============================================================ */
@import url("tokens.css");

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 700;
}

::selection { background: var(--accent); color: var(--white); }

/* Subtle paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.10 0 0 0 0 0.07 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding: var(--section-pad) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--dark-bg); color: var(--dark-ink); }

/* ---------- Shared type patterns ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-tag);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.section--dark .kicker { color: var(--dark-accent); }

.h2 { font-size: var(--text-h2); margin-bottom: var(--space-3); }
.lead { font-size: var(--text-lead); color: var(--muted); max-width: 620px; }
.section--dark .lead { color: var(--dark-muted); }

.serif-accent { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.accent-word { color: var(--accent); }
.section--dark .accent-word { color: var(--dark-accent); }

.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head--center { text-align: center; }
.sec-head--center .lead { margin-left: auto; margin-right: auto; }
.sec-head--center .kicker { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; transition: transform 0.18s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn--ghost {
  border-color: var(--border);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.section--dark .btn--ghost { border-color: var(--dark-border); color: var(--dark-ink); }
.section--dark .btn--ghost:hover { border-color: var(--dark-muted); }

.btn--lg { padding: 1.05rem 2.1rem; font-size: 1.0625rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--oat) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border-soft); }

.nav__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.wordmark .dot { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  list-style: none;
}
.nav__links a:not(.btn) {
  font-weight: 500;
  font-size: var(--text-small);
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav__links a:not(.btn):hover,
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a[aria-current="page"] { font-weight: 600; }
.nav__links .btn { padding: 0.6rem 1.3rem; font-size: var(--text-small); }

.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--oat);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
    padding: var(--space-3) clamp(1.25rem, 4vw, 2.5rem) var(--space-4);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { padding: 0.65rem 0; }
  .nav__links .btn { margin-top: 0.75rem; justify-content: center; }
}

/* Page offset for fixed nav */
main { padding-top: var(--nav-h); }

/* ---------- Load-in / scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
  .reveal[data-delay="1"] { transition-delay: 0.1s; }
  .reveal[data-delay="2"] { transition-delay: 0.2s; }
  .reveal[data-delay="3"] { transition-delay: 0.3s; }
  .reveal[data-delay="4"] { transition-delay: 0.4s; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%; right: -18%;
  width: 62vw; height: 62vw;
  max-width: 900px; max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(217, 123, 63, 0.16), rgba(217, 123, 63, 0.05) 45%, transparent 70%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  position: relative;
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  margin-bottom: var(--space-4);
}
.hero h1 .serif-accent { font-size: 0.97em; }
.hero .lead { margin-bottom: var(--space-5); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-5); }

.hero__proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: var(--text-fine);
  color: var(--muted);
}
.hero__proof .store-badges { display: flex; gap: 0.6rem; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: var(--text-fine);
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.store-badge svg { width: 16px; height: 16px; }

/* ---------- Phone mockup (CSS-drawn, white-label demo) ---------- */
.hero__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero__caption {
  font-size: var(--text-fine);
  color: var(--muted);
  text-align: center;
  max-width: 300px;
}
.hero__see {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.2rem;
  font-size: var(--text-fine);
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: -0.3rem;
}
.hero__see:hover { border-color: var(--accent); transform: translateY(2px); box-shadow: var(--shadow-md); }
.hero__see svg { width: 15px; height: 15px; color: var(--accent); }

.phone {
  width: min(320px, 78vw);
  border-radius: 44px;
  background: var(--espresso);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: rotate(2.5deg);
}
@media (prefers-reduced-motion: no-preference) {
  .phone { animation: phoneFloat 7s ease-in-out infinite; }
  @keyframes phoneFloat {
    0%, 100% { transform: rotate(2.5deg) translateY(0); }
    50% { transform: rotate(2.5deg) translateY(-10px); }
  }
}
.phone__screen {
  background: linear-gradient(175deg, #fdfaf5, #f6efe4);
  border-radius: 34px;
  overflow: hidden;
  padding: 0.85rem 1.1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.phone__notch {
  width: 92px; height: 21px;
  background: var(--espresso);
  border-radius: var(--radius-pill);
  margin: 0 auto 0.5rem;
  flex-shrink: 0;
}
.phone__cafe {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.phone__cafe span { color: var(--accent); }

.phone__card {
  background: var(--espresso);
  color: var(--cream-on-dark);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow-md);
}
.phone__card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
}
.phone__points {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--white);
}
.phone__points small { font-size: 0.85rem; font-weight: 600; color: var(--dark-muted); }
.phone__qr {
  align-self: center;
  background: var(--white);
  border-radius: 10px;
  padding: 8px;
}
.phone__qr svg { width: 108px; height: 108px; display: block; }

/* Stamp row — the signature moment */
.stamps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}
.stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  background: var(--oat);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.stamp svg { width: 56%; height: 56%; opacity: 0; }
.stamp.is-filled { border-color: var(--accent); background: var(--accent); }
.stamp.is-filled svg { opacity: 1; color: var(--white); }
.stamp--free { border-color: var(--clay); background: var(--white); }
.stamp--free svg { opacity: 1; color: var(--taupe); }

@media (prefers-reduced-motion: no-preference) {
  .stamps.is-visible .stamp.is-filled { animation: stampIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
  .stamps.is-visible .stamp.is-filled:nth-child(1) { animation-delay: 0.3s; }
  .stamps.is-visible .stamp.is-filled:nth-child(2) { animation-delay: 0.5s; }
  .stamps.is-visible .stamp.is-filled:nth-child(3) { animation-delay: 0.7s; }
  .stamps.is-visible .stamp.is-filled:nth-child(4) { animation-delay: 0.9s; }
  .stamps.is-visible .stamp.is-filled:nth-child(5) { animation-delay: 1.1s; }
  .stamps.is-visible .stamp.is-filled:nth-child(6) { animation-delay: 1.3s; }
  .stamps.is-visible .stamp.is-filled:nth-child(7) { animation-delay: 1.5s; }
  .stamps.is-visible .stamp.is-filled:nth-child(8) { animation-delay: 1.7s; }
  .stamps.is-visible .stamp.is-filled:nth-child(9) { animation-delay: 1.9s; }
  .stamps.is-visible .stamp.is-filled:nth-child(10) { animation-delay: 2.25s; }
  @keyframes stampIn {
    0% { opacity: 0; transform: scale(1.8) rotate(-14deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
  }
  .stamps.is-visible .stamp--free.is-filled { animation-name: stampInFree; }
  @keyframes stampInFree {
    0% { opacity: 0; transform: scale(2.2) rotate(-18deg); }
    60% { transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
  }
}

.stamps__label {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stamps__label strong { color: var(--accent); }

/* Floating toast beside phone */
.hero__toast {
  position: absolute;
  top: 33%;
  left: -36px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.8rem 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--text-fine);
  font-weight: 600;
  transform: rotate(-3deg);
}
.hero__toast .tick {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--matcha);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero__toast .tick svg { width: 15px; height: 15px; }
.hero__toast small { display: block; font-weight: 500; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .hero__toast { animation: toastIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s backwards; }
  @keyframes toastIn {
    0% { opacity: 0; transform: rotate(-3deg) translateY(24px) scale(0.9); }
    100% { opacity: 1; transform: rotate(-3deg) translateY(0) scale(1); }
  }
}

@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { margin-top: var(--space-3); }
  .hero__toast { left: max(0px, calc(50% - 240px)); }
}

/* ---------- Ticket / problem cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 940px) { .card-grid, .card-grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { font-size: var(--text-h4); margin: var(--space-3) 0 var(--space-2); }
.card p { font-size: var(--text-small); color: var(--muted); }

.card__icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__icon svg { width: 22px; height: 22px; }
.card__fix {
  margin-top: var(--space-3);
  padding: 0.8rem 1rem;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--accent-ink) !important;
  font-weight: 500;
}

/* ---------- How it works (numbered steps) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  counter-reset: step;
}
@media (max-width: 940px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  background: var(--surface-warm);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid var(--border);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.9;
  display: block;
  margin-bottom: var(--space-3);
}
.step h3 { font-size: var(--text-h4); margin-bottom: var(--space-2); }
.step p { font-size: var(--text-small); color: var(--muted); }

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 940px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* ---------- Ownership band (dark) ---------- */
.own-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}
@media (max-width: 860px) { .own-grid { grid-template-columns: 1fr; } }
.own-item {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.own-item h3 { font-size: var(--text-h4); margin-bottom: var(--space-2); color: var(--white); }
.own-item h3 .accent-word { color: var(--dark-accent); }
.own-item p { font-size: var(--text-small); color: var(--dark-muted); }

/* ---------- Proof strip ---------- */
.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }
.proof__shot {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-warm);
  max-width: 400px;
  justify-self: center;
}
.proof__shot img { width: 100%; }

/* ---------- Interactive app viewer ---------- */
.appview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  justify-self: center;
}
.appview__phone {
  position: relative;
  width: min(300px, 76vw);
  border-radius: 44px;
  background: var(--espresso);
  padding: 11px;
  box-shadow: var(--shadow-lg);
}
.appview__screen {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 279 / 639;
  background: var(--espresso);
  cursor: grab;
  touch-action: pan-y;
}
.appview__screen:active { cursor: grabbing; }
.appview__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.appview__slide.is-current { opacity: 1; }

/* Invisible click zones over the screenshot's own tab bar, so the
   Home/Scan/Rewards/Menu icons work like the real app. */
.appview__tabs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10.5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 2;
}
.appview__tab {
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.appview__tab:hover { background: rgba(196, 86, 42, 0.12); }
.appview__tabs--3 { grid-template-columns: repeat(3, 1fr); }
/* Real phone screenshots (828x1792) rather than the captured web model */
.appview__screen--photo { aspect-ratio: 828 / 1792; }

.appview__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.appview__arrow svg { width: 18px; height: 18px; }
.appview__arrow--prev { left: -21px; }
.appview__arrow--next { right: -21px; }
.appview__arrow:hover { background: var(--accent); color: var(--white); border-color: var(--accent); transform: translateY(-50%) scale(1.06); }

.appview__dots { display: flex; gap: 0.5rem; }
.appview__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--clay);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.appview__dot.is-active { background: var(--accent); transform: scale(1.25); }

.appview__caption {
  font-size: var(--text-fine);
  color: var(--muted);
  text-align: center;
  max-width: 320px;
  min-height: 2.6em;
}
.appview__caption strong { color: var(--ink); }
.appview__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--accent-ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.15s ease;
}
.appview__link:hover { color: var(--accent); }
.appview__link svg { width: 15px; height: 15px; }
.appview__hint {
  font-size: var(--text-tag);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  margin-top: -0.4rem;
}

/* ---------- Website browser slideshow ---------- */
.webview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  max-width: 920px;
  margin: 0 auto;
}
.webview__frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: visible;
  box-shadow: var(--shadow-lg);
}
.webview__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--espresso);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 0.7rem 1rem;
}
.webview__bar span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--roast);
}
.webview__bar span:nth-child(1) { background: #d97b6a; }
.webview__bar span:nth-child(2) { background: var(--honey); }
.webview__bar span:nth-child(3) { background: var(--matcha); }
.webview__url {
  margin: 0 auto;
  background: var(--espresso-2);
  color: var(--dark-muted);
  font-size: var(--text-fine);
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 0.25rem 1.4rem;
}
.webview__screen {
  position: relative;
  aspect-ratio: 2160 / 1350;
  overflow: hidden;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--espresso);
  cursor: grab;
  touch-action: pan-y;
}
.webview__screen:active { cursor: grabbing; }
.webview__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.webview__slide.is-current { opacity: 1; }

/* Live-site slide: the real page in a scaled-down iframe (animation and all) */
.webview__slide--live { overflow: hidden; }
.webview__slide--live iframe {
  width: 1440px;
  height: 900px;
  border: 0;
  transform: scale(var(--live-scale, 0.6));
  transform-origin: top left;
  pointer-events: none;
}
.webview__slide--live .webview__live-tag {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(20, 25, 15, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.webview__slide--live .webview__live-tag::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6fca6f;
}
.webview .appview__arrow { top: 55%; }
.webview__caption {
  font-size: var(--text-fine);
  color: var(--muted);
  text-align: center;
}
.webview__caption strong { color: var(--ink); }

/* ---------- Mock app screens (staff/manager recreations, PLNTD palette) ----------
   These depict the PLNTD build, so they intentionally use PLNTD's colours,
   scoped locally, not the Loyza tokens. */
.mock {
  --m-forest: #1d391a;
  --m-cream: #f8f3ee;
  --m-leaf: #3f8c3f;
  --m-leaf-dark: #2d6b2d;
  --m-gold: #cba258;
  --m-border: #e8e1d4;
  --m-taupe: #746753;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--m-cream);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  text-align: left;
}
.mock.is-current { opacity: 1; pointer-events: auto; }
.mock__head {
  background: var(--m-forest);
  color: var(--m-cream);
  padding: 2rem 1rem 0.85rem;
}
.mock__head strong { font-family: var(--font-display); font-size: 0.95rem; display: block; }
.mock__head small {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--m-gold);
  font-weight: 700;
}
.mock__body {
  flex: 1;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: hidden;
}
.mock__card {
  background: var(--white);
  border: 1px solid var(--m-border);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}
.mock__label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--m-taupe);
  margin-bottom: 0.15rem;
}
.mock__big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--m-forest);
  line-height: 1.15;
}
.mock__big small { font-size: 0.7rem; font-weight: 600; color: var(--m-taupe); }
.mock__split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.mock__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: var(--m-taupe);
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0e9dd;
}
.mock__row:last-child { border-bottom: none; }
.mock__row strong { color: var(--m-forest); font-weight: 600; }
.mock__row .plus { color: var(--m-leaf-dark); font-weight: 700; white-space: nowrap; }
.mock__row .minus { color: var(--m-gold); font-weight: 700; white-space: nowrap; }
.mock__scan {
  flex: 1;
  border: 2px dashed var(--m-leaf);
  border-radius: 14px;
  background: #eef4ea;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--m-taupe);
  font-size: 0.68rem;
  text-align: center;
  padding: 1rem;
}
.mock__scan svg { width: 34px; height: 34px; color: var(--m-leaf-dark); }
.mock__btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--m-forest);
  color: var(--m-cream);
  font-weight: 700;
  font-size: 0.72rem;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 0;
}
.mock__btn--ghost { background: transparent; border: 1.5px solid var(--m-border); color: var(--m-forest); }
.mock__bars { display: flex; gap: 4px; align-items: flex-end; height: 58px; padding-top: 0.3rem; }
.mock__bars span { flex: 1; background: var(--m-leaf); border-radius: 3px 3px 0 0; opacity: 0.85; }
.mock__compose {
  border: 1.5px solid var(--m-border);
  border-radius: 10px;
  background: var(--white);
  color: var(--m-taupe);
  font-size: 0.68rem;
  padding: 0.6rem 0.7rem;
  min-height: 52px;
}
.mock__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-top: 1px solid var(--m-border);
  padding-bottom: 0.5rem;
}
.mock__tab {
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--m-taupe);
  padding: 0.55rem 0 0.3rem;
  display: grid;
  gap: 3px;
  justify-items: center;
}
.mock__tab svg { width: 17px; height: 17px; }
.mock__tab.is-on { color: var(--m-leaf-dark); }
.mock__tabs--2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Process timeline (scroll-driven) ---------- */
.process {
  list-style: none;
  max-width: 820px;
  position: relative;
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  --line-top: 28px;
  --line-height: 0px;
  --line-fill: 0px;
}
/* Base line: spans from marker 01 to marker 05 only (measured by JS) */
.process::before {
  content: "";
  position: absolute;
  left: 27px;
  top: var(--line-top);
  height: var(--line-height);
  width: 2px;
  background: var(--clay);
}
/* Fill line: grows as you scroll, the "journey" */
.process::after {
  content: "";
  position: absolute;
  left: 27px;
  top: var(--line-top);
  height: var(--line-fill);
  max-height: var(--line-height);
  width: 2px;
  background: var(--accent);
}
.process__step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  position: relative;
  z-index: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .process__step { opacity: 0.35; transition: opacity 0.45s ease; }
  .process__step.is-lit { opacity: 1; }
}
.process__num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--clay);
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.35s ease, color 0.35s ease;
}
.process__step.is-lit .process__num { border-color: var(--accent); color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) {
  .process__num { border-color: var(--accent); color: var(--accent-ink); }
}
.process__step h3 { font-size: var(--text-h4); margin: 0.6rem 0 0.5rem; }
.process__step p { color: var(--muted); font-size: var(--text-body); max-width: 640px; }
.process__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.process__tags span {
  font-size: var(--text-tag);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.8rem;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  align-items: stretch;
}
@media (max-width: 940px) { .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

.price-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.price-card--featured {
  background: var(--espresso);
  color: var(--dark-ink);
  border-color: var(--espresso);
  box-shadow: var(--shadow-lg);
}
.price-card__flag {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  font-size: var(--text-tag);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.price-card h3 { font-size: var(--text-h4); margin-bottom: var(--space-2); }
.price-card .price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.price-card .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-card--featured .price small { color: var(--dark-muted); }
.price-card .price-sub { font-size: var(--text-fine); color: var(--muted); margin-bottom: var(--space-4); }
.price-card--featured .price-sub { color: var(--dark-muted); }

.price-card ul { list-style: none; display: grid; gap: 0.6rem; margin-bottom: var(--space-5); flex-grow: 1; }
.price-card li {
  display: flex;
  gap: 0.6rem;
  font-size: var(--text-small);
  color: var(--muted);
  align-items: flex-start;
}
.price-card--featured li { color: var(--dark-muted); }
.price-card li svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 0.2rem; color: var(--accent); }
.price-card--featured li svg { color: var(--dark-accent); }
.price-card .btn { width: 100%; }

/* ---------- FAQ accordion ---------- */
.faq-list { display: grid; gap: var(--space-3); max-width: var(--container-narrow); margin: 0 auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 1.4rem;
  font-weight: 600;
  font-size: 1.03rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.4rem 1.25rem; color: var(--muted); font-size: var(--text-small); }

/* ---------- Stat tiles ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 860px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.stat__label { font-size: var(--text-small); color: var(--muted); }
.stats-note {
  margin-top: var(--space-4);
  font-size: var(--text-fine);
  color: var(--muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--terracotta), var(--amber));
  border-radius: var(--radius-xl);
  color: var(--white);
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 4rem);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.14) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  pointer-events: none;
}
.cta-band h2 { font-size: var(--text-h2); margin-bottom: var(--space-3); position: relative; }
.cta-band p { max-width: 560px; margin: 0 auto var(--space-5); opacity: 0.92; position: relative; }
.cta-band .btn--primary {
  background: var(--white);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  position: relative;
}
.cta-band .btn--primary:hover { background: var(--oat); }

/* ---------- Footer ---------- */
.footer {
  background: var(--dark-bg);
  color: var(--dark-muted);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--section-pad);
  font-size: var(--text-small);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr; } }
.footer .wordmark { color: var(--dark-ink); font-size: 1.7rem; }
.footer__tag { margin-top: var(--space-3); max-width: 320px; }
.footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-tag);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-ink);
  margin-bottom: var(--space-3);
}
.footer ul { list-style: none; display: grid; gap: 0.6rem; }
.footer a { transition: color 0.15s ease; }
.footer a:hover { color: var(--dark-ink); }
.footer__bottom {
  border-top: 1px solid var(--dark-border);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-fine);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; margin-bottom: var(--space-3); }
.page-hero .lead { max-width: 680px; }

/* ---------- Case study ---------- */
.cs-band {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) { .cs-band { grid-template-columns: 1fr; } }
.cs-band--flip > :first-child { order: 2; }
@media (max-width: 860px) { .cs-band--flip > :first-child { order: 0; } }

.cs-shot {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  background: var(--surface-warm);
}
.cs-shot img { width: 100%; }
.cs-shot--phone {
  max-width: 300px;
  margin: 0 auto;
  border-radius: 44px;
  padding: 10px;
  background: var(--espresso);
  border: none;
}
.cs-shot--phone img { border-radius: 34px; }

.tech-list { list-style: none; display: grid; gap: var(--space-3); }
.tech-list li { display: flex; gap: 0.75rem; align-items: flex-start; }
.tech-list li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.25rem; color: var(--accent); }
.tech-list strong { display: block; }
.tech-list span { font-size: var(--text-small); color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-aside {
  background: var(--dark-bg);
  color: var(--dark-ink);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}
.contact-aside h3 { font-size: var(--text-h3); margin-bottom: var(--space-3); }
.contact-aside p { color: var(--dark-muted); font-size: var(--text-small); margin-bottom: var(--space-4); }
.contact-aside ul { list-style: none; display: grid; gap: 0.7rem; font-size: var(--text-small); color: var(--dark-muted); }
.contact-aside li { display: flex; gap: 0.6rem; align-items: flex-start; }
.contact-aside li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.25rem; color: var(--dark-accent); }

.form {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--space-3);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.form label {
  display: grid;
  gap: 0.4rem;
  font-size: var(--text-fine);
  font-weight: 600;
  color: var(--ink);
}
.form input, .form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--oat);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form textarea { resize: vertical; min-height: 130px; }
.btn--sent,
.btn--sent:hover,
.btn--sent:disabled {
  background: var(--matcha);
  color: var(--white);
  transform: none;
  opacity: 1;
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}
.btn__tick polyline {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  animation: tick-draw 0.45s ease-out 0.1s forwards;
}
@keyframes tick-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .btn__tick polyline { animation: none; stroke-dashoffset: 0; }
}

.form__status { font-size: var(--text-small); font-weight: 600; display: none; }
.form__status.is-success { display: block; color: var(--matcha); }
.form__status.is-error { display: block; color: var(--terracotta-deep); }

.calendly-wrap {
  margin-top: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.calendly-wrap.is-hidden { display: none; }

/* ---------- Legal pages ---------- */
.legal { max-width: var(--container-narrow); margin: 0 auto; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: var(--space-2); }
.legal .updated { color: var(--muted); font-size: var(--text-small); margin-bottom: var(--space-6); }
.legal h2 { font-size: 1.4rem; margin: var(--space-6) 0 var(--space-3); }
.legal p, .legal li { color: var(--roast); font-size: var(--text-body); margin-bottom: var(--space-3); }
.legal ul { padding-left: 1.3rem; }
.legal a { color: var(--accent); font-weight: 600; }

/* ---------- Comparison table ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); }
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: var(--text-small);
  min-width: 640px;
}
.compare th, .compare td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
.compare thead th {
  font-family: var(--font-body);
  font-size: var(--text-tag);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-warm);
}
.compare tbody tr:last-child td { border-bottom: none; }
.compare td:nth-child(2) { color: var(--accent-ink); font-weight: 600; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.compare td:nth-child(3) { color: var(--muted); }
