/* ============================================================
   seeri landing page — custom stylesheet
   Token reference: see SEEN/design.md §0.5 (brand) + §3 (color)

   Section index
   ─────────────
   1. Base + typography
   2. Brand primitives (rhombus, dot grid, vline grid, wordmark)
   3. Animations + reduced-motion fallback
   4. Anchor & focus utilities
   5. Section backgrounds (hero dashboard shadow, contact, why-us)
   6. Component states (FAQ chevron)
   7. Feature scrollytelling (07 · Feature)
   ============================================================ */


/* 1. Base + typography
   ──────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', 'Noto Sans Thai', system-ui, sans-serif;
  color: #0B0C10;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
.font-display { font-family: 'Poppins', 'Noto Sans Thai', system-ui, sans-serif; letter-spacing: -0.02em; }
.thai         { font-family: 'Noto Sans Thai', 'Poppins', system-ui, sans-serif; }
.wordmark     { font-family: 'Poppins', sans-serif; font-weight: 800; letter-spacing: -0.02em; }


/* 2. Brand primitives
   ──────────────────────────────────────────────────────────── */
.rhombus {
  display: inline-block;
  width: 1em; height: 1em;
  background: #62D300;
  transform: rotate(45deg);
  border-radius: 2px;
}
.rhombus-lg {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #84DE35 0%, #62D300 60%, #4FA800 100%);
  transform: rotate(45deg);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(98, 211, 0, 0.35);
}

/* Subtle dot grid (hero, meet-seeri dark bg) */
.dot-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Vertical line grid (feature section background) */
.vline-grid {
  background-image: linear-gradient(to right, rgba(11, 12, 16, 0.04) 1px, transparent 1px);
  background-size: 249px 100%;
}


/* 3. Animations + reduced-motion fallback
   ──────────────────────────────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track   { animation: marquee 28s linear infinite; }

/* Partner-logo marquee: continuous left-scroll. Track is duplicated in HTML
   so when track 1 fully scrolls out, track 2 takes over seamlessly. */
@keyframes partner-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
.partners-marquee .partners-track {
  animation: partner-scroll 30s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track,
  .partners-marquee .partners-track { animation: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
  }
}


/* 4. Anchor & focus utilities
   ──────────────────────────────────────────────────────────── */
/* Section anchor offset so sticky nav doesn't overlap when jumping via #id */
section[id] { scroll-margin-top: 96px; }

/* Consistent focus ring for keyboard users (brand lime) */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #62D300;
  outline-offset: 3px;
  border-radius: 6px;
}


/* 5. Section backgrounds
   ──────────────────────────────────────────────────────────── */

/* Hero (Figma node 33:137). Content-driven height; the composition (bg + ring
   + badge + icons) is image-based. The orbit is the last in-flow element, so the
   hero ends exactly at the ring's bottom edge — the blur band (absolute, bottom)
   therefore sits flush against the bottom of the ring, matching the design. */
.hero-bg {
  position: relative;
  background: #0B0C10 url("hero-bg.jpg") center center / cover no-repeat;
}

/* Hero headline — lime wordmark with a soft yellow bloom on the left (Figma 68:138) */
.hero-title {
  background-image:
    radial-gradient(60% 140% at 2% 50%, rgba(249, 219, 29, 0.55) 0%, rgba(249, 219, 29, 0) 55%),
    linear-gradient(90deg, #62D300 0%, #62D300 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Hero orbit stage — ring box (1144×836). On small screens it's sized by width;
   from lg up it's sized off the hero height so the whole hero stays on screen.
   Children are positioned in % of this box via inline left/top/width. */
.hero-orbit {
  width: min(94vw, 1100px);
  aspect-ratio: 1144 / 836;
  perspective: 1200px;        /* gives the pointer tilt real depth */
}
.hero-orbit > img { pointer-events: none; }

/* 3D pointer tilt / parallax — JS sets `transform`; CSS eases it back smoothly.
   Subtle by design; falls back to no motion when the user prefers reduced motion. */
.hero-tilt {
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .hero-orbit .floaty { animation: none !important; }
  .hero-tilt          { transition: none !important; transform: none !important; }
}

/* Hero progressive blur band (Figma node 70:996).
   ───────────────────────────────────────────────────────────
   Technique: stack 4 absolutely-positioned divs each with an
   increasing `backdrop-filter: blur()` value AND an offset
   `mask-image` linear-gradient. Because each higher layer covers
   the next, the visible blur strength grows from ~0 at the top
   of the band to maximum at the bottom — the classic
   "progressive blur" / "fractional blur" pattern.

   Layer | blur | mask transparent → opaque
   ──────┼──────┼──────────────────────────
     1   |  2px | 0% → 25%
     2   |  4px | 25% → 50%
     3   |  8px | 50% → 75%
     4   | 16px | 75% → 100%
*/
.hero-blur-band      { height: 56px; }
@media (min-width: 1280px) { .hero-blur-band { height: 140px; } }
.hero-blur-band .blur-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.blur-layer-1 {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 25%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 25%, #000 100%);
}
.blur-layer-2 {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(to bottom, transparent 25%, #000 50%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 25%, #000 50%, #000 100%);
}
.blur-layer-3 {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(to bottom, transparent 50%, #000 75%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 50%, #000 75%, #000 100%);
}
.blur-layer-4 {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  mask-image: linear-gradient(to bottom, transparent 75%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 75%, #000 100%);
}

/* Dark veil intensifies toward the bottom — completes the fade into the next
   (smoky) section. Sits on top of the blur stack but below the page seam. */
.blur-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 12, 16, 0)    0%,
    rgba(11, 12, 16, 0.30) 50%,
    rgba(11, 12, 16, 0.85) 100%
  );
  pointer-events: none;
}

/* Hero bottom gradient: hero ends in pure smoky to blend seamlessly into the
   next (also dark) partner-logo section — no visible seam between sections. */
.hero-bottom-fade {
  background: linear-gradient(to bottom, rgba(11, 12, 16, 0) 0%, #0B0C10 100%);
}

/* Contact section — lime + yellow + dark-green radial gradients (Figma spec) */
.contact-bg {
  background:
    radial-gradient(ellipse at 12% 100%, rgba(249, 219, 29, 0.55) 0%, rgba(249, 219, 29, 0) 45%),
    radial-gradient(ellipse at 100%  0%, rgba(35,  96,  20, 0.55) 0%, rgba(35,  96,  20, 0) 50%),
    #62D300;
}

/* Why-us photo: transparent Figma asset + CSS overlay matching Figma spec
   layers (top to bottom):
     - lime radial at top-right
     - yellow radial at bottom-right
     - dark linear (75% opacity smoky)
     - raw office photo */
.whyus-photo {
  background-image:
    radial-gradient(ellipse at 100% 80%, rgba(249, 219, 29, 0.30) 0%, rgba(249, 219, 29, 0) 45%),
    radial-gradient(ellipse at  95% 25%, rgba(98, 211,  0, 0.40) 0%, rgba(98, 211,  0, 0) 55%),
    linear-gradient(90deg, rgba(11, 12, 16, 0.75) 0%, rgba(11, 12, 16, 0.75) 100%),
    url("whyus-photo-raw.png");
  background-size: cover, cover, cover, cover;
  background-position: center;
}


/* 6. Component states
   ──────────────────────────────────────────────────────────── */

/* FAQ accordion chevron rotation */
details[open] summary .chev { transform: rotate(180deg); }
.chev { transition: transform 0.2s; }


/* 7. Feature scrollytelling (07 · Feature) — Figma 149:398 mechanic
   ────────────────────────────────────────────────────────────
   .features-pin = outer container, N × 100vh tall on desktop.
   Inner .sticky pins to viewport for the duration.
   JS translates the LEFT text track upward via scroll progress
   and cross-fades the RIGHT image to the active step. */
.features-pin   { height: 400vh; }   /* 4 steps × 1 viewport each */
.features-track { transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

/* Image fade — JS toggles .active class */
.feature-img       { opacity: 0; transition: opacity 0.5s ease; }
.feature-img.active { opacity: 1; }

/* Step indicator dot — active state widens */
.step-dot.active {
  width: 2rem;
  background-color: #62D300;
}

/* Reduced-motion: bail out of scroll-jacking, fall back to natural vertical scroll */
@media (prefers-reduced-motion: reduce) {
  .features-pin                       { height: auto !important; }
  .features-pin .sticky               { position: static !important; height: auto !important; }
  .features-pin .features-track       { position: static !important; transform: none !important; }
  .features-pin .feature-step         { height: auto !important; padding: 3rem 0; }
  .features-pin .feature-img          { opacity: 1 !important; position: static !important; margin-bottom: 2rem; }
}


/* 8. Feature & Function — light layout: fixed grid bg + fading steps
   ──────────────────────────────────────────────────────────── */
/* Decorative fixed background: white with a faint lime grid that fades
   in from the right, plus a soft lime glow. Does not scroll (sticky parent). */
.feature-grid-bg {
  background: #FFFFFF url("feature-BG.png") no-repeat center / cover;
}

/* Cross-fading transparent screenshots — floating, un-cropped, shadowed */
.feature-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .8s ease;
  filter: drop-shadow(0 24px 50px rgba(11, 12, 16, 0.16));
}
.feature-bg-img.active { opacity: 1; }

/* Each info step fades in/out — opacity & transform are set inline by JS */
.feature-info { will-change: opacity, transform; }

/* Reduced-motion: keep every step fully visible (JS also forces opacity 1) */
@media (prefers-reduced-motion: reduce) {
  .feature-info    { opacity: 1 !important; transform: none !important; }
  .feature-bg-img  { transition: none !important; }
}


/* 9. Micro-interactions
   ────────────────────────────────────────────────────────────
   Hidden/entrance states are gated behind `.js-anim` (set on <html>
   by an inline head script). With JS off, everything stays visible —
   no flash of hidden content, no lost copy. */

/* Scroll reveal — fade + rise as the element enters the viewport */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.js-anim .reveal.in { opacity: 1; transform: none; }

/* Directional reveal variants — used by the alternating feature rows */
.js-anim .reveal.from-left  { transform: translateX(-44px); }
.js-anim .reveal.from-right { transform: translateX(44px); }
.js-anim .reveal.from-left.in,
.js-anim .reveal.from-right.in { transform: none; }

/* Staggered groups — direct children rise in sequence (JS sets per-child delay) */
.js-anim [data-stagger] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.js-anim [data-stagger] > *.in { opacity: 1; transform: none; }

/* Hero entrance — fades up on first load (per-element delay set inline) */
@keyframes heroRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.js-anim .hero-rise { opacity: 0; animation: heroRise .85s cubic-bezier(.2, .7, .2, 1) both; }

/* Animated underline on top-nav menu links only (not the logo or CTA) */
header nav ul a            { position: relative; }
header nav ul a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  height: 2px; width: 0; background: #62D300; border-radius: 2px;
  transition: width .25s ease;
}
header nav ul a:hover::after { width: 100%; }

/* Arrow slides right on hover for any CTA ending in an arrow */
.ti-arrow-right { transition: transform .2s ease; }
a:hover .ti-arrow-right,
button:hover .ti-arrow-right { transform: translateX(3px); }

/* Tactile press feedback on lime / smoky CTAs */
a[class*="bg-lime"]:active,
a[class*="bg-smoky"]:active { transform: translateY(0) scale(.97); }

/* Gentle float on the hero dashboard / symbol */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.floaty { animation: floaty 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal,
  .js-anim [data-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js-anim .hero-rise         { opacity: 1 !important; animation: none !important; }
  .floaty                     { animation: none !important; }
  .ti-arrow-right             { transition: none !important; }
  .feature-panel              { transition: none !important; }
}

/* Hide scrollbar — mobile carousels */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }


/* Break-section marquee (Figma 67:94) — ghosted gradient words + lime rhombus */
.marquee-word {
  /* Glass text — exact conversion of Figma 67:94:
     transparent text clipped over (10% flat white) + (25% lime glow from the bottom-centre) */
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image:
    radial-gradient(62% 58% at 50% 80%, rgba(98, 211, 0, 0.25) 0%, rgba(98, 211, 0, 0) 100%),
    linear-gradient(rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.10));
  -webkit-background-clip: text;
          background-clip: text;
}
.marquee-rhombus {
  flex: none;
  width: 0.6em; height: 0.6em;
  background: linear-gradient(135deg, #84DE35 0%, #62D300 55%, #4FA800 100%);
  border-radius: 0.14em;
  transform: rotate(45deg);
  box-shadow: 0 0 24px rgba(98, 211, 0, 0.40);
}


/* 11. Meet SEEN — dust texture + module relationship tree (Figma 45:46)
   ────────────────────────────────────────────────────────────
   Asset Management is the base module; the other three are add-ons. On scroll
   the centre circle appears first, then the connector lines draw outward, then
   the add-on cards fade in. */

/* Fine dust/noise grain tiled over the dark section */
.meet-dust {
  background-image: url("meet-dust.png");
  background-repeat: repeat;
  background-size: 82px 61px;
  opacity: 0.45;
}

/* Central base module (Asset Management) */
.tree-circle {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(72vw, 280px); height: min(72vw, 280px);
  gap: 12px;
  box-shadow: 0 0 48px rgba(98, 211, 0, 0.25), inset 0 0 40px rgba(98, 211, 0, 0.08);
}
@media (min-width: 1024px) {
  .tree-circle { width: 280px; height: 280px; gap: 16px; padding: 24px; }
}

/* Connector lines — lime, translucent */
.tree-trunk { width: 2px; height: 40px; background: #62D300; opacity: 0.5; }
.tree-branch { position: relative; height: 52px; }
.tree-bus {
  position: absolute; top: 0; height: 2px;
  left: calc((100% - 8rem) / 6);
  right: calc((100% - 8rem) / 6);
  background: #62D300; opacity: 0.5;
}
.tree-drop {
  position: absolute; top: 0; width: 2px; height: 100%;
  background: #62D300; opacity: 0.5;
  transform: translateX(-50%);
}
.tree-drop-l { left: calc((100% - 8rem) / 6); }
.tree-drop-c { left: 50%; }
.tree-drop-r { left: calc(100% - (100% - 8rem) / 6); }

/* Add-on module card */
.tree-mod {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 40px 24px;
  text-align: center;
  border-top: 4px solid #62D300;
  background: linear-gradient(to bottom, rgba(98, 211, 0, 0.15), rgba(98, 211, 0, 0) 60%);
}
/* "+" add-on badge straddling the card's top border */
.mod-plus {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: #62D300; color: #0B0C10;
  border: 2px solid #0B0C10;
  font-size: 16px;
}
.mod-plus i { line-height: 1; }

/* ── Scroll-in sequence (gated behind .js-anim; .in added by observer) ── */
.js-anim .module-tree .tree-circle { opacity: 0; transform: scale(.92); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.js-anim .module-tree.in .tree-circle { opacity: 1; transform: none; }

.js-anim .module-tree .tree-trunk { transform: scaleY(0); transform-origin: top; transition: transform .35s ease .45s; }
.js-anim .module-tree.in .tree-trunk { transform: scaleY(1); }

.js-anim .module-tree .tree-bus { transform: scaleX(0); transform-origin: center; transition: transform .5s ease .8s; }
.js-anim .module-tree.in .tree-bus { transform: scaleX(1); }

.js-anim .module-tree .tree-drop { transform: translateX(-50%) scaleY(0); transform-origin: top; transition: transform .35s ease 1.2s; }
.js-anim .module-tree.in .tree-drop { transform: translateX(-50%) scaleY(1); }

.js-anim .module-tree .tree-mod { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.js-anim .module-tree.in .tree-mod { opacity: 1; transform: none; }
.js-anim .module-tree.in .tree-mod:nth-child(1) { transition-delay: 1.3s; }
.js-anim .module-tree.in .tree-mod:nth-child(2) { transition-delay: 1.42s; }
.js-anim .module-tree.in .tree-mod:nth-child(3) { transition-delay: 1.54s; }

.js-anim .module-tree .mod-plus { opacity: 0; transform: translateX(-50%) scale(0); transition: opacity .3s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.js-anim .module-tree.in .mod-plus { opacity: 1; transform: translateX(-50%) scale(1); }
.js-anim .module-tree.in .tree-mod:nth-child(1) .mod-plus { transition-delay: 1.6s; }
.js-anim .module-tree.in .tree-mod:nth-child(2) .mod-plus { transition-delay: 1.7s; }
.js-anim .module-tree.in .tree-mod:nth-child(3) .mod-plus { transition-delay: 1.8s; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .module-tree * { transition: none !important; }
  .js-anim .module-tree .tree-circle,
  .js-anim .module-tree .tree-mod   { opacity: 1 !important; transform: none !important; }
  .js-anim .module-tree .tree-trunk,
  .js-anim .module-tree .tree-bus   { transform: none !important; }
  .js-anim .module-tree .tree-drop,
  .js-anim .module-tree .mod-plus   { opacity: 1 !important; transform: translateX(-50%) !important; }
}


/* 12. Meet SEEN — mobile variant (Figma 2058:1198)
   ────────────────────────────────────────────────────────────
   One combined panel: a single top border + "+" badge, with the three add-on
   modules stacked inside, separated by plain "+" glyphs. */
.tree-line-m { width: 2px; height: 80px; background: #62D300; opacity: 0.5; }
.tree-panel {
  position: relative; width: 100%;
  border-top: 4px solid #62D300;
  background: linear-gradient(to bottom, rgba(98, 211, 0, 0.15), rgba(98, 211, 0, 0) 60%);
  padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.tree-mrow { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.tree-sep  { color: #62D300; opacity: 0.7; font-size: 24px; line-height: 1; }

/* Mobile draw-in: line draws, then the panel fades up, then the badge pops */
.js-anim .module-tree .tree-line-m { transform: scaleY(0); transform-origin: top; transition: transform .4s ease .45s; }
.js-anim .module-tree.in .tree-line-m { transform: scaleY(1); }
.js-anim .module-tree .tree-panel { opacity: 0; transform: translateY(16px); transition: opacity .55s ease .9s, transform .55s cubic-bezier(.2,.7,.2,1) .9s; }
.js-anim .module-tree.in .tree-panel { opacity: 1; transform: none; }
.js-anim .module-tree.in .tree-panel .mod-plus { transition-delay: 1.2s; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .module-tree .tree-line-m { transform: none !important; }
  .js-anim .module-tree .tree-panel  { opacity: 1 !important; transform: none !important; }
}
