/* ===========================================================================
   Barulaganyi landing page
   Mobile-first. No frameworks, no web fonts, no CDN — the whole page is this
   file plus index.html plus the images in assets/.

   Colours are the app's brand palette (frontend/lib/theme.dart). Contrast
   notes are inline where a choice was made for accessibility rather than
   aesthetics — orange is an ACCENT here, never small body text.
   =========================================================================== */

:root {
  --orange: #e8720c;
  --orange-dark: #cc6209;   /* hover/active only */
  --orange-tint: #fdf0e2;   /* callout wash */
  --white: #fff;

  /* Section rhythm. The app's page colour is lilac (#F7F0FA) and it works
     inside the app, but across a long white marketing page the purple cast
     fought the orange. The alternating band is instead a whisper of the brand
     orange — same rhythm, no second hue. Swap --band alone to change it
     (e.g. back to #f7f0fa, or to #fff for a flat white page). */
  --lilac: #f7f0fa;         /* app page colour — kept for reference */
  --band: #fbf6f1;
  --slate: #3d5a73;         /* body text — 7.2:1 on white */
  --slate-muted: #5a7186;   /* secondary text — 5.1:1 on white, 4.9:1 on --band */
  --border: rgba(61, 90, 115, 0.2);

  --radius: 14px;
  --wrap: 1080px;
  --wrap-narrow: 720px;

  --pad-x: 20px;
  --pad-y: 64px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--slate);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--slate); }

/* Orange on a light surface is ~3:1, so links are underlined slate; the
   orange belongs to the buttons. */
a:hover { color: var(--orange-dark); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--slate);
  color: var(--white);
  padding: 12px 20px;
  z-index: 10;
}
.skip-link:focus { left: 0; color: var(--white); }

/* --- Layout ------------------------------------------------------------- */

.section { padding: var(--pad-y) var(--pad-x); }
.section--white { background: var(--white); }
.section--band { background: var(--band); }

.wrap { max-width: var(--wrap); margin: 0 auto; }

/* Prose sections keep a comfortable measure WITHOUT centring — if the narrow
   wrapper were centred it would sit on a different left edge from the wide
   sections, and the page would read as two misaligned columns. Same gutter,
   shorter lines. */
.wrap--narrow > * { max-width: var(--wrap-narrow); }

/* --- Type --------------------------------------------------------------- */

h1, h2, h3 {
  color: var(--slate);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 7vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 5vw, 2.15rem); font-weight: 700; }
/* 1.2rem = 19.2px bold, which is over the 18.66px "large text" threshold. That
   matters: the feature-card headings below are orange (3.95:1 on white), which
   is AA-valid for large text only. Don't shrink h3. */
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.section__title { margin-bottom: 1.2em; }

.lede {
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 34ch;
}

.pull {
  font-size: 1.15rem;
  font-weight: 600;
  border-left: 4px solid var(--orange);
  padding-left: 18px;
  margin-top: 1.6em;
}

.note {
  margin-top: 1.8em;
  color: var(--slate-muted);
  font-size: 0.95rem;
}

/* --- Buttons — solid orange, white label, generously rounded (the app's
       login button, scaled up for a landing page).
       White on #E8720C is 3.07:1, which clears WCAG AA for LARGE text only,
       so the label is locked at >=19px/700 (the large-text threshold). Do not
       shrink it. ---------------------------------------------------------- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  padding: 16px 34px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn--primary { background: var(--orange); color: var(--white); }
.btn--primary:hover { background: var(--orange-dark); color: var(--white); }

.btn--secondary {
  background: var(--white);
  color: var(--slate);
  border-color: var(--orange);
}
.btn--secondary:hover { background: var(--orange-tint); color: var(--slate); }

.btn--lg { padding: 18px 44px; font-size: 20px; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
/* One per row on a phone — full-width taps, and "Get Started" stays the
   dominant one instead of both shrinking to fit side by side. */
.cta-row .btn { flex: 1 1 100%; }

/* --- Hero --------------------------------------------------------------- */

.hero { padding-top: 44px; padding-bottom: 56px; }

.hero__wordmark {
  width: clamp(210px, 56vw, 280px);
  margin-bottom: 26px;
}

.hero__tagline {
  margin-top: 1.2em;
  color: var(--slate-muted);
  font-weight: 600;
}

.hero__cow {
  width: min(200px, 55vw);
  margin: 40px auto 0;
}

/* --- What it does ------------------------------------------------------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card h3 { color: var(--orange-dark); }
.card p { color: var(--slate); margin: 0; }

/* --- What's coming next ------------------------------------------------- */

/* The one dark slab on the page. Everything else is white or the warm band, so
   flipping the ground here makes the roadmap land as its own place — and it's
   the only spot where brand orange gets to be luminous instead of restrained.
   Framed by band sections above and below, so it reads as a deliberate pivot
   rather than a broken rhythm. */
.section--next {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(115% 85% at 88% -10%, rgba(232, 114, 12, 0.42), transparent 62%),
    radial-gradient(90% 70% at 0% 110%, rgba(232, 114, 12, 0.16), transparent 60%),
    linear-gradient(168deg, #3a5470 0%, #24354a 100%);
  background-color: #24354a;
}

.section--next h2 { color: #fff; }

.section--next .card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0;              /* the art band is full-bleed; .card__body re-pads */
  overflow: hidden;        /* clip the art to the card's corner radius */
}

.card__body { padding: 26px 24px 28px; }

/* --- Card artwork ------------------------------------------------------- */

/* Inline SVG, not image files: it stays crisp at any size, costs no extra
   request, and the strokes can be themed and animated from this stylesheet.
   The one raster is the brand cow — reusing the real asset rather than
   redrawing it keeps the mark consistent. Height is driven by the viewBox, so
   the art scales with the card instead of letterboxing. */
.card__art {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.card__art svg { display: block; width: 100%; height: auto; }

.art-line {
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 2;
  stroke-linecap: round;
}
.art-grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }

.art-reader {
  fill: rgba(255, 255, 255, 0.14);
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 2;
}

.art-panel {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 2;
}
.art-row { stroke: rgba(255, 255, 255, 0.28); stroke-width: 4; stroke-linecap: round; }
.art-row--new { stroke: #f3983e; }

.art-paddock {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(243, 152, 62, 0.62);
  stroke-width: 2;
  stroke-dasharray: 7 6;
}
.art-herd { fill: rgba(255, 255, 255, 0.82); }
.art-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.38);
  stroke-width: 2;
  stroke-dasharray: 3 6;
  stroke-linecap: round;
}
.art-stray {
  fill: #ff9a3c;
  filter: drop-shadow(0 0 7px rgba(255, 154, 60, 0.9));
}
/* Knocked out of the pin so it reads as a marker, not a solid blob. Matches the
   card ground rather than the section, since the pin sits on the art band. */
.art-stray-eye { fill: #3c526b; }
.art-ping {
  fill: none;
  stroke: #ff9a3c;
  stroke-width: 2;
}

/* Base values are the resting state, so the art still reads when animation is
   switched off by prefers-reduced-motion (which sets animation: none). */
.art-wave {
  fill: none;
  stroke: #f3983e;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.7;
  animation: scan 2.8s ease-out infinite;
}
.art-ping {
  opacity: 0.32;
  transform-box: fill-box;
  transform-origin: center;
  animation: ping 2.6s ease-out infinite;
}

@keyframes scan {
  0%, 100% { opacity: 0; }
  18%      { opacity: 0.9; }
  62%      { opacity: 0; }
}

@keyframes ping {
  0%   { transform: scale(0.45); opacity: 0.85; }
  70%  { transform: scale(1.6);  opacity: 0; }
  100% { transform: scale(1.6);  opacity: 0; }
}
.section--next .card h3 { color: #fff; }
/* :not(.badge) matters — the badge IS a <p>, and without the exclusion this
   3-class selector beats .badge--soon and washes the glow out to plain white. */
.section--next .card p:not(.badge) { color: rgba(255, 255, 255, 0.84); }

/* Badges glow, but they are still LABELS, not buttons: small, uppercase,
   wide-tracked, pill-shaped, and never the size or fill of a CTA. The heat
   encodes the timeline — "soon" runs hot with a live dot, "2027" stays cool. */
.card .badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Scoped with .card so these outrank `.card p` (a class + a type), which the
   bare .badge--* class would otherwise lose to — the badge is a <p>. */
.card .badge--soon {
  color: #ffd3a3;
  background: rgba(232, 114, 12, 0.26);
  border: 1px solid rgba(243, 152, 62, 0.8);
  box-shadow:
    0 0 0 4px rgba(232, 114, 12, 0.1),
    0 8px 26px -10px rgba(255, 140, 40, 0.95);
}
.card .badge--soon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff9a3c;
  box-shadow: 0 0 9px 1px rgba(255, 154, 60, 0.95);
  animation: pulse 2.4s ease-in-out infinite;
}

.card .badge--later {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.82); }
}

/* --- How it works ------------------------------------------------------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.step { display: flex; gap: 18px; align-items: flex-start; }

.step__num {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-size: 22px;      /* large text — 3.07:1 is AA-compliant at this size */
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 { margin-bottom: 0.25em; }
.step p { margin: 0; }

/* --- Regulations -------------------------------------------------------- */

.rules {
  list-style: none;
  margin: 0 0 34px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.rules li {
  background: var(--white);
  border-radius: 10px;
  padding: 16px 18px 16px 20px;
  border-left: 4px solid var(--orange);
}

.rules strong { color: var(--slate); }

.callout {
  background: var(--orange-tint);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.callout p { font-size: 1.02rem; }

/* --- Who it's for ------------------------------------------------------- */

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.ticks li { position: relative; padding-left: 34px; }

.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--orange);
}

/* --- FAQ ---------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--border);
}

.faq details { border-bottom: 1px solid var(--border); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 44px 20px 0;
  position: relative;
  font-weight: 700;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }

/* Pure-CSS +/− toggle, so the accordion needs no JavaScript. */
.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  top: 50%;
  background: var(--orange);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* The two bars share a centre: the horizontal one starts 8px from the right
   and is 16px wide, so the vertical one sits at 8 + (16 - 3) / 2 = 14.5px. */
.faq summary::before { right: 8px;    width: 16px; height: 3px;  margin-top: -1.5px; }
.faq summary::after  { right: 14.5px; width: 3px;  height: 16px; margin-top: -8px; }

.faq details[open] summary::after { opacity: 0; transform: rotate(90deg); }

.faq details > p {
  margin: 0 0 22px;
  padding-right: 8px;
  color: var(--slate);
  max-width: 62ch;
}

/* --- Final CTA ---------------------------------------------------------- */

.final { position: relative; overflow: hidden; text-align: center; }

/* The cow's second and last appearance — a watermark, not a picture. */
.final__cow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(230px, 42vw);
  opacity: 0.13;
  pointer-events: none;
}

.final__inner { position: relative; }
.final h2 { margin-bottom: 0.9em; }

/* --- Footer ------------------------------------------------------------- */

.footer { padding-top: 48px; padding-bottom: 48px; border-top: 1px solid var(--border); }

.footer__wordmark { width: 190px; margin-bottom: 20px; }

.footer__links {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--slate-muted);
}

.footer__line,
.footer__copy { color: var(--slate-muted); font-size: 0.92rem; }
.footer__line { max-width: 46ch; }
.footer__copy { margin-top: 10px; }

/* ===========================================================================
   Wider screens
   =========================================================================== */

@media (min-width: 620px) {
  :root { --pad-x: 32px; --pad-y: 84px; }

  .cards { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .cta-row .btn { flex: 0 0 auto; }
  .footer__links { grid-auto-flow: column; justify-content: start; gap: 28px; }
}

@media (min-width: 900px) {
  body { font-size: 18px; }

  .hero { padding-top: 72px; padding-bottom: 96px; }

  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
  }

  .hero__cow { width: 100%; max-width: 360px; margin: 0 0 0 auto; }

  .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; }
  .step { flex-direction: column; gap: 14px; }

  .rules { gap: 16px; }
}

/* ===========================================================================
   Preferences
   =========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;   /* the badge's pulsing dot */
  }
}
