/* ─────────────────────────────────────────────────────────────
   StudyAlign landing site styles.
   Design tokens copied from study-align/docs/styleguide.html
   ───────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --sa-primary:        #2563eb;
  --sa-primary-dark:   #1f5eb3;
  --sa-gold:           #f2c200;
  --sa-gold-dark:      #b8901a;
  --sa-taupe:          #5b5346;

  /* Status */
  --sa-success:        #24a866;
  --sa-warning:        #e2a72c;
  --sa-danger:         #e14545;
  --sa-info:           #0aa4cb;

  /* Study status labels */
  --sa-setup:          #7c3aed;
  --sa-start-soon:     #e8850c;

  /* Neutrals (warm grey scale) */
  --sa-ink:            #23211a;
  --sa-darkgrey:       #34322a;
  --sa-mediumgrey:     #635e4d;
  --sa-lightgrey:      #c8c5ba;
  --sa-superlightgrey: #eae7dd;
  --sa-bg:             #f5f4f2;
  --sa-surface:        #ffffff;
  --sa-border:         rgba(23, 33, 55, 0.08);

  /* Procedure-editor accents */
  --sa-proc-text:      #3c3c33;
  --sa-proc-condition: #0aa4cb;
  --sa-proc-quest:     #c956e7;
  --sa-proc-pause:     #22ce65;

  /* Icon-chip palette: vibrant, harmonious tones for feature/flow icons */
  --sa-ic-blue:        #2f6fd6;
  --sa-ic-teal:        #0d9c98;
  --sa-ic-bronze:      #c98a1e;
  --sa-ic-plum:        #9b51c9;
  --sa-ic-sage:        #23a55d;
  --sa-ic-clay:        #d5603a;

  /* Type, radius, shadow */
  --sa-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sa-radius:      0.5rem;
  --sa-radius-sm:   0.375rem;
  --sa-radius-lg:   0.75rem;
  --sa-shadow-sm:   0 1px 2px rgba(23, 33, 55, 0.06);
  --sa-shadow:      0 4px 16px rgba(23, 33, 55, 0.10);
  --sa-shadow-lg:   0 18px 48px rgba(23, 33, 55, 0.16);

  --sa-maxw: 1120px;
  --sa-nav-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sa-nav-h) + 12px); }

body {
  margin: 0;
  font-family: var(--sa-font);
  color: var(--sa-ink);
  background: var(--sa-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--sa-primary); }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }

.wrap { max-width: var(--sa-maxw); margin: 0 auto; padding: 0 1.25rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sa-primary);
  margin: 0 0 0.6rem;
}

.section-head { max-width: 720px; margin: 0 auto 2.6rem; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 0.6rem; }
.section-head p { color: var(--sa-mediumgrey); font-size: 1.05rem; margin: 0; }

section.band { padding: clamp(3.5rem, 7vw, 6rem) 0; }
section.band.alt { background: var(--sa-surface); border-top: 1px solid var(--sa-border); border-bottom: 1px solid var(--sa-border); }
section.try-band { background: linear-gradient(155deg, #eef3ff 0%, #f7f5ee 100%); border-top: 1px solid var(--sa-border); border-bottom: 1px solid var(--sa-border); }
.try-cta { max-width: 680px; margin: 0 auto; text-align: center; }
.try-cta h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 0.7rem; }
.try-cta p { color: var(--sa-mediumgrey); font-size: 1.05rem; line-height: 1.65; margin: 0 auto 1.7rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sa-font);
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  border-radius: var(--sa-radius);
  padding: 0.62rem 1.15rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  box-shadow: var(--sa-shadow-sm);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sa-shadow); }
.btn:active { transform: translateY(0); }
.btn-primary  { background: var(--sa-primary); color: #fff; }
.btn-primary:hover { background: var(--sa-primary-dark); }
.btn-gold     { background: var(--sa-gold); color: #3a2e00; }
.btn-gold:hover { background: var(--sa-gold-dark); color:#fff; }
.btn-outline  { background: var(--sa-surface); color: var(--sa-ink); border-color: var(--sa-border); box-shadow: none; }
.btn-outline:hover { border-color: var(--sa-lightgrey); }
.btn-ghost    { background: transparent; color: var(--sa-primary); box-shadow: none; padding-inline: 0.4rem; }
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1.02rem; }

/* ── Navbar ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--sa-nav-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--sa-border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--sa-ink); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--sa-primary); color: #fff;
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 800;
  position: relative;
}
.brand .mark::after { content:""; position:absolute; top:5px; right:5px; width:7px; height:7px; border-radius:50%; background: var(--sa-gold); }
.brand b { color: var(--sa-primary); }
.brand .logo { height: 30px; width: auto; display: block; }
.brand .logo--light { height: 28px; }  /* dedicated white logo on the dark footer */

.nav-links { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--sa-darkgrey); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 0.5rem 0.8rem; border-radius: var(--sa-radius-sm); }
.nav-links a:hover { background: var(--sa-superlightgrey); color: var(--sa-ink); }
.nav-links a.active { color: var(--sa-primary); }
/* Keep the CTA button's own colours (out-specify the link rules above). */
.nav-links .btn-primary { color: #fff; }
.nav-links .btn-primary:hover { color: #fff; background: var(--sa-primary-dark); }
.nav-links .btn-outline { color: var(--sa-ink); }
.nav-cta { display: flex; align-items: center; gap: 0.6rem; }

.nav-toggle { display: none; background: none; border: 1px solid var(--sa-border); border-radius: var(--sa-radius-sm); width: 42px; height: 38px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content:""; display:block; width:18px; height:2px; background: var(--sa-ink); margin: 0 auto; position: relative; transition: .2s;
}
.nav-toggle span::before { position:absolute; top:-6px; } .nav-toggle span::after { position:absolute; top:6px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem,6vw,4.5rem);
  background: linear-gradient(168deg, #fdf7e8 0%, #fbf6ee 46%, var(--sa-bg) 100%);
}
.hero::before {
  content:""; position:absolute; inset:0; z-index:0;
  background:
    radial-gradient(780px 400px at 88% -14%, rgba(125, 113, 62, 0.3), transparent 62%),
    radial-gradient(680px 340px at 8% -8%, rgba(37,99,235,0.08), transparent 60%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-head { text-align: center; max-width: 860px; margin: 0 auto clamp(2.8rem, 5vw, 4.25rem); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); margin: 0.4rem 0 0.5rem; }
.hero h1 .rot { color: var(--sa-primary); display: inline-block; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--sa-mediumgrey); max-width: 640px; margin: 0.4rem auto 1.6rem; }
.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* Carousel */
.carousel { max-width: 900px; margin: 0 auto; }
.carousel-stage { position: relative; }

/* Browser-window frame around the slideshow */
.browser {
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius-lg);
  box-shadow: var(--sa-shadow-lg);
  overflow: hidden;
}
.browser-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--sa-bg);
  border-bottom: 1px solid var(--sa-border);
}
.browser-dots { display: flex; gap: 0.4rem; flex: 0 0 auto; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser-dots i:nth-child(1) { background: #ef6a5f; }
.browser-dots i:nth-child(2) { background: #f5be4f; }
.browser-dots i:nth-child(3) { background: #62c554; }
.browser-title {
  flex: 1 1 auto; min-width: 0;
  text-align: center;
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sa-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 62%;
  margin: 0 auto;
}

.slides {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--sa-surface);
}
.slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; visibility: hidden;
  transform: scale(0.99);
  transition: opacity .9s cubic-bezier(0.4, 0, 0.2, 1), transform .9s cubic-bezier(0.4, 0, 0.2, 1), visibility .9s;
  background: var(--sa-surface);
}
.slide.is-active { opacity: 1; visibility: visible; transform: scale(1); }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; box-shadow: none; }

.carousel-caption { text-align: center; margin: 1.1rem auto 0; max-width: 620px; min-height: 2.6rem; }
.carousel-caption p { margin: 0; color: var(--sa-mediumgrey); font-size: 0.98rem; }

.c-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--sa-surface); border: 1px solid var(--sa-border);
  box-shadow: var(--sa-shadow); cursor: pointer; z-index: 3;
  display: grid; place-items: center; color: var(--sa-ink);
  transition: background .12s, transform .12s;
}
.c-arrow:hover { background: var(--sa-primary); color:#fff; }
.c-arrow.prev { left: -12px; } .c-arrow.next { right: -12px; }
.c-arrow svg { width: 20px; height: 20px; }

.dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--sa-lightgrey); cursor: pointer; padding: 0; transition: .2s; }
.dot.is-active { background: var(--sa-primary); width: 26px; border-radius: 5px; }

/* ── Trust strip ─────────────────────────────────────────── */
.trust { border-top: 1px solid var(--sa-border); background: var(--sa-surface); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; justify-content: center; padding: 1.1rem 1.25rem; }
.trust span { color: var(--sa-mediumgrey); font-size: 0.9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.45rem; }
.trust svg { width: 18px; height: 18px; color: var(--sa-success); }

/* ── Flowchart / How it works ────────────────────────────── */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0.5rem; }
.flow-col { display: flex; flex-direction: column; gap: 0.8rem; }
.flow-col > .flow-col-title { text-align: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sa-mediumgrey); margin-bottom: 0.2rem; }
.flow-node {
  background: var(--sa-surface); border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius); padding: 0.85rem 0.95rem; box-shadow: var(--sa-shadow-sm);
  display: flex; gap: 0.7rem; align-items: flex-start;
}
.flow-node .ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.flow-node h4 { margin: 0 0 0.1rem; font-size: 0.98rem; }
.flow-node p { margin: 0; font-size: 0.83rem; color: var(--sa-mediumgrey); line-height: 1.4; }
.flow-core {
  background: linear-gradient(160deg, var(--sa-darkgrey), #2a2822);
  border: 2px solid #ffcc00;
  color: #fff; border-radius: var(--sa-radius-lg); padding: 1.4rem 1.1rem; text-align: center;
  box-shadow: var(--sa-shadow); display: flex; flex-direction: column; justify-content: center; height: 100%;
}
.flow-core .orb { width: 52px; height: 52px; display: block; margin: 0 auto 0.7rem; }
.flow-core h3 { margin: 0 0 0.3rem; font-size: 1.15rem; color:#fff; }
.flow-core p { margin: 0; font-size: 0.86rem; color: rgba(255,255,255,0.86); }
section.band.band-slim { padding: clamp(2.5rem, 5vw, 3.75rem) 0; }
section.components-band {
  background: linear-gradient(160deg, #fbf6e3 0%, #f3f4f8 100%);
  border-top: 1px solid var(--sa-border); border-bottom: 1px solid var(--sa-border);
}
.components-band .section-head { margin-bottom: 2rem; }
.components {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem;
}
.component-card {
  background: var(--sa-surface); border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius); padding: 1.1rem 1rem; box-shadow: var(--sa-shadow-sm);
}
.component-card .ic {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  color: var(--sa-darkgrey); background: #e7b900; margin-bottom: 0.7rem;
}
.component-card .ic svg { width: 21px; height: 21px; }
.component-card h4 { margin: 0 0 0.25rem; font-size: 1rem; }
.component-card p { margin: 0; font-size: 0.84rem; color: var(--sa-mediumgrey); line-height: 1.45; }
.flow-arrow { display: grid; place-items: center; color: var(--sa-lightgrey); }
.flow-arrow svg { width: 26px; height: 26px; }
.flow-foot { text-align: center; margin-top: 3.2rem; color: var(--sa-mediumgrey); }

/* ── Feature grid ────────────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.feature-card {
  background: var(--sa-surface); border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius-lg); padding: 1.5rem 1.4rem;
  box-shadow: var(--sa-shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--sa-shadow); border-color: var(--sa-lightgrey); }
.feature-card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; color: #fff; }
.feature-card h3 { margin: 0 0 0.4rem; font-size: 1.12rem; }
.feature-card p { margin: 0; color: var(--sa-mediumgrey); font-size: 0.95rem; }
.ic svg { width: 24px; height: 24px; }

/* ── Surveys / LimeSurvey section ────────────────────────── */
.survey-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; align-items: center; }
.survey-split h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 0.8rem; }
.survey-split p.lead { color: var(--sa-mediumgrey); font-size: 1.05rem; margin: 0 0 1.2rem; }
.template-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 1.3rem 0 0; padding: 0; list-style: none; }
.template-list li .tpl {
  display: flex; align-items: center; gap: 0.6rem; color: var(--sa-ink);
  background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: var(--sa-radius);
  padding: 0.7rem 0.85rem; font-weight: 600; font-size: 0.92rem; box-shadow: var(--sa-shadow-sm);
}
.template-list .tag { margin-left: auto; font-size: 0.7rem; font-weight: 700; color: var(--sa-mediumgrey); border: 1px solid var(--sa-border); border-radius: 999px; padding: 0.05rem 0.5rem; }
.tpl-hint { display: flex; align-items: center; gap: 0.5rem; margin: 0.95rem 0 0; font-size: 0.85rem; color: var(--sa-mediumgrey); }
.tpl-hint .soon { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sa-primary); background: rgba(37, 99, 235, 0.1); border-radius: 999px; padding: 0.12rem 0.5rem; }
.survey-visual { background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: var(--sa-radius-lg); box-shadow: var(--sa-shadow); padding: 1.4rem; }
.survey-visual .row { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--sa-border); }
.survey-visual .row:last-child { border-bottom: none; }
.survey-visual .badge { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color:#fff; font-weight: 800; }
.survey-visual .row b { display:block; } .survey-visual .row small { color: var(--sa-mediumgrey); }

/* ── Studies / proof ─────────────────────────────────────── */
.studies-scroll-wrap { position: relative; }
.studies-scroll { display: flex; gap: 1.1rem; overflow-x: auto; padding: 0.4rem 0.25rem 1.4rem; scroll-snap-type: x mandatory; }
.studies-scroll-wrap::before,
.studies-scroll-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(48px, 9vw, 110px);
  pointer-events: none; z-index: 2; opacity: 0; transition: opacity .25s ease;
}
.studies-scroll-wrap::before { left: 0; background: linear-gradient(to right, var(--sa-surface), rgba(255,255,255,0)); }
.studies-scroll-wrap::after { right: 0; background: linear-gradient(to left, var(--sa-surface), rgba(255,255,255,0)); }
.studies-scroll-wrap.can-scroll-left::before { opacity: 1; }
.studies-scroll-wrap.can-scroll-right::after { opacity: 1; }
.study-card {
  flex: 0 0 236px; scroll-snap-align: start;
  background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: var(--sa-radius-lg);
  overflow: hidden; box-shadow: var(--sa-shadow-sm); text-decoration: none; color: var(--sa-ink);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.study-card:hover { transform: translateY(-4px); box-shadow: var(--sa-shadow); }
.study-card .thumb { background: var(--sa-bg); border-bottom: 1px solid var(--sa-border); }
.study-card .thumb img { width: 100%; height: 240px; object-fit: cover; object-position: top; }
.study-card .body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.study-card .venue { align-self: flex-start; font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--sa-primary); border-radius: 999px; padding: 0.1rem 0.6rem; }
.study-card h3 { margin: 0; font-size: 0.98rem; line-height: 1.3; }
.study-card .go { margin-top: auto; color: var(--sa-primary); font-size: 0.85rem; font-weight: 600; }
.study-card--html { border-top: 4px solid var(--card-accent, var(--sa-primary)); }
.study-card--html .body { padding: 1.15rem 1rem 1.1rem; gap: 0.5rem; }
.study-card .authors { margin: 0; font-size: 0.72rem; color: var(--sa-mediumgrey); line-height: 1.3; }
.study-card .lines-wrap { height: 92px; overflow: hidden; margin: 0.55rem -1rem 0; padding: 0 1rem; border-bottom: 1px solid var(--sa-border); }
.study-card .lines { width: 100%; height: auto; display: block; opacity: 0.85; }
.study-card--html .go { margin-top: auto; padding-top: 0.95rem; }
.scroll-hint { text-align: center; color: var(--sa-mediumgrey); font-size: 0.85rem; margin-top: 0.4rem; }

/* ── Paper / scientific background ───────────────────────── */
.paper-cta { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; max-width: 900px; margin: 0 auto;
  background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: var(--sa-radius-lg); box-shadow: var(--sa-shadow); padding: 2rem; }
.paper-cta .cover { width: 150px; border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); }
.paper-cta h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.paper-cta .cite { color: var(--sa-mediumgrey); font-size: 0.95rem; margin: 0 0 1rem; }
.paper-cta .links { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ── Open source CTA ─────────────────────────────────────── */
.oss { text-align: center; }
.oss .icon-badge { width: 64px; height: 64px; border-radius: 16px; background: var(--sa-ink); color:#fff; display:grid; place-items:center; margin: 0 auto 1.2rem; }
.oss .icon-badge svg { width: 34px; height: 34px; }
.oss h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 0.6rem; }
.oss p { color: var(--sa-mediumgrey); max-width: 560px; margin: 0 auto 1.5rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { background: var(--sa-darkgrey); color: #d9d6cb; padding: 3rem 0 2rem; }
.footer a { color: #d9d6cb; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer .brand { color: #fff; }
.footer .brand b { color: var(--sa-gold); }
.footer-blurb { color: #a8a495; font-size: 0.92rem; margin: 0.8rem 0 0; max-width: 320px; }
.footer h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.95rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.2rem; padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; color: #a8a495; font-size: 0.85rem; }

/* ── Generic content pages (about / how-to) ──────────────── */
.page-hero { padding: clamp(2.6rem, 6vw, 4rem) 0 clamp(1.5rem,3vw,2.5rem); text-align: center; position: relative; }
.page-hero::before { content:""; position:absolute; inset:0; background: radial-gradient(620px 260px at 50% -20%, rgba(37,99,235,0.09), transparent 65%); }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 0.4rem 0 0.6rem; }
.page-hero p { color: var(--sa-mediumgrey); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin: 2.4rem 0 0.8rem; }
.prose h3 { font-size: 1.15rem; margin: 1.8rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; font-size: 1.03rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose img { border-radius: var(--sa-radius); border: 1px solid var(--sa-border); box-shadow: var(--sa-shadow-sm); margin: 1.2rem 0; }
.prose .caption { font-size: 0.85rem; color: var(--sa-mediumgrey); text-align: center; margin: -0.6rem 0 1.5rem; }

.callout { background: color-mix(in srgb, var(--sa-primary) 6%, var(--sa-surface)); border: 1px solid color-mix(in srgb, var(--sa-primary) 22%, var(--sa-border)); border-radius: var(--sa-radius); padding: 1rem 1.2rem; margin: 1.4rem 0; box-shadow: var(--sa-shadow-sm); }
.callout p { margin: 0; }
.callout strong { color: var(--sa-primary-dark); }

pre { background: var(--sa-ink); color: #f4f3ee; border-radius: var(--sa-radius); padding: 1rem 1.1rem; overflow-x: auto; font-size: 0.86rem; line-height: 1.5; }
pre code { font-family: ui-monospace, Menlo, Consolas, monospace; }
:not(pre) > code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--sa-superlightgrey); padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.88em; }

/* Steps (how-to) */
.steps { counter-reset: step; display: grid; gap: 1.1rem; margin: 1.5rem 0; }
.step { position: relative; background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: var(--sa-radius-lg); padding: 1.3rem 1.4rem 1.3rem 3.6rem; box-shadow: var(--sa-shadow-sm); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.25rem; width: 30px; height: 30px; border-radius: 50%; background: var(--sa-primary); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 0.95rem; }
.step h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.step p { margin: 0 0 0.6rem; color: var(--sa-darkgrey); }
.step p:last-child { margin-bottom: 0; }

/* Download cards */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin: 1.2rem 0; }
.dl-card { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--sa-ink);
  background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: var(--sa-radius); padding: 0.9rem 1rem; box-shadow: var(--sa-shadow-sm); transition: border-color .12s, transform .12s; }
.dl-card:hover { border-color: var(--sa-primary); transform: translateY(-1px); }
.dl-card .ficon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9px; background: var(--sa-superlightgrey); color: var(--sa-primary); display: grid; place-items: center; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.03em; }
.dl-card b { display: block; font-size: 0.95rem; }
.dl-card small { color: var(--sa-mediumgrey); font-size: 0.82rem; }

.team { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.4rem 0; }
.team .card { background: var(--sa-surface); border: 1px solid var(--sa-border); border-radius: var(--sa-radius-lg); padding: 1.3rem; box-shadow: var(--sa-shadow-sm); }
.team .card h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.team .card p { margin: 0; color: var(--sa-mediumgrey); font-size: 0.92rem; }

/* ── Reveal on scroll ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .slide { transition: opacity .01s; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .survey-split { grid-template-columns: 1fr; gap: 1.6rem; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: 0.2rem 0; }
  .flow-col { gap: 0.7rem; }
  .components { grid-template-columns: repeat(2, 1fr); }
  .paper-cta { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--sa-nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    background: var(--sa-surface); border-bottom: 1px solid var(--sa-border);
    padding: 0.6rem 0.9rem 1rem; box-shadow: var(--sa-shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { display: block; }
  .nav-links a { display: block; padding: 0.7rem 0.75rem; }
  .nav .desktop-cta { display: none; }
  .nav-links .mobile-cta { margin-top: 0.6rem; padding-top: 0.75rem; border-top: 1px solid var(--sa-border); }
  .nav-links .mobile-cta .btn { display: flex; width: 100%; justify-content: center; padding: 0.8rem 1rem; }
  .c-arrow.prev { left: 4px; } .c-arrow.next { right: 4px; }
}
@media (min-width: 761px) { .nav-links .mobile-cta { display: none; } }
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .components { grid-template-columns: 1fr; }
  .template-list, .dl-grid, .team { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .c-arrow { display: none; }
}
