/* ============================================================
   LEC ENERsim — landing page
   Professional engineering-SaaS aesthetic. Vanilla CSS, mobile-first.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face { font-family: "Sora"; src: url("../fonts/sora-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --ink: #0C2230;          /* primary dark section bg (deep navy-teal) */
  --ink-2: #081823;        /* darker (footer / deep) */
  --ink-card: #12303f;     /* dark card surface */
  --light: #FFFFFF;        /* primary light bg */
  --light-2: #F4F6F8;      /* cool light grey bg */
  --line: #E2E8EC;         /* light borders */
  --line-dark: rgba(255,255,255,0.10);

  /* Brand */
  --brand: #1C6E8C;        /* primary blue-teal (matches product) */
  --brand-deep: #14506B;
  --brand-soft: #E7F0F3;
  --accent: #3E9C7E;       /* restrained green, used sparingly */

  /* Text */
  --tx-light: #E8EEF2;
  --tx-light-dim: rgba(232,238,242,0.62);
  --tx-dark: #0C2230;
  --tx-dark-dim: #5A6B75;

  /* Scale — consistent spacing rhythm */
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 56px);
  --sp-section: clamp(80px, 10vw, 140px);   /* vertical section padding */
  --sp-head: clamp(40px, 5vw, 64px);        /* head → body gap */
  --sp-gap: clamp(24px, 4vw, 56px);         /* grid gaps */
  --sp-stack: 1.25rem;                      /* default vertical rhythm */

  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px -32px rgba(12, 34, 48, 0.35);
  --shadow-dark: 0 30px 70px -34px rgba(0, 0, 0, 0.6);

  --font-display: "Sora", "Inter", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--tx-light);
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: var(--sp-section); }
.section--light { background: var(--light); color: var(--tx-dark); }
.section--light.alt { background: var(--light-2); }
.section--dark { background: var(--ink); color: var(--tx-light); }

.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
.h-section { font-size: clamp(1.9rem, 4.4vw, 3.4rem); line-height: 1.06; font-weight: 600; }

.eyebrow {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 0.9rem;
}
.section--dark .eyebrow { color: #6FB4C7; }
.section__head { max-width: 760px; margin-bottom: var(--sp-head); }
.section__head .h-section { margin-bottom: 1rem; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--tx-dark-dim); line-height: 1.7; }
.section--dark .lead { color: var(--tx-light-dim); }

/* ---------- Pills (subtle, monochrome) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.6rem; }
.pill {
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 6px 13px; border-radius: 6px;
  color: var(--tx-light); background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  padding: 13px 22px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--solid { background: var(--brand); color: #fff; }
.btn--solid:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn--glass { background: rgba(255,255,255,0.06); color: var(--tx-light); border-color: rgba(255,255,255,0.22); }
.btn--glass:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.section--light .btn--glass { background: #fff; color: var(--tx-dark); border-color: var(--line); }
.section--light .btn--glass:hover { border-color: var(--brand); color: var(--brand); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 24, 35, 0.85); backdrop-filter: blur(12px);
  border-bottom-color: var(--line-dark);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.nav__logo { display: inline-flex; align-items: center; gap: 9px; font-size: 1.14rem; color: var(--tx-light); font-family: var(--font-display); }
.nav__logo-mark { color: var(--brand); display: inline-flex; }
.nav.is-scrolled .nav__logo-mark, .footer .nav__logo-mark { color: #6FB4C7; }
.nav__logo-text strong { font-weight: 700; }
.nav__logo-text { font-weight: 500; letter-spacing: 0.01em; }
.nav__links { display: none; margin-left: auto; gap: 26px; }
.nav__links a { font-size: 0.92rem; color: var(--tx-light-dim); transition: color 0.2s; }
.nav__links a:hover { color: var(--tx-light); }
.nav__cta { display: none; }
.nav__burger { margin-left: auto; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; background: none; border: 0; cursor: pointer; }
.nav__burger span { display: block; width: 24px; height: 2px; background: var(--tx-light); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__mobile {
  position: absolute; top: 72px; left: 0; right: 0;
  background: rgba(8, 24, 35, 0.98); backdrop-filter: blur(12px);
  display: grid; gap: 4px; padding: 16px var(--pad) 26px;
  border-bottom: 1px solid var(--line-dark);
  transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav.is-open .nav__mobile { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav__mobile a { padding: 12px 4px; font-size: 1.05rem; color: var(--tx-light); border-bottom: 1px solid var(--line-dark); }
.nav__mobile .btn { margin-top: 12px; justify-content: center; border-bottom: 0; }
@media (min-width: 920px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__burger { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,24,35,0.78) 0%, rgba(8,24,35,0.55) 45%, rgba(8,24,35,0.92) 100%),
    linear-gradient(90deg, rgba(8,24,35,0.85) 0%, rgba(8,24,35,0.2) 70%);
}
.hero__content { position: relative; z-index: 2; padding-top: 96px; padding-bottom: 110px; max-width: 920px; }
.hero__title { font-size: clamp(2.6rem, 6.6vw, 5.6rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 600; max-width: 18ch; }
.hero__sub { max-width: 56ch; margin: 1.5rem 0 2.1rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--tx-light-dim); }
.hero__sub strong { color: var(--tx-light); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tx-light-dim); }
.hero__scroll-line { width: 1px; height: 42px; background: linear-gradient(var(--brand), transparent); animation: scrollPulse 2s var(--ease) infinite; }
@keyframes scrollPulse { 0%,100% { opacity: 0.25; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid { display: grid; gap: var(--sp-gap); align-items: center; }
.about__text .lead { margin: 1.2rem 0 1.6rem; }
.about__list { display: grid; gap: 12px; }
.about__list li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--tx-dark); }
.dot { width: 7px; height: 7px; border-radius: 2px; background: var(--brand); flex: none; }
.about__media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.about__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
@media (min-width: 880px) { .about__grid { grid-template-columns: 1.05fr 1fr; } }

/* ============================================================
   PILLARS
   ============================================================ */
.pillars__head { max-width: 720px; margin-bottom: var(--sp-head); }
.pillars__intro { color: var(--tx-light-dim); margin-top: 1rem; }
.pillars__track { display: grid; gap: var(--sp-section); }
.pillar { display: grid; gap: var(--sp-gap); align-items: center; }
.pillar__media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-dark); }
.pillar__media img { width: 100%; aspect-ratio: 5/4; object-fit: cover; }
.pillar__tag { position: absolute; top: 14px; left: 14px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; padding: 5px 10px; border-radius: 6px; background: rgba(8,24,35,0.7); backdrop-filter: blur(6px); border: 1px solid var(--line-dark); color: var(--tx-light); }
.pillar__num { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; color: var(--brand); letter-spacing: 0.06em; }
.section--dark .pillar__num { color: #6FB4C7; }
.pillar__text h3 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0.5rem 0 0.8rem; font-weight: 600; letter-spacing: -0.02em; }
.pillar__text p { color: var(--tx-light-dim); max-width: 46ch; }
@media (min-width: 880px) {
  .pillar { grid-template-columns: 1.1fr 1fr; }
  .pillar:nth-child(even) .pillar__media { order: 2; }
}

/* ============================================================
   SERVICES
   ============================================================ */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card {
  background: var(--light); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.section--light.alt .card { background: #fff; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #C9D6DD; }
.card__icon { width: 42px; height: 42px; border-radius: 9px; display: grid; place-content: center; margin-bottom: 16px; background: var(--brand-soft); color: var(--brand); }
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; color: var(--tx-dark); font-weight: 600; }
.card p { color: var(--tx-dark-dim); margin: 0; font-size: 0.98rem; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   PRODUCT (dashboard mockup)
   ============================================================ */
.product__grid { display: grid; gap: var(--sp-gap); align-items: center; }
.product__text .lead { margin-top: 1.2rem; }
.product__list { display: grid; gap: 12px; margin-top: 1.6rem; }
.product__list li { display: flex; gap: 12px; align-items: flex-start; color: var(--tx-light-dim); }
.product__list svg { flex: none; margin-top: 3px; color: #6FB4C7; }
@media (min-width: 960px) { .product__grid { grid-template-columns: 0.9fr 1.1fr; } }

/* Dashboard mock */
.dash {
  background: #fff; border-radius: var(--radius); overflow: hidden; color: var(--tx-dark);
  border: 1px solid var(--line-dark); box-shadow: var(--shadow-dark);
  font-size: 13px;
}
.dash__top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--light-2); }
.dash__dots { display: flex; gap: 6px; }
.dash__dots span { width: 10px; height: 10px; border-radius: 50%; background: #D4DCE1; }
.dash__title { font-weight: 600; color: var(--tx-dark); font-size: 12px; }
.dash__tabs { margin-left: auto; display: flex; gap: 16px; color: var(--brand); font-weight: 600; font-size: 11px; letter-spacing: 0.06em; }
.dash__tabs span:last-child { color: var(--tx-dark-dim); }
.dash__body { display: grid; grid-template-columns: 150px 1fr; min-height: 320px; }
.dash__side { border-right: 1px solid var(--line); padding: 14px 0; background: #fff; }
.dash__side a { display: block; padding: 7px 18px; color: var(--tx-dark-dim); font-size: 12px; }
.dash__side a.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; border-left: 2px solid var(--brand); }
.dash__main { padding: 20px 22px; }
.dash__h { font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.dash__table { width: 100%; border-collapse: collapse; margin-bottom: 22px; }
.dash__table th { text-align: left; font-size: 10px; letter-spacing: 0.08em; color: var(--tx-dark-dim); text-transform: uppercase; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.dash__table td { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.dash__table td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.dash__table td:nth-child(3) { text-align: left; padding-left: 18px; color: var(--tx-dark-dim); width: 96px; }
.dash__sankey { }
.dash__sankey-h { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.sankey { display: flex; align-items: stretch; height: 84px; gap: 0; font-size: 10px; color: var(--tx-dark-dim); }
.sankey__src { width: 8px; background: var(--brand); border-radius: 2px 0 0 2px; }
.sankey__flow { flex: 1; background: linear-gradient(90deg, rgba(28,110,140,0.22), rgba(28,110,140,0.10)); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.sankey__dst { width: 8px; background: #0C2230; border-radius: 0 2px 2px 0; }

/* ============================================================
   FEATURES (stats)
   ============================================================ */
.features { position: relative; overflow: hidden; }
.features__bg { position: absolute; inset: -8% 0; z-index: 0; }
.features__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.features__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,24,35,0.86), rgba(8,24,35,0.96)); }
.features__inner { position: relative; z-index: 2; }
.features__head { max-width: 720px; margin-bottom: var(--sp-head); }
.features__lead { color: var(--tx-light-dim); margin-top: 1rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { padding: 28px 24px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgba(255,255,255,0.03); }
.stat__num { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.2rem); color: #fff; letter-spacing: -0.02em; }
.stat__label { display: block; font-size: 0.86rem; color: var(--tx-light-dim); margin-top: 6px; }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } }

/* ============================================================
   EXAMPLE SYSTEMS
   ============================================================ */
.syslist { display: grid; gap: var(--sp-section); }
.sysrow { display: grid; gap: var(--sp-gap); align-items: center; }
.sysrow__media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.sysrow__media img { width: 100%; aspect-ratio: 16/11; object-fit: cover; transition: transform 0.6s var(--ease); }
.sysrow:hover .sysrow__media img { transform: scale(1.03); }
.sysrow__index { font-family: var(--font-display); color: var(--brand); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.06em; }
.sysrow__text h3 { font-size: clamp(1.5rem, 3vw, 2.3rem); color: var(--tx-dark); margin: 0.4rem 0 0.7rem; font-weight: 600; letter-spacing: -0.02em; }
.sysrow__text p { color: var(--tx-dark-dim); max-width: 46ch; }
@media (min-width: 820px) {
  .sysrow { grid-template-columns: 1.2fr 1fr; }
  .sysrow--rev .sysrow__media { order: 2; }
}

/* ============================================================
   PARTNERS
   ============================================================ */
.partners__grid { display: grid; gap: var(--sp-gap); align-items: center; }
.partners__media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-dark); box-shadow: var(--shadow-dark); }
.partners__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.partners__text .lead { margin-top: 1rem; }
.partners__text .lead strong { color: #6FB4C7; }
@media (min-width: 880px) { .partners__grid { grid-template-columns: 1fr 1.05fr; } }

/* ============================================================
   DEMO CTA
   ============================================================ */
.cta { position: relative; overflow: hidden; padding-block: clamp(96px, 13vw, 180px); }
.cta__media { position: absolute; inset: 0; z-index: 0; }
.cta__video, .cta__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,24,35,0.82), rgba(8,24,35,0.92)); }
.cta__inner { position: relative; z-index: 2; max-width: 720px; }
.cta__title { font-size: clamp(2.2rem, 5.5vw, 4.2rem); font-weight: 600; letter-spacing: -0.025em; }
.cta__sub { max-width: 52ch; margin: 1.1rem 0 1.9rem; color: var(--tx-light-dim); font-size: 1.12rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.quotes { display: grid; gap: 18px; grid-template-columns: 1fr; }
.quote { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.quote p { font-size: 1.05rem; color: var(--tx-dark); margin: 0 0 18px; line-height: 1.6; }
.quote footer { display: flex; align-items: center; gap: 11px; font-weight: 600; color: var(--tx-dark-dim); font-size: 0.88rem; }
.quote__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); border: 1px solid var(--line); flex: none; }
@media (min-width: 820px) { .quotes { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding-block: clamp(56px, 8vw, 88px) 30px; background: var(--ink-2); }
.footer__grid { display: grid; gap: 34px; grid-template-columns: 1fr; }
.footer__tag { color: var(--tx-light-dim); margin: 13px 0 0; max-width: 30ch; }
.footer__col h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6FB4C7; margin-bottom: 14px; }
.footer__col a, .footer__col p { display: block; color: var(--tx-light-dim); margin: 0 0 9px; transition: color 0.2s; font-size: 0.94rem; }
.footer__col a:hover { color: var(--tx-light); }
.footer__bar {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  font-size: 0.84rem; color: var(--tx-light-dim);
}
.footer__legal a { margin-left: 18px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

/* ============================================================
   REVEAL ANIMATIONS (JS adds .is-in)
   ============================================================ */
[data-reveal], [data-reveal-lines] .line, [data-reveal-stagger] > * {
  opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-in, [data-reveal-lines].is-in .line, [data-reveal-stagger].is-in > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-in > * { transition-delay: calc(var(--i, 0) * 80ms); }
[data-reveal-lines] .line { display: block; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-lines] .line, [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
  .hero__scroll-line { animation: none; }
}
