/* ==========================================================================
   Lesaki — cinematic sections
   Drop-in stylesheet for the Divi Code modules.
   Everything you would normally want to change lives in :root below.
   ========================================================================== */

:root {
  /* Colours ------------------------------------------------------------- */
  --lsk-paper:      #F6F3EC;  /* main warm paper background                */
  --lsk-paper-2:    #EEF1EA;  /* secondary band (science, grid)            */
  --lsk-paper-3:    #E6E9E2;  /* showcase backdrop behind the scenes       */
  --lsk-ink:        #16211D;  /* headlines, buttons, footer                */
  --lsk-accent:     #2E5F4F;  /* Lesaki green — eyebrows, italics, hovers  */
  --lsk-blue:       #1E4E82;  /* clinical blue — helix, science accents    */
  --lsk-amber:      #C67A33;  /* save badges, stars                        */

  /* Type ---------------------------------------------------------------- */
  --lsk-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --lsk-sans:  "Figtree", -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Layout -------------------------------------------------------------- */
  --lsk-max:   1400px;        /* content width                             */
  --lsk-pad:   24px;          /* horizontal gutter                         */
  --lsk-hdr:   98px;          /* header height — set by JS at runtime      */

  /* Scroll length of the pinned sections. Bigger = slower, more cinematic.
     Keep >= 200vh or the pinned scenes will feel rushed.                   */
  --lsk-hero-scroll:     240vh;
  --lsk-showcase-scroll: 460vh;
  --lsk-reviews-scroll:  340vh;
  --lsk-final-scroll:    200vh;
}

/* Reset only inside our sections so Divi's own styles are untouched ------- */
.lsk { font-family: var(--lsk-sans); color: var(--lsk-ink); box-sizing: border-box; }
.lsk *, .lsk *::before, .lsk *::after { box-sizing: border-box; }
.lsk img { display: block; max-width: 100%; }
.lsk a { color: inherit; text-decoration: none; }
.lsk p { margin: 0; }
.lsk h1, .lsk h2, .lsk h3 { margin: 0; font-weight: 400; }

/* Divi wraps Code modules in padded rows — these sections are full-bleed.
   Add the body class `lesaki-home` (see README) and this neutralises it.    */
body.lesaki-home .lsk-fullbleed .et_pb_row { width: 100%; max-width: none; padding: 0; }
body.lesaki-home .lsk-fullbleed .et_pb_column { margin: 0; width: 100%; }
body.lesaki-home .lsk-fullbleed.et_pb_section { padding: 0; }

/* --------------------------------------------------------------------------
   Shared pieces
   -------------------------------------------------------------------------- */
.lsk-eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 600; color: var(--lsk-accent);
}
.lsk-inner { position: relative; max-width: var(--lsk-max); margin: 0 auto; padding: 0 var(--lsk-pad); width: 100%; }

.lsk-btn {
  display: inline-block; background: var(--lsk-ink); color: var(--lsk-paper);
  padding: 16px 30px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: background .35s ease, color .35s ease;
}
.lsk-btn:hover { background: var(--lsk-accent); color: var(--lsk-paper); }
.lsk-btn--ghost { background: transparent; color: var(--lsk-ink); border: 1px solid rgba(22,33,29,.22); }
.lsk-btn--ghost:hover { background: transparent; color: var(--lsk-ink); border-color: var(--lsk-accent); }
.lsk-btn--sm { padding: 14px 26px; font-size: 13px; }

/* Scroll-reveal defaults. JS overwrites these every frame; if JS fails to
   load the content simply stays visible.                                    */
.lsk-r { will-change: transform, opacity, filter; }

/* --------------------------------------------------------------------------
   1 — HERO
   -------------------------------------------------------------------------- */
.lsk-hero { position: relative; height: var(--lsk-hero-scroll); background: var(--lsk-paper); }
.lsk-hero__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.lsk-hero__img { position: absolute; inset: -6%; will-change: transform, filter; }
.lsk-hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 74% center; }
.lsk-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(246,243,236,.97) 0%, rgba(246,243,236,.92) 30%,
    rgba(246,243,236,.55) 50%, rgba(246,243,236,0) 72%);
}
.lsk-hero__veil { position: absolute; inset: 0; background: var(--lsk-paper); opacity: 0; pointer-events: none; }
.lsk-hero__dots { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.lsk-hero__dot { position: absolute; border-radius: 50%; animation: lskPulse 6s ease-in-out infinite; }
.lsk-hero__content {
  position: relative; height: 100%; max-width: var(--lsk-max); margin: 0 auto;
  padding: var(--lsk-hdr) var(--lsk-pad) 0;
  display: flex; flex-direction: column; justify-content: center;
}
.lsk-hero__copy { max-width: 640px; will-change: transform, opacity; }
.lsk-hero__line { display: block; overflow: hidden; }
.lsk-hero__line > span { display: block; animation: lskRise 1.1s cubic-bezier(.2,.8,.2,1) both; }
.lsk-hero h1 {
  margin: 20px 0 0; font-family: var(--lsk-serif);
  font-size: clamp(46px, 8.2vw, 108px); line-height: .94; letter-spacing: -.02em;
}
.lsk-hero h1 em { font-style: italic; color: var(--lsk-accent); }
.lsk-hero__sub {
  margin-top: 26px; max-width: 440px; font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.6; color: rgba(22,33,29,.72); text-wrap: pretty;
  animation: lskFade 1s ease .7s both;
}
.lsk-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; animation: lskFade 1s ease .85s both; }
.lsk-hero__foot {
  position: absolute; bottom: 34px; left: var(--lsk-pad); right: var(--lsk-pad);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(22,33,29,.5); font-weight: 600; animation: lskFade 1s ease 1.1s both;
  will-change: transform, opacity;
}
.lsk-hero__foot span:last-child { text-align: right; letter-spacing: .14em; font-size: 12px; }

/* --------------------------------------------------------------------------
   2 — MARQUEE
   -------------------------------------------------------------------------- */
.lsk-marquee { background: var(--lsk-ink); color: #EFEDE5; padding: 18px 0; overflow: hidden; white-space: nowrap; }
.lsk-marquee__track {
  display: inline-flex; gap: 56px; padding-right: 56px;
  animation: lskMarquee 34s linear infinite;
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
}

/* --------------------------------------------------------------------------
   3 — SCIENCE + 3D DNA HELIX
   -------------------------------------------------------------------------- */
.lsk-science {
  padding: clamp(90px, 12vw, 170px) var(--lsk-pad);
  background: linear-gradient(180deg, var(--lsk-paper) 0%, var(--lsk-paper-2) 55%, var(--lsk-paper) 100%);
}
.lsk-science__grid {
  max-width: var(--lsk-max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 6vw, 90px); align-items: center;
}
.lsk-science h2 {
  margin-top: 22px; font-family: var(--lsk-serif);
  font-size: clamp(34px, 5vw, 68px); line-height: 1.02; letter-spacing: -.02em;
}
.lsk-science__body { margin-top: 24px; max-width: 480px; font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; color: rgba(22,33,29,.72); text-wrap: pretty; }
.lsk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; margin-top: 46px; }
.lsk-stat__n { font-family: var(--lsk-serif); font-size: clamp(38px, 4vw, 54px); line-height: 1; color: var(--lsk-accent); }
.lsk-stat__l { margin-top: 8px; font-size: 13px; line-height: 1.5; color: rgba(22,33,29,.62); }

.lsk-helix-wrap { position: relative; min-height: 440px; display: flex; align-items: center; justify-content: center; }
.lsk-helix-glow {
  position: absolute; width: min(420px, 80%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(200,214,201,.9), rgba(238,241,234,0) 70%);
  will-change: transform;
}
/* Real 3D: dots are placed on a cylinder with rotateY + translateZ and the
   whole strand spins in 3D space. Nodes are injected by lesaki.js.          */
.lsk-helix { position: relative; width: 200px; height: 430px; perspective: 900px; z-index: 2; }
.lsk-helix__spin { position: absolute; inset: 0; transform-style: preserve-3d; animation: lskSpin 18s linear infinite; }
.lsk-helix__dot, .lsk-helix__rung { position: absolute; left: 50%; top: 50%; }

/* --------------------------------------------------------------------------
   4 — PRODUCT SHOWCASE (pinned, scroll-scrubbed)
   -------------------------------------------------------------------------- */
.lsk-showcase { position: relative; height: var(--lsk-showcase-scroll); background: var(--lsk-paper-3); }
.lsk-showcase__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.lsk-scene { position: absolute; inset: 0; will-change: transform, opacity, filter; }
.lsk-scene img { width: 100%; height: 100%; object-fit: cover; }
.lsk-showcase__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(246,243,236,.55) 0%, rgba(246,243,236,0) 30%,
    rgba(246,243,236,0) 45%, rgba(246,243,236,.9) 100%);
}
.lsk-showcase__content {
  position: relative; height: 100%; max-width: var(--lsk-max); margin: 0 auto;
  padding: 0 var(--lsk-pad); display: flex; flex-direction: column; justify-content: space-between;
}
.lsk-showcase__top {
  padding-top: calc(var(--lsk-hdr) + 28px);
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
}
.lsk-showcase__top .lsk-eyebrow { color: var(--lsk-ink); }
.lsk-showcase__count { font-family: var(--lsk-serif); font-size: 40px; line-height: 1; color: var(--lsk-ink); }
.lsk-showcase__count small { opacity: .4; font-size: 20px; }
.lsk-showcase__stage { position: relative; min-height: 260px; padding-bottom: 64px; }
.lsk-scene-text { position: absolute; bottom: 64px; left: 0; right: 0; max-width: 560px; will-change: transform, opacity; }
.lsk-scene-text h3 {
  margin-top: 14px; font-family: var(--lsk-serif);
  font-size: clamp(34px, 5.4vw, 72px); line-height: .98; letter-spacing: -.02em;
}
.lsk-scene-text p { margin-top: 16px; max-width: 420px; font-size: clamp(15px, 1.4vw, 17px); line-height: 1.6; color: rgba(22,33,29,.75); }
.lsk-scene-text .lsk-btn { margin-top: 22px; }
.lsk-progress { position: absolute; bottom: 24px; left: 0; right: 0; height: 2px; background: rgba(22,33,29,.14); }
.lsk-progress__bar { height: 100%; width: 0; background: var(--lsk-accent); }

/* --------------------------------------------------------------------------
   5 — REVIEW RAIL (optional custom section — horizontal scrub)
   -------------------------------------------------------------------------- */
.lsk-rail { position: relative; height: var(--lsk-reviews-scroll); background: var(--lsk-paper); }
.lsk-rail__pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--lsk-hdr);
}
.lsk-rail__head { max-width: var(--lsk-max); margin: 0 auto 40px; padding: 0 var(--lsk-pad); width: 100%; }
.lsk-rail__head h2 { margin-top: 18px; font-family: var(--lsk-serif); font-size: clamp(30px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -.02em; }
.lsk-rail__track { display: flex; gap: clamp(16px, 2vw, 32px); padding: 40px var(--lsk-pad); will-change: transform; }
.lsk-review {
  flex: 0 0 auto; width: clamp(280px, 34vw, 460px); background: #fff;
  border-radius: 24px; padding: clamp(26px, 3vw, 42px);
  border: 1px solid rgba(22,33,29,.07); will-change: transform, opacity;
}
.lsk-review__stars { font-size: 15px; letter-spacing: .3em; color: var(--lsk-amber); }
.lsk-review__quote { margin-top: 20px; font-family: var(--lsk-serif); font-size: clamp(19px, 2vw, 27px); line-height: 1.32; letter-spacing: -.01em; text-wrap: pretty; }
.lsk-review__meta {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(22,33,29,.1);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lsk-review__meta b { font-size: 14px; font-weight: 600; }
.lsk-review__meta span { font-size: 12px; color: rgba(22,33,29,.5); text-align: right; }

/* --------------------------------------------------------------------------
   6 — FINAL CINEMATIC
   -------------------------------------------------------------------------- */
.lsk-final { position: relative; height: var(--lsk-final-scroll); }
.lsk-final__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.lsk-final__img { position: absolute; inset: -8%; will-change: transform; }
.lsk-final__img img { width: 100%; height: 100%; object-fit: cover; }
.lsk-final__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(246,243,236,.75) 0%, rgba(246,243,236,.1) 40%, rgba(255,255,255,.55) 100%);
}
.lsk-final__content {
  position: relative; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 0 var(--lsk-pad);
}
.lsk-final__content .lsk-eyebrow { color: var(--lsk-ink); }
.lsk-final h2 {
  margin-top: 22px; max-width: 15ch; font-family: var(--lsk-serif);
  font-size: clamp(40px, 7vw, 104px); line-height: .96; letter-spacing: -.025em;
}
.lsk-final__sub { margin-top: 22px; max-width: 520px; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.6; color: rgba(22,33,29,.75); }
.lsk-final__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.lsk-final__cta .lsk-btn--ghost { background: rgba(255,255,255,.7); }

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes lskRise   { from { opacity: 0; transform: translateY(115%); } to { opacity: 1; transform: translateY(0); } }
@keyframes lskFade   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lskMarquee{ from { transform: translateX(0); }  to { transform: translateX(-50%); } }
@keyframes lskSpin   { from { transform: rotateY(0deg); }  to { transform: rotateY(360deg); } }
@keyframes lskPulse  { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.35); opacity: .15; } }

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  :root {
    --lsk-hero-scroll:     220vh;
    --lsk-showcase-scroll: 420vh;
    --lsk-reviews-scroll:  300vh;
    --lsk-final-scroll:    180vh;
  }
  .lsk-hero__img img { object-position: 62% center; }
  .lsk-hero__scrim {
    background: linear-gradient(180deg, rgba(246,243,236,.96) 0%, rgba(246,243,236,.86) 42%, rgba(246,243,236,.25) 78%, rgba(246,243,236,0) 100%);
  }
  .lsk-hero__foot span:last-child { display: none; }
  .lsk-helix-wrap { min-height: 360px; }
  .lsk-helix { transform: scale(.82); }
  .lsk-showcase__count { font-size: 30px; }
  .lsk-scene-text { bottom: 40px; }
  .lsk-scene-text p { display: none; }   /* keep the pinned frame readable   */
}

@media (max-width: 600px) {
  :root { --lsk-pad: 18px; }
  .lsk-marquee__track { gap: 32px; font-size: 11px; }
  .lsk-hero__sub { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .lsk *, .lsk *::before, .lsk *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
