/* ============================================================
   Fruit Apps — homepage-only styles. Requires base.css.
   (Tokens, nav, footer, base type, generic motion live in base.css.)
   ============================================================ */

/* ============================================================
   1 · HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden; min-height: calc(100svh - 64px);
  display: flex; align-items: center;
  /* Counterweight on the text side, so the room doesn't feel entirely lit
     from the right. Sits high, above the lead text. */
  background: radial-gradient(45% 58% at 12% 32%,
    color-mix(in oklab, var(--accent) 16%, transparent) 0%, transparent 70%);
}
@media (prefers-color-scheme: dark) {
  .hero { background: radial-gradient(45% 58% at 12% 32%,
    color-mix(in oklab, var(--accent) 19%, transparent) 0%, transparent 72%); }
}
/* Subtle warm ambience behind the mark side, so the right isn't flat dark.
   Always on, right-anchored (84% x) — a fixed base ambience underneath the
   moving canvas glow in home.js, which draws its own light that travels with
   the spark head on top of this. */
.hero::after {
  content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background: radial-gradient(58% 62% at 84% 48%,
    color-mix(in oklab, var(--accent) 12%, transparent) 0%, transparent 66%);
}
@media (prefers-color-scheme: dark) {
  .hero::after { background: radial-gradient(58% 62% at 84% 48%,
    color-mix(in oklab, var(--accent) 15%, transparent) 0%, transparent 68%); }
}
.hero__inner { position: relative; z-index: 1; }
.hero__title { font-size: var(--step-hero); letter-spacing: -0.035em; }
.hero__title .line { display: block; white-space: nowrap; }
@media (max-width: 560px) { .hero__title .line { white-space: normal; } }
.hero__title .line__inner { display: inline-block; }
.hero__title .accent { color: var(--accent); }

/* Signature one-line mark — a sparkler draws it. Mirrored, drawn bottom → top. */
.hero__mark {
  --spark: oklch(0.82 0.14 80);   /* warm-gold: SVG dot + hot trace, reads on white */
  --ember: oklch(0.80 0.12 78);   /* pale warm glow (reduced-motion cast) */
  --line:  oklch(0.58 0.015 250); /* cool grey drawn line — no brown */
  position: absolute; z-index: 0; pointer-events: none;
  top: 50%; right: clamp(-6rem, -0.5vw, 2rem); translate: 0 -50%;   /* nudged right */
  width: clamp(300px, 42vw, 560px); height: auto; aspect-ratio: 1;
  color: var(--accent); opacity: 0.95;
  transform: scaleX(-1);          /* mirror the shape */
  overflow: visible;              /* let the cast light spill onto the hero */
}
@media (prefers-color-scheme: dark) { .hero__mark { --spark: oklch(1 0 0); --ember: oklch(0.90 0.06 85); --line: oklch(0.90 0.02 250); } }
@media (max-width: 860px) { .hero__mark { opacity: 0.6; right: -18%; width: 70vw; } }

.hero__stroke { stroke: var(--line); stroke-width: 1.2; opacity: 0.4; stroke-dashoffset: 0; }
.hero__trail { stroke: var(--spark); stroke-width: 1.6; opacity: 0; }   /* thin hot trace behind the head */
.hero__dot { opacity: 0; }                                                /* hidden until JS reveals it — avoids a flash before animateHeroMark()/setHeroMarkStatic() run */
.hero__dot-core { fill: var(--spark); }                                  /* SVG head — reduced-motion only */
.hero__cast { fill: var(--ember); opacity: 0; }                          /* SVG cast — reduced-motion only */

/* Spark + glow layer: an overlaid canvas drawn additively by home.js.
   Behind the hero copy (z 1), above the mark; clipped by the hero's overflow. */
.hero__canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Amber atmosphere — soft radial light, no blur filter (dodges glass/blur bans).
   Anchored top-right, same as before this file's animation work — always on,
   underneath the moving canvas glow. */
.hero::before {
  content: ""; position: absolute; z-index: 0; inset: -20% -10% auto auto;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle at 60% 40%,
    color-mix(in oklab, var(--accent) 22%, transparent) 0%,
    transparent 62%);
  opacity: 0.5; pointer-events: none;
}
@media (prefers-color-scheme: dark) { .hero::before { opacity: 0.35; } }
.hero__lead {
  margin-top: 1.75rem; max-width: 46ch;
  font-size: var(--step-lead); line-height: 1.5; color: var(--ink-muted); font-weight: 420;
}
.hero__rule {
  margin-top: 3rem; height: 1px; width: 100%; max-width: 520px;
  background: linear-gradient(to right, var(--accent) 0%, var(--hairline) 60%, transparent 100%);
  transform-origin: left center;
}
.hero__meta {
  margin-top: 1.25rem; font-family: var(--font-mono);
  font-size: 0.82rem; letter-spacing: 0.01em; color: var(--ink-faint);
}

/* ============================================================
   2 · PHILOSOPHY
   ============================================================ */
.credo {
  font-family: var(--font-display);
  font-size: var(--step-h2); font-weight: 500; letter-spacing: -0.03em;
  max-width: 18ch; line-height: 1.08;
}
.credo__attr { display: block; margin-top: 1.25rem; font-size: 1rem; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; }
.principles { margin-top: clamp(3.5rem, 8vh, 6rem); display: grid; gap: clamp(2.5rem, 5vh, 4rem); }
.principle {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 4vw, 3.5rem); align-items: start;
  padding-top: 2rem; border-top: 1px solid var(--hairline);
}
.principle__title { font-size: var(--step-h3); font-weight: 540; }
.principle__body { max-width: var(--measure); color: var(--ink-muted); font-size: var(--step-lead); line-height: 1.55; }
@media (max-width: 720px) { .principle { grid-template-columns: 1fr; gap: 0.75rem; } }

/* ============================================================
   3 · WHO WE ARE
   ============================================================ */
.about--animated { position: relative; overflow: hidden; }
.about--animated::before {
  content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background: radial-gradient(48% 55% at 50% 30%,
    color-mix(in oklab, var(--accent) 8%, transparent) 0%, transparent 70%);
}
.about--animated .container { position: relative; z-index: 1; }

/* Orbit mark: same reduction-to-essence signature language as .hero__mark,
   reshaped into a circle + 2 internal bands echoing the logo's structure. */
.about__mark {
  --spark: oklch(0.82 0.14 80);
  --line:  oklch(0.58 0.015 250);
  display: block; margin: 0 auto clamp(1.5rem, 4vh, 2.5rem); pointer-events: none;
  width: clamp(140px, 12vw, 200px); height: auto; aspect-ratio: 1;
  color: var(--accent); opacity: 0.9; overflow: visible;
}
@media (prefers-color-scheme: dark) { .about__mark { --spark: oklch(1 0 0); --line: oklch(0.90 0.02 250); } }
.about__stroke { stroke: var(--line); stroke-width: 1.6; opacity: 0.4; } /* visibility comes from the dash-reveal in JS, same as .hero__stroke */
.about__dot { opacity: 0; }
.about__dot-core { fill: var(--spark); }
.about__canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.about__quote {
  margin-top: 1.75rem; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500;
  letter-spacing: -0.01em; line-height: 1.4; max-width: 46ch;
}
.about__quote-attr { display: block; margin-top: 0.75rem; font-size: 0.95rem; font-weight: 400; color: var(--ink-faint); }
/* No measure cap here on purpose: unlike .principle__body, this sits alone in
   the section's full single-column width, not a narrower grid column — any
   ch-based cap left an obviously-empty strip on the right of it. Fills the
   container like the section's other full-width elements do. */
.about__body { margin-top: 1.75rem; color: var(--ink-muted); font-size: var(--step-lead); line-height: 1.6; max-width: 100%; }

/* ============================================================
   4 · WHAT WE MAKE
   ============================================================ */
.make { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(2rem, 5vw, 4rem); }
.make__col { display: flex; flex-direction: column; gap: 0.9rem; }
.make__tag { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-deep); letter-spacing: 0.02em; }
.make__h { font-size: var(--step-h3); font-weight: 540; }
.make__p { color: var(--ink-muted); max-width: 42ch; line-height: 1.55; }

/* ============================================================
   5 · CLIENTS
   ============================================================ */
.clients__intro { margin-top: 1.25rem; color: var(--ink-muted); font-size: var(--step-lead); max-width: 40ch; }
.logos {
  --logo-size: 40px;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--logo-size);
}
.logo-mark__img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: var(--logo-size);
  object-fit: contain;
  object-position: center;
  filter: grayscale(1) contrast(0.92) brightness(0.92);
}
.logo-mark__img:hover { opacity: 1; }

@media (max-width: 760px) {
  .logos { flex-wrap: wrap; justify-content: center; }
  .logos { --logo-size: 34px; }
}

/* ============================================================
   6 · TESTIMONIALS
   ============================================================ */
.testimonials { position: relative; --tpp: 2; --tgap: clamp(1.25rem, 3vw, 2rem); }
.testimonials__viewport { overflow: hidden; }
.testimonials__track {
  display: flex; margin: 0; padding: 0; list-style: none;
  gap: var(--tgap);
  transition: transform 560ms var(--ease-expo);
  will-change: transform;
}
.testimonial {
  flex: 0 0 calc((100% - (var(--tpp) - 1) * var(--tgap)) / var(--tpp));
  min-width: 0;
  display: flex; flex-direction: column;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 3.5vw, 2.25rem);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--surface);
}
.testimonial__stars {
  display: flex; gap: 0.2rem; color: var(--accent); margin: 0 0 1rem;
}
.testimonial__stars svg { display: block; }
.testimonial__quote {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 450;
  letter-spacing: -0.01em; line-height: 1.55;
}
.testimonial__attr {
  margin-top: 1.5rem; display: flex; align-items: baseline; gap: 0.6rem;
  font-size: 0.92rem; color: var(--ink-faint);
}
.testimonial__store { color: var(--ink); font-weight: 540; }
.testimonial__country::before { content: "·"; margin-right: 0.6rem; }

@media (max-width: 760px) {
  .testimonials { --tpp: 1; }
}

.testimonials__controls {
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-width: 0;
}
.testimonials__dots {
  display: flex; align-items: center; gap: 0.5rem;
  min-width: 0; overflow-x: auto; scrollbar-width: none;
  -ms-overflow-style: none;
}
.testimonials__dots::-webkit-scrollbar { display: none; }
.testimonials__dot {
  width: 22px; height: 8px; border-radius: 999px; padding: 0;
  background: var(--hairline); border: none; cursor: pointer;
  transform: scaleX(0.36); transform-origin: left center;
  transition: background 220ms ease, transform 260ms var(--ease-expo);
}
.testimonials__dot[aria-selected="true"] { background: var(--accent); transform: scaleX(1); }
.testimonials__arrows { display: flex; gap: 0.6rem; }
.testimonials__arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--hairline); background: transparent; color: var(--ink);
  cursor: pointer; transition: border-color 200ms ease, transform 220ms var(--ease-expo);
}
.testimonials__arrow:hover { border-color: var(--accent); transform: translateY(-1px); }
.testimonials__arrow:disabled { opacity: 0.35; cursor: default; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .testimonials__track { transition: none; }
}

/* ============================================================
   7 · BY THE NUMBERS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(2.5rem, 6vw, 5rem); }
.stat__num { font-family: var(--font-mono); font-size: clamp(3rem, 8vw, 5rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__num .unit { color: var(--accent); }
.stat__label { margin-top: 0.9rem; font-size: 1.05rem; color: var(--ink-muted); max-width: 30ch; }

/* ============================================================
   7 · CLOSE
   ============================================================ */
.close { text-align: left; }
.close__h { font-size: var(--step-h2); font-weight: 500; letter-spacing: -0.03em; max-width: 16ch; }
.close__link {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 2rem;
  font-size: var(--step-lead); font-weight: 500;
  border-bottom: 2px solid var(--accent); padding-bottom: 3px;
  transition: gap 260ms var(--ease-expo);
}
.close__link:hover { gap: 0.95rem; }

/* ============================================================
   HERO MOTION (homepage-specific; generic reveals are in base.css)
   ============================================================ */
.motion-ready .hero__title .line.reveal { opacity: 1; transform: none; overflow: hidden; padding-bottom: 0.08em; }
.motion-ready .hero__title .line__inner { transform: translateY(118%); transition: transform 950ms var(--ease-expo); }
.motion-ready .hero__title .line.is-visible .line__inner { transform: none; }
.motion-ready .hero__title .line[data-delay="2"] .line__inner { transition-delay: 130ms; }

.motion-ready .hero__rule { transform: scaleX(0); }
.motion-ready .hero__rule.is-visible { transform: scaleX(1); transition: transform 1100ms var(--ease-expo) 300ms; }

/* The sparkler (cast light + firework particles) is fully JS-driven;
   .is-lit just marks the drawn/rest state. Core stays sharp and hot. */

@media (prefers-reduced-motion: reduce) {
  .motion-ready .hero__title .line__inner,
  .motion-ready .hero__rule,
  .motion-ready .hero__rule.is-visible { opacity: 1; transform: none; transition: none; }
  /* Mark: final drawn state, no travel, no sparks — just a soft static ember */
  .hero__mark .hero__cast { opacity: 0.18; }
  .hero__mark .hero__sparks { display: none; }
}

