/* ==========================================================================
   StoreVela — Homepage sections
   Problem cards, feature showcase (with HTML/CSS product
   pictures), who it's for, FAQ. Requires base.css; the mock-* basics
   (window, chip, thumb, cart bar) are in hero.css.
   ========================================================================== */

/* Skip link: hidden until focused with the keyboard */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  background: var(--color-warm);
  color: var(--color-on-primary);
  font-weight: 600;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 16px; }

/* Shared: section lead width, orange highlight in headings */
.section-head h2 span,
.who-content h2 span,
.faq-intro h2 span {
  background: var(--gradient-text-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Tick list used in the showcase, who it's for */
.check-list { display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  font-size: 15.5px;
  color: var(--color-text-soft);
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-warm-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8603C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  border: 1px solid var(--color-warm-border);
}

/* ---------------------------------- */
/* Problem cards                      */
/* ---------------------------------- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-grid);
}
.pain-card {
  display: flex;
  flex-direction: column;
  padding: var(--pad-card);
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}
.pain-card:hover { transform: translateY(var(--lift-card)); box-shadow: var(--shadow-card-hover); }
.pain-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-dim);
  margin-bottom: 18px;
}
.pain-card h3 { font-size: 18px; margin-bottom: 10px; }
.pain-card p { font-size: 14.5px; color: var(--color-text-secondary); margin-bottom: 22px; }
.pain-fix {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--color-border-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.pain-fix svg { color: var(--color-success); flex-shrink: 0; margin-top: 1px; }

/* ---------------------------------- */
/* Feature showcase rows              */
/* ---------------------------------- */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.showcase + .showcase { margin-top: clamp(72px, 10vw, 120px); }
.showcase--flip .showcase-text { order: 2; }

.showcase-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-warm);
  margin-bottom: 14px;
}
.showcase-text h3 {
  font-size: clamp(26px, 2.6vw + 8px, 38px);
  font-weight: 700;
  margin-bottom: 16px;
}
.showcase-text > p {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 26px;
  max-width: 520px;
}

.showcase-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
  border-radius: calc(var(--radius-xl) + 6px);
  background:
    radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--color-warm) 14%, transparent), transparent 55%),
    radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 55%),
    var(--color-surface-alt);
  border: 1px solid var(--color-border);
}

/* Phone */
.mock-phone {
  width: 100%;
  max-width: 290px;
  padding: 14px 14px 16px;
  border-radius: 34px;
  background: var(--color-surface);
  border: 8px solid #111827;
  box-shadow: var(--shadow-lg), 0 30px 60px -30px color-mix(in srgb, var(--brand-navy) 55%, transparent);
}
.mock-phone-notch {
  width: 84px; height: 18px;
  margin: -6px auto 14px;
  border-radius: 0 0 12px 12px;
  background: #111827;
}
.mock-phone-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.mock-phone-head strong { font-family: var(--font-display); font-size: 16px; color: var(--color-text); }

.mock-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-line);
}
.mock-row strong { display: block; font-size: 12.5px; color: var(--color-text); line-height: 1.3; }
.mock-row span { font-size: 11px; color: var(--color-text-secondary); }
.mock-row .mock-low { color: var(--color-warning); font-weight: 600; }
.mock-thumb--sm { width: 40px; height: 40px; aspect-ratio: auto; margin: 0; }
.mock-qty {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.mock-qty i { font-style: normal; color: var(--color-text-secondary); }
.mock-qty b { color: var(--color-text); }

/* Desktop panel (orders, dashboard) */
.mock-panel {
  width: 100%;
  max-width: 440px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg), 0 30px 60px -30px color-mix(in srgb, var(--brand-navy) 45%, transparent);
}
.mock-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.mock-panel-head strong { font-family: var(--font-display); font-size: 17px; color: var(--color-text); }
.mock-count {
  min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-warm);
  color: var(--color-on-primary);
  font-size: 12px; font-weight: 700;
}

.mock-order {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--color-line);
}
.mock-order strong { display: block; font-size: 13.5px; color: var(--color-text); }
.mock-order span:not(.mock-status) { font-size: 11.5px; color: var(--color-text-secondary); }

.mock-status {
  font-size: 11px; font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-full);
}
.mock-status--new { color: var(--color-warm); background: var(--color-warm-50); }
.mock-status--ok { color: var(--brand); background: var(--color-primary-50); }
.mock-status--done { color: var(--color-success); background: var(--color-success-bg); }

.mock-actions { display: flex; gap: 6px; }
.mock-actions b,
.mock-actions i {
  font-style: normal;
  font-size: 11.5px; font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}
.mock-actions b { background: var(--color-warm); color: var(--color-on-primary); }
.mock-actions i { border: 1px solid var(--color-border-strong); color: var(--color-text-soft); }

/* Photo in place of a drawn screen (shop counter) */
.showcase-visual--photo {
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.showcase-visual--photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 40% 55%;
}

/* Dashboard */
.mock-trend {
  font-size: 12px; font-weight: 700;
  color: var(--color-success);
  background: var(--color-success-bg);
  padding: 4px 9px;
  border-radius: var(--radius-full);
}
/* Chart: $ axis on the left, months below, one highlighted month */
.mock-graph {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 170px auto;
  column-gap: 12px;
  row-gap: 8px;
  margin-top: 6px;
}
.mock-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--color-text-dim);
  text-align: right;
}
/* each label sits centred on its grid line */
.mock-yaxis span { height: 0; display: flex; align-items: center; justify-content: flex-end; }
.mock-chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border-bottom: 1px solid var(--color-border-strong);
  background: repeating-linear-gradient(to bottom, var(--color-line) 0 1px, transparent 1px 25%);
}
.mock-chart i {
  position: relative;
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-navy) 70%, #4a7d96), var(--brand-navy));
}
.mock-chart i.is-peak { background: linear-gradient(180deg, color-mix(in srgb, var(--color-warm) 80%, #fff), var(--color-warm)); }
.mock-chart em {
  position: absolute;
  bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-on-primary);
  background: var(--brand-navy);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.mock-chart em::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top-color: var(--brand-navy);
}
.mock-xaxis {
  grid-column: 2;
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--color-text-secondary);
}
.mock-xaxis span { flex: 1; text-align: center; }

/* ---------------------------------- */
/* Who it's for                       */
/* ---------------------------------- */
.who-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: stretch;
}
/* The photo fills the height of the text beside it, no taller */
.who-visual { position: relative; min-height: 360px; }
.who-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}
.who-visual-tag {
  position: absolute;
  left: 20px; right: 20px; bottom: 20px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}
.who-visual-tag strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--color-warm);
}
.who-visual-tag span { font-size: 13.5px; font-weight: 500; color: var(--color-text-soft); }

.who-content h2 { font-size: var(--fs-h2); margin-bottom: 16px; }
.who-lead { font-size: 17px; color: var(--color-text-secondary); margin-bottom: 26px; }
.who-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.who-tags li {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.who-fit-title { font-size: 18px; margin-bottom: 16px; }

/* ---------------------------------- */
/* FAQ                                */
/* ---------------------------------- */
.faq-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.faq-intro { position: sticky; top: 120px; }
.faq-intro h2 { font-size: var(--fs-h2); margin-bottom: 16px; }
.faq-intro p { font-size: 17px; color: var(--color-text-secondary); margin-bottom: 26px; }

.faq-list { display: grid; gap: 12px; }
.faq-entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.faq-entry[open] { border-color: var(--color-warm-border); box-shadow: var(--shadow-card-hover); }
.faq-entry summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}
.faq-entry summary::-webkit-details-marker { display: none; }
.faq-entry summary::after {
  content: "";
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-warm-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8603C' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform var(--transition-med);
}
.faq-entry[open] summary::after { transform: rotate(45deg); }
.faq-entry p {
  padding: 0 22px 22px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ---------------------------------- */
/* Responsive                         */
/* ---------------------------------- */
@media (max-width: 1100px) {
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .showcase,
  .who-grid,
  .faq-layout { grid-template-columns: 1fr; }
  .showcase--flip .showcase-text { order: 0; }
  .faq-intro { position: static; }
  .who-visual { min-height: 0; }
  .who-visual img { position: static; height: auto; aspect-ratio: 16 / 10; }
  .who-content { order: -1; }
}

@media (max-width: 600px) {
  .pain-grid { grid-template-columns: 1fr; }
  .mock-order { grid-template-columns: 1fr auto; }
  .mock-order .mock-actions { grid-column: 1 / -1; }
  .faq-entry summary { padding: 18px; font-size: 16px; }
  .faq-entry p { padding: 0 18px 18px; }
}

/* ==========================================================================
   Rhythm, motion and the phone CTA bar
   ========================================================================== */

/* Slightly tighter sections than the shared theme default */
.section { padding: clamp(64px, 9vw, 112px) 0; }

/* ---------------------------------- */
/* Dark sections (navy, like footer)  */
/* ---------------------------------- */
.section-dark {
  background: var(--gradient-footer);
  color: var(--color-footer-text);
  border-top: none !important;
}
.section-dark + .section { border-top: none; }
.section-dark .section-head h2,
.section-dark h3 { color: var(--color-footer-heading); }
.section-dark .section-head p { color: var(--color-footer-text); }

/* Solid (not see-through), so the steps' dashed line only shows between cards */
.section-dark .pain-card,
.section-dark .step-card {
  background: color-mix(in srgb, var(--brand-navy) 90%, #fff);
  border-color: #ffffff17;
}
.section-dark .pain-card:hover,
.section-dark .step-card:hover {
  background: color-mix(in srgb, var(--brand-navy) 85%, #fff);
  box-shadow: 0 24px 50px -28px #000c;
}
.section-dark .pain-num { color: #ffffff59; }
.section-dark .pain-card p,
.section-dark .step-card p { color: var(--color-footer-text); }
.section-dark .pain-fix {
  color: var(--color-footer-heading);
  border-top-color: #ffffff24;
}
.section-dark .pain-fix svg { color: #4ade80; }

.section-dark .step-number {
  background: #ffffff12;
  border: 1px solid #ffffff26;
  box-shadow: none;
}
.section-dark .step-card:last-child .step-number { background: var(--color-warm); border-color: var(--color-warm); }
.section-dark .steps-grid::before { border-top-color: #ffffff2e; }

/* ---------------------------------- */
/* Scroll animations (only when JS    */
/* has added .reveal; see site.js)    */
/* ---------------------------------- */
/* Chart bars grow, then the best month's label appears */
.reveal .mock-chart i { transform: scaleY(0); transform-origin: bottom; transition: transform .9s var(--ease); }
.reveal.in-view .mock-chart i { transform: none; }
.reveal .mock-chart i:nth-child(2) { transition-delay: .06s; }
.reveal .mock-chart i:nth-child(3) { transition-delay: .12s; }
.reveal .mock-chart i:nth-child(4) { transition-delay: .18s; }
.reveal .mock-chart i:nth-child(5) { transition-delay: .24s; }
.reveal .mock-chart i:nth-child(6) { transition-delay: .30s; }
.reveal .mock-chart i:nth-child(7) { transition-delay: .36s; }
.reveal .mock-chart em { opacity: 0; transition: opacity .4s ease 1.1s; }
.reveal.in-view .mock-chart em { opacity: 1; }

/* Website orders slide in one after another; "New" pulses */
.reveal .mock-order { opacity: 0; transform: translateX(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in-view .mock-order { opacity: 1; transform: none; }
.reveal .mock-order:nth-of-type(2) { transition-delay: .35s; }
.reveal .mock-order:nth-of-type(3) { transition-delay: .55s; }
.reveal .mock-order:nth-of-type(4) { transition-delay: .75s; }
.mock-status--new { animation: pulse-new 2.2s ease-out infinite; }
@keyframes pulse-new {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-warm) 45%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* How it works: the dashed line draws from step 01 to 04 */
.steps-grid.reveal { opacity: 1; transform: none; }
.steps-grid.reveal::before { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .2s; }
.steps-grid.reveal.in-view::before { transform: none; }

/* ---------------------------------- */
/* Phones: sticky "Book a demo" bar   */
/* ---------------------------------- */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--color-border);
    transform: translateY(110%);
    transition: transform .35s var(--ease);
  }
  .mobile-cta.visible { transform: none; }
  body.has-mobile-cta .back-to-top { bottom: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage *, .stage-flow path { animation: none !important; }
  .stage-flow circle { display: none; }
  .reveal .mock-chart i,
  .reveal .mock-order,
  .steps-grid.reveal::before { transform: none; opacity: 1; }
  .reveal .mock-chart em { opacity: 1; }
}

/* ==========================================================================
   Phones (≤ 720px): shorter page, thumb-friendly layouts
   ========================================================================== */
@media (max-width: 720px) {
  .section-head { margin-bottom: 32px; }
  .section-head p { font-size: 15.5px; }

  /* Problem cards: swipe sideways instead of four tall cards in a column.
     The next card peeks in from the right so it's clear there's more. */
  .pain-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .pain-grid::-webkit-scrollbar { display: none; }
  .pain-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
    scroll-margin-left: var(--gutter);
    padding: 22px 20px;
  }
  .pain-card:hover { transform: none; }
  .pain-num { margin-bottom: 12px; }
  .pain-hint {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
  }
  .pain-hint i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ffffff33;
    transition: background var(--transition-fast), width var(--transition-fast);
  }
  .pain-hint i.is-active { width: 18px; border-radius: 3px; background: var(--color-warm); }

  /* Feature rows: less padding around the pictures */
  .showcase { gap: 28px; }
  .showcase + .showcase { margin-top: 64px; }
  .showcase-text h3 { font-size: 26px; margin-bottom: 12px; }
  .showcase-text > p { font-size: 16px; margin-bottom: 20px; }
  .showcase-visual { padding: 22px 16px; }
  .showcase-visual--photo { padding: 0; }
  .check-list { gap: 10px; }
  .check-list li { font-size: 15px; }

  /* "Also included": compact rows, icon on the left */
  .why-grid { gap: 10px; }
  .why-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    align-items: start;
    padding: 16px;
  }
  .why-card:hover { transform: none; }
  .why-icon { width: 44px; height: 44px; margin: 0; grid-row: span 2; }
  .why-icon svg { width: 22px; height: 22px; }
  .why-card h3 { font-size: 16px; margin: 2px 0 4px; }
  .why-card p { font-size: 14px; }

  /* Who it's for */
  .who-lead { font-size: 16px; margin-bottom: 20px; }
  .who-tags { gap: 8px; margin-bottom: 26px; }
  .who-tags li { padding: 7px 13px; font-size: 13.5px; }
  .who-visual-tag { left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; }

  /* How it works: a vertical timeline, number on the left */
  .steps-grid { gap: 0; }
  .steps-grid::before {
    display: block;
    top: 30px; bottom: 30px;
    left: 22px; right: auto;
    border-top: none;
    border-left: 2px dashed var(--color-border-strong);
  }
  .section-dark .steps-grid::before { border-left-color: #ffffff2e; }
  .steps-grid.reveal::before { transform: scaleY(0); transform-origin: top; }
  .steps-grid.reveal.in-view::before { transform: none; }
  .step-card,
  .section-dark .step-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    column-gap: 16px;
    padding: 12px 0;
    background: none;
    border: none;
  }
  .step-card:hover,
  .section-dark .step-card:hover { transform: none; background: none; box-shadow: none; }
  .step-number { margin: 0; grid-row: span 2; }
  .section-dark .step-number { background: color-mix(in srgb, var(--brand-navy) 80%, #fff); }
  .step-card h3 { font-size: 17px; margin: 2px 0 4px; }

  /* FAQ */
  .faq-layout { gap: 28px; }
  .faq-intro h2 { margin-bottom: 12px; }
  .faq-intro p { font-size: 16px; margin-bottom: 20px; }

  /* Contact panel and form */
  .contact-pitch { padding: 28px 22px; }
  .contact-pitch > p { margin-bottom: 24px; }
  .contact-form { padding: 24px 20px; }
  /* 16px stops iPhones zooming the page when a field is tapped */
  .contact-form input,
  .contact-form textarea { font-size: 16px; }

  /* Footer */
  .footer-arcanix { font-size: 15px; padding-left: 16px; }
}

@media (min-width: 721px) {
  .pain-hint { display: none; }
}
