/* ============================================================
   LiiCHT — Smart Energy, Smart Living
   Shared design system. Static, no build step, Hostinger-ready.
   ============================================================ */

/* ---- Fonts (Fontshare CDN) ---- */
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@500,600,700&f[]=satoshi@400,500,700&display=swap');

/* ---- Design tokens ---- */
:root {
  /* Brand — sampled from official LiiCHT logo */
  --brand:        #FD741E;
  --brand-bright: #FF8A3D;
  --brand-deep:   #D95A0C;
  --brand-glow:   rgba(253,116,30,.45);

  /* Dark energy-tech surfaces */
  --bg:        #0C0D10;
  --bg-2:      #121317;
  --surface:   #16181D;
  --surface-2: #1D2026;
  --border:    #2A2D35;
  --border-2:  #383C46;

  /* Text */
  --text:      #F4F3F0;
  --text-mut:  #A6A8B0;
  --text-faint:#6C6F79;

  /* Semantic */
  --success:   #6DAA45;

  /* Type */
  --font-display: 'General Sans', system-ui, sans-serif;
  --font-body: 'Satoshi', system-ui, -apple-system, sans-serif;

  /* Scale */
  --text-hero: clamp(2.6rem, 7vw, 5.6rem);
  --text-xxl:  clamp(2rem, 4.5vw, 3.4rem);
  --text-xl:   clamp(1.5rem, 3vw, 2.2rem);
  --text-lg:   1.25rem;
  --text-base: 1.0625rem;
  --text-sm:   0.9375rem;
  --text-xs:   0.8125rem;

  /* Spacing / layout */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 14px;
  --radius-lg: 22px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
  --t-int: 200ms var(--ease-out);

  --shadow-md: 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 70px -25px rgba(0,0,0,.75);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

::selection { background: var(--brand); color: #fff; }

/* Focus visibility (a11y) */
:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 700;
  font-size: var(--text-xs); letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--brand); border-radius: 2px;
}
.lead { color: var(--text-mut); font-size: var(--text-lg); max-width: 60ch; }
.muted { color: var(--text-mut); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---- Header / nav ---- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  transition: background var(--t-int), border-color var(--t-int), backdrop-filter var(--t-int);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(12,13,16,.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.brand-lockup { display: flex; align-items: center; gap: .7rem; }
.brand-lockup svg { height: 34px; width: auto; }
.brand-logo-img {
  display: block;
  width: auto;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(253,116,30,.16));
}
.site-footer .brand-logo-img { height: 72px; }
.brand-lockup .name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -.03em; color: var(--text);
}
.brand-lockup .name b { color: var(--brand); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; list-style: none; }
.nav-links a {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-mut);
  position: relative; padding: .3rem 0;
  transition: color var(--t-int);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-int);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm);
  padding: .8rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform var(--t-int), background var(--t-int), box-shadow var(--t-int), border-color var(--t-int), color var(--t-int);
}
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 8px 24px -8px var(--brand-glow);
}
.btn-primary:hover { background: var(--brand-bright); transform: translateY(-2px); box-shadow: 0 14px 34px -8px var(--brand-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-bright); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-2);
  border-radius: 10px; padding: .5rem; cursor: pointer; color: var(--text);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem;
}
.footer-grid h4 {
  font-family: var(--font-body); font-weight: 700; font-size: var(--text-xs);
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 1.1rem;
}
.footer-grid ul { list-style: none; display: grid; gap: .7rem; }
.footer-grid a, .footer-grid p { color: var(--text-mut); font-size: var(--text-sm); }
.footer-grid a { transition: color var(--t-int); }
.footer-grid a:hover { color: var(--brand-bright); }
.footer-brand p { max-width: 34ch; margin-top: 1rem; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--text-faint); font-size: var(--text-xs);
}

/* ---- Cards / grids ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  transition: transform var(--t-int), border-color var(--t-int), box-shadow var(--t-int);
}
.card .ic {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 1.3rem;
  background: linear-gradient(140deg, rgba(253,116,30,.18), rgba(253,116,30,.04));
  border: 1px solid rgba(253,116,30,.28); color: var(--brand-bright);
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { font-size: var(--text-lg); margin-bottom: .6rem; }
.card p { color: var(--text-mut); font-size: var(--text-sm); }
.card.link-card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow-md); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* ---- Section headers ---- */
.sec-head { max-width: 62ch; margin-bottom: 3rem; }
.sec-head h2 { font-size: var(--text-xxl); margin-bottom: 1rem; }

/* ============================================================
   Scroll reveal — opacity/clip only (no CLS). reduced-motion safe
   ============================================================ */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      opacity: 0;
      animation: reveal-fade linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
  }
}
@keyframes reveal-fade { to { opacity: 1; } }

/* JS fallback reveal for browsers without scroll-timeline */
.js-reveal { opacity: 0; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transform: translateY(18px); }
.js-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .reveal { opacity: 1 !important; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    flex-direction: column; align-items: flex-start; gap: 1.5rem;
    background: var(--bg-2); border-left: 1px solid var(--border);
    padding: 6rem 2rem 2rem; transform: translateX(100%);
    transition: transform .35s var(--ease-out); z-index: 90;
  }
  body.nav-open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 1.15rem; }
  .nav .btn { display: none; }
  .nav-scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none;
    transition: opacity .35s; z-index: 80;
  }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
