/* ═══════════════════════════════════════════════════════════
   emerce — homepage for store owners (draft v2, 15.11.2026)
   Loads after app.css; all classes prefixed .st-
   Light, calm, one accent colour (lime, always with dark text).
   ═══════════════════════════════════════════════════════════ */

:root {
  --st-bg: #FAFAF5;
  --st-bg-alt: #F1F1E5;
  --st-surface: #FFFFFF;
  --st-ink: #1C1C1D;
  --st-muted: #5F5F55;
  --st-line: #E4E4D8;
  --st-accent: #A8D530;
  --st-accent-hover: #97C029;
  --st-accent-soft: rgba(168, 213, 48, 0.16);
  --st-radius: 18px;
  --st-shadow: 0 1px 2px rgba(28, 28, 29, 0.04), 0 12px 32px rgba(28, 28, 29, 0.07);
}

html:has(body.home-start) {
  scroll-snap-type: none;
}

/* Anchor jumps land below the sticky header. */
body.home-start section[id] {
  scroll-margin-top: 80px;
}

body.home-start {
  background: var(--st-bg);
  color: var(--st-ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.st-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
.st-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 245, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.st-header.is-scrolled {
  border-bottom-color: var(--st-line);
}

.st-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Logo: the main-site logo (markup and base styles from app.css). Sizes as
   on main: large at the top of the page, small once the page scrolls; dark
   colours as main uses on light backgrounds. */
.st-header .logo {
  font-size: 1.6rem;
  line-height: normal;
  -webkit-font-smoothing: auto;
  color: #1C1C1D;
  text-shadow: none;
}

.st-header.is-scrolled .logo {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .st-header .logo {
    font-size: 1.3rem;
  }

  .st-header.is-scrolled .logo {
    font-size: 1.2rem;
  }
}

.st-header .logo-com {
  margin-right: -3px;
}

.st-header .logo-merce {
  text-shadow: none;
}

/* ── Buttons ── */
.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  border: 0;
  background: var(--st-accent);
  color: var(--st-ink);
  font: inherit;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.st-btn:hover {
  background: var(--st-accent-hover);
}

.st-btn:active {
  transform: translateY(1px);
}

.st-btn:focus-visible,
.st-form input:focus-visible,
.st-footer a:focus-visible,
.st-footer button:focus-visible,
.st-source:focus-visible,
.st-header .logo:focus-visible {
  outline: 3px solid var(--st-ink);
  outline-offset: 3px;
}

.st-btn--small {
  padding: 10px 20px;
  font-size: 0.92rem;
}

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

.st-btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ── Hero ── */
.st-hero {
  padding: 72px 0 0;
}

.st-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.st-hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  text-wrap: balance;
}

.st-lead {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--st-muted);
  max-width: 34em;
  margin-bottom: 32px;
}

.st-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.st-micro {
  font-size: 0.95rem;
  color: var(--st-muted);
}

/* ── Hero scene ── */
.st-scene {
  position: relative;
  margin: 0;
  padding: 28px;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 28px;
  box-shadow: var(--st-shadow);
}

/* Example tabs; shown by start.js. */
.st-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.st-tabs[hidden] {
  display: none;
}

.st-tab {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--st-line);
  background: transparent;
  color: var(--st-muted);
  cursor: pointer;
}

.st-tab[aria-selected="true"] {
  background: var(--st-ink);
  border-color: var(--st-ink);
  color: #fff;
}

.st-tab:focus-visible {
  outline: 3px solid var(--st-ink);
  outline-offset: 2px;
}

/* Without JS only the first example shows. With tabs all examples share one
   grid cell, so the scene keeps the height of the tallest one. */
.st-ex:not(.is-active) {
  display: none;
}

.st-scene.has-tabs .st-exs {
  display: grid;
}

.st-scene.has-tabs .st-ex {
  display: block;
  grid-area: 1 / 1;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.st-scene.has-tabs .st-ex:not(.is-active) {
  opacity: 0;
  visibility: hidden;
}

/* One line about which stores emerce suits, under the examples. */
.st-scene__note {
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--st-muted);
  text-align: center;
}

/* "What you get" line under the hero. */
.st-gets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 32px;
  margin: 64px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--st-line);
  list-style: none;
}

.st-gets li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.st-gets__icon {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: var(--st-accent-soft);
  fill: none;
  stroke: var(--st-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* "Your product": a placeholder the visitor fills in with their own. */
.st-ex--yours .st-card__name {
  font-style: italic;
}

.st-ex--yours .st-card__facts li {
  font-style: italic;
  background: transparent;
  border: 1px dashed #B9B9AC;
  box-shadow: none;
}

.st-ex--yours .st-card__facts .st-card__key {
  border-color: var(--st-accent-hover);
  background: var(--st-accent-soft);
}

.st-picon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-card--before .st-card__img {
  color: #A3A397;
}

.st-card--after .st-card__img {
  color: #6F9A2E;
}

.st-cat {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.st-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--st-line);
  background: var(--st-surface);
}

.st-card__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6F6F64;
  margin-bottom: 10px;
}

.st-card__row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.st-card__img {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 12px;
  background: #F3F3EC;
  display: grid;
  place-items: center;
}

.st-card__img svg {
  width: 48px;
  height: 48px;
}

.st-card__name {
  font-weight: 700;
  line-height: 1.3;
}

.st-card__price {
  margin-left: 6px;
  font-weight: 800;
}

/* Today: a bare, greyed-out card. */
.st-card--before {
  background: var(--st-bg);
  color: #6F6F64;
}

/* With emerce: the same product, described. */
.st-card--after {
  border-color: var(--st-accent);
  box-shadow: 0 8px 24px rgba(28, 28, 29, 0.08);
}

.st-card--after .st-card__label {
  color: var(--st-ink);
}

.st-card--after .st-card__img {
  background: #EEF4E2;
}

.st-card__facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}

.st-card__facts li {
  font-size: 0.9rem;
  line-height: 1.3;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--st-bg-alt);
}

.st-card__facts .st-card__key {
  background: var(--st-accent-soft);
  box-shadow: inset 0 0 0 1px var(--st-accent);
  font-weight: 700;
}

/* Scene states, driven by start.js. Without JS (or with reduced motion)
   everything is simply visible. */
.st-ex.is-intro [data-scene],
.st-ex.is-intro [data-fact] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.st-ex.is-intro [data-scene].is-shown,
.st-ex.is-intro [data-fact].is-shown {
  opacity: 1;
  transform: none;
}

/* ── Sections ── */
.st-sec {
  padding: 96px 0;
}

.st-sec--alt {
  background: var(--st-bg-alt);
}

.st-sec h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  text-wrap: balance;
}

.st-text {
  font-size: 1.12rem;
  color: var(--st-muted);
  max-width: 38em;
}

/* Stats */
.st-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.st-stat {
  margin: 0;
  padding: 32px;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
}

.st-stat__num {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 14px;
}

.st-stat figcaption {
  font-size: 1.05rem;
}

.st-source {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--st-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.st-source:hover {
  color: var(--st-ink);
}

/* Steps */
.st-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.st-step {
  position: relative;
  overflow: hidden;
  padding: 36px 32px 40px;
  background: var(--st-surface);
  border-radius: var(--st-radius);
  border: 1px solid var(--st-line);
}

/* Large line drawing, barely visible, behind the text. */
.st-step__art {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 170px;
  height: 170px;
  fill: none;
  stroke: var(--st-accent-hover);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.22;
  pointer-events: none;
}

.st-step h3,
.st-use h3 {
  position: relative;
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.st-step p,
.st-use p {
  position: relative;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--st-muted);
}

.st-use {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 36px 32px;
  background: var(--st-surface);
  border-radius: var(--st-radius);
  border: 1px solid var(--st-line);
}

/* Decoration: a short accent bar and a soft accent glow in the corner. */
.st-use::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--st-accent);
  margin-bottom: 22px;
}

.st-use::after {
  content: '';
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 213, 48, 0.16), rgba(168, 213, 48, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

/* Free + form */
.st-free {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.st-uses {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.st-list {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.st-list li {
  position: relative;
  padding-left: 38px;
  font-size: 1.08rem;
}

.st-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--st-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1C1D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.st-form {
  padding: 32px;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: 24px;
  box-shadow: var(--st-shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.st-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
}

.st-field label {
  font-size: 0.92rem;
  font-weight: 600;
}

.st-form input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--st-ink);
  padding: 13px 15px;
  border: 1px solid #D5D5C8;
  border-radius: 12px;
  background: #fff;
}

.st-form input[aria-invalid='true'] {
  border-color: #C2410C;
}

.st-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.st-form__note {
  font-size: 0.85rem;
  color: var(--st-muted);
}

.st-form__note a {
  color: inherit;
}

.st-form__status {
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 1.4em;
}

.st-form__status.is-error {
  color: #B42318;
}

.st-form.is-done .st-field,
.st-form.is-done .st-btn,
.st-form.is-done .st-form__note {
  display: none;
}

.st-form.is-done .st-form__status {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Footer */
.st-footer {
  border-top: 1px solid var(--st-line);
  padding: 36px 0 48px;
  font-size: 0.92rem;
  color: var(--st-muted);
}

.st-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 28px;
}

.st-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.st-footer a,
.st-footer button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.st-footer a:hover,
.st-footer button:hover {
  color: var(--st-ink);
  text-decoration: underline;
}

/* Gentle reveal on scroll (start.js adds .is-armed only when motion is OK) */
.st-reveal.is-armed {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.st-reveal.is-armed.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .st-hero {
    padding: 40px 0 0;
  }

  .st-hero__grid,
  .st-free {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .st-steps,
  .st-stats,
  .st-uses {
    grid-template-columns: 1fr;
  }

  .st-gets {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 48px;
  }

  .st-sec {
    padding: 72px 0;
  }
}

@media (max-width: 520px) {
  .st-wrap {
    padding: 0 16px;
  }

  .st-scene,
  .st-form,
  .st-stat {
    padding: 22px;
  }

  .st-card {
    padding: 14px;
  }

  .st-step,
  .st-use {
    padding: 28px 24px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.home-start) {
    scroll-behavior: auto;
  }

  .st-btn,
  .st-header .logo,
  .st-scene.has-tabs .st-ex {
    transition: none;
  }
}
