/* =========================
   SunSync Website - styles.css (REWRITE v6)
   Seamless LED flow (NO reverse, NO snap) on Feature page only
   - Keeps your current layout/behaviour
   - Keeps fixed glow overlay (band fix)
   - Keeps .page-app hero top-aligned
   - Keeps Team premium cards
   - Keeps mobile nav scroll styling
   ========================= */

/* =========================
   Tokens
   ========================= */
:root{
  --bg: #0b1c2c;
  --bg-2: #071521;

  --text: #f8fafc;
  --muted: #94a3b8;

  --warm-1: #ff9e2c;
  --warm-2: #ffd166;

  --cool-1: #38bdf8;
  --cool-2: #0ea5e9;

  --radius: 16px;
  --shadow: 0 18px 60px rgba(0,0,0,0.35);

  --stroke-08: rgba(255,255,255,0.08);
  --stroke-10: rgba(255,255,255,0.10);
  --stroke-12: rgba(255,255,255,0.12);
  --stroke-14: rgba(255,255,255,0.14);
  --stroke-18: rgba(255,255,255,0.18);

  --glass-04: rgba(255,255,255,0.04);
  --glass-05: rgba(255,255,255,0.05);
  --glass-06: rgba(255,255,255,0.06);
  --glass-07: rgba(255,255,255,0.07);

  --max: 1320px;
}

/* =========================
   Base reset
   ========================= */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
html{ background: var(--bg-2); }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  line-height: 1.5;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  position: relative;
}

a{ color: inherit; text-decoration: none; }
img{ display: block; max-width: 100%; }

/* Fixed glow overlay (prevents visible colour band) */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 18% 0%, rgba(255,158,44,0.18), transparent 55%),
    radial-gradient(900px 520px at 82% 0%, rgba(56,189,248,0.16), transparent 55%);
}

/* Skip link */
.skip{
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--text);
  color: #000;
  padding: 8px 12px;
  border-radius: 10px;
}
.skip:focus{ left: 12px; z-index: 9999; }

/* =========================
   Container
   ========================= */
.container{
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 10px;
}
@media (min-width: 768px){ .container{ padding: 0 14px; } }
@media (min-width: 1200px){ .container{ padding: 0 16px; } }

/* =========================
   Header / Nav
   ========================= */
header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(7,21,33,0.55);
  border-bottom: 1px solid var(--stroke-08);
}

.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand{
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.brand img{
  width: clamp(80px, 6vw, 130px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(255,158,44,0.26));
}

.brand .name{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand .name strong{
  font-size: 14px;
  letter-spacing: 0.4px;
}
.brand .name span{
  font-size: 12px;
  color: var(--muted);
}

.navlinks{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.navlinks a{
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.navlinks a:hover{
  transform: translateY(-1px);
  background: var(--glass-06);
  border-color: var(--stroke-12);
}

.navlinks a.active{
  background: linear-gradient(90deg, rgba(255,158,44,0.20), rgba(56,189,248,0.16));
  border-color: var(--stroke-18);
}

.actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.menuBtn{ display: none; }

/* =========================
   Buttons
   ========================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke-14);
  background: var(--glass-05);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  background: var(--glass-07);
  border-color: rgba(255,255,255,0.20);
}

.btn.primary{
  border: none;
  background: linear-gradient(90deg, var(--warm-1), var(--warm-2));
  color: #08121c;
  box-shadow: 0 18px 55px rgba(255,158,44,0.22);
}
.btn.primary:hover{ box-shadow: 0 22px 70px rgba(255,158,44,0.30); }

.btn.secondary{
  border: none;
  background: linear-gradient(90deg, var(--cool-1), var(--cool-2));
  color: #03101a;
  box-shadow: 0 18px 55px rgba(56,189,248,0.20);
}
.btn.secondary:hover{ box-shadow: 0 22px 70px rgba(56,189,248,0.28); }

/* =========================
   Hero
   ========================= */
.hero{ padding: 34px 0 18px; }

.heroGrid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: center;
}

/* App Overview: align hero columns to top */
.page-app .heroGrid{ align-items: start; }

.kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke-14);
  background: var(--glass-05);
  font-size: 12px;
  color: rgba(248,250,252,0.92);
}

.kicker .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--warm-1), var(--cool-1));
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.25);
}

h1{
  font-size: clamp(30px, 4.3vw, 52px);
  margin: 14px 0 10px;
  letter-spacing: -0.02em;
}

.lead{
  color: var(--muted);
  font-size: 16px;
  max-width: 65ch;
  margin: 0;
}

.heroBtns{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Shared surface look */
.card,
.panel,
.heroCard,
.teamCard{
  border: 1px solid var(--stroke-12);
  background: var(--glass-05);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Right hero card */
.heroCard{
  padding: 16px;
  position: relative;
  overflow: hidden;
  border-color: var(--stroke-14);
}

.heroCard::before{
  content: "";
  position: absolute;
  inset: -90px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,158,44,0.22), transparent 42%),
    radial-gradient(circle at 82% 20%, rgba(56,189,248,0.18), transparent 48%);
  pointer-events: none;
}

.heroCardInner{ position: relative; z-index: 1; }

.statRow{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.stat{
  border: 1px solid var(--stroke-12);
  border-radius: 14px;
  padding: 12px;
  background: var(--glass-05);
}

.stat .big{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.stat .small{
  font-size: 12px;
  color: var(--muted);
}

/* =========================
   Sections / Cards
   ========================= */
.section{ padding: 22px 0 42px; }

.section h2{
  font-size: 22px;
  margin: 0 0 12px;
}
.section p{
  color: var(--muted);
  margin: 0 0 18px;
}

.grid3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card{ padding: 16px; }

.card h3{
  margin: 0 0 8px;
  font-size: 16px;
}
.card p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--glass-06);
  border: 1px solid var(--stroke-10);
  margin-bottom: 10px;
}

.split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel{ padding: 18px; }

.panel.warm{
  background:
    radial-gradient(650px 290px at 10% 0%, rgba(255,158,44,0.22), transparent 60%),
    var(--glass-05);
}
.panel.cool{
  background:
    radial-gradient(650px 290px at 90% 0%, rgba(56,189,248,0.18), transparent 60%),
    var(--glass-05);
}

.list{
  padding-left: 18px;
  margin: 10px 0 0;
  color: var(--muted);
}
.list li{ margin: 8px 0; }

/* Specs key/value */
.kv{
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px 14px;
}
.kv div{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke-10);
  background: var(--glass-04);
}
.kv .k{ font-weight: 700; color: rgba(248,250,252,0.92); }
.kv .v{ color: var(--muted); }

/* =========================
   Footer
   ========================= */
.footer{
  padding: 22px 0 30px;
  border-top: 1px solid var(--stroke-08);
  background: rgba(7,21,33,0.35);
}

.footerGrid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.footer small{ color: var(--muted); }

.footerLinks{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footerLinks a{
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke-10);
  background: var(--glass-04);
}
.footerLinks a:hover{ background: var(--glass-06); }

/* =========================
   Responsive
   ========================= */
@media (max-width: 920px){
  .heroGrid{ grid-template-columns: 1fr; }
  .grid3{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .footerGrid{ grid-template-columns: 1fr; }
  .footerLinks{ justify-content: flex-start; }

  .menuBtn{ display: inline-flex; }

  .navlinks{
    display: none;
    width: 100%;
    padding: 10px 0 4px;
  }
  .navlinks.open{ display: flex; }

  .brand img{
    width: clamp(64px, 12vw, 92px);
  }
}

/* =========================
   App Overview additions
   ========================= */
.appH1{
  font-size: clamp(30px, 4.3vw, 52px);
  margin: 14px 0 10px;
  letter-spacing: -0.02em;
}

.phoneRow{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.phoneMock{
  border-radius: 18px;
  border: 1px solid var(--stroke-14);
  background: var(--glass-05);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 240px;
}

.phoneMock.cool{
  background:
    radial-gradient(420px 220px at 80% 10%, rgba(56,189,248,0.18), transparent 60%),
    var(--glass-05);
}

.phoneTop{
  height: 36px;
  background: rgba(0,0,0,0.18);
  border-bottom: 1px solid var(--stroke-10);
}

.phoneScreen{ padding: 12px; }

.miniTitle{
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.miniPill{
  display: inline-flex;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke-12);
  background: var(--glass-06);
  color: rgba(248,250,252,0.92);
  margin-bottom: 10px;
}

.miniCard{
  border-radius: 14px;
  border: 1px solid var(--stroke-12);
  background: var(--glass-05);
  padding: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 920px){
  .phoneRow{ grid-template-columns: 1fr; }
}

/* =========================
   Mobile optimisation
   ========================= */
@media (max-width: 768px){

  .container{ padding: 0 12px; }

  .nav{
    flex-wrap: wrap;
    gap: 10px;
  }

  .navlinks{
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .navlinks a{
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 8px;
  }

  .brand img{
    height: 48px;
    width: auto;
  }

  .heroGrid{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero{ padding: 24px 0 10px; }

  .heroTitleImg{ max-width: 100%; }

  .heroBtns{
    flex-direction: column;
    align-items: stretch;
  }

  .btn{ width: 100%; }

  .grid3{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }

  .heroCard{ padding: 14px; }

  .statRow{ grid-template-columns: 1fr; }

  .footerGrid{
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footerLinks{ justify-content: flex-start; }
}

/* Nav scrollbar styling */
.navlinks::-webkit-scrollbar{ height: 4px; }
.navlinks::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}

/* =========================
   Team page (premium cards)
   ========================= */
.teamGrid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.teamCard{
  padding: 16px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.teamCard:hover{
  transform: translateY(-2px);
  border-color: var(--stroke-18);
  background: var(--glass-06);
}

.teamTop{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -0.02em;
  border: 1px solid var(--stroke-14);
  background: var(--glass-06);
}

.avatar.warm{
  background: linear-gradient(135deg, rgba(255,158,44,0.35), rgba(255,209,102,0.16));
  border-color: rgba(255,158,44,0.28);
}

.avatar.cool{
  background: linear-gradient(135deg, rgba(56,189,248,0.30), rgba(14,165,233,0.14));
  border-color: rgba(56,189,248,0.26);
}

.teamMeta h3{
  margin: 0;
  font-size: 16px;
}

.primaryRole{
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chipRow{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke-12);
  background: var(--glass-05);
  color: rgba(248,250,252,0.92);
}

.chip.warm{
  border-color: rgba(255,158,44,0.26);
  background: rgba(255,158,44,0.12);
}

.chip.cool{
  border-color: rgba(56,189,248,0.24);
  background: rgba(56,189,248,0.12);
}

@media (max-width: 920px){
  .teamGrid{ grid-template-columns: 1fr; }
}

/* =========================
   LED EDGE STRIP — Feature page only (SEAMLESS LOOP, NO REVERSE, NO SNAP)
   - Add <body class="page-features"> on FeatureOverview page
   - No bottom edge
   - Uses repeating gradient so the start/end match seamlessly
   ========================= */
.page-features{
  --ledGlow: 1;
  --ledOpacity: 0.95;
  --ledThickness: 3px;
  --ledBottomCut: 12px; /* removes bottom edge strip */
}

.page-features::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;

  /* Repeating gradient ensures seamless wrap when animating */
  background: repeating-linear-gradient(
    90deg,
    rgba(255,158,44,0.92) 0%,
    rgba(255,209,102,0.92) 12.5%,
    rgba(56,189,248,0.92) 25%,
    rgba(14,165,233,0.92) 37.5%,
    rgba(255,158,44,0.92) 50%,
    rgba(255,209,102,0.92) 62.5%,
    rgba(56,189,248,0.92) 75%,
    rgba(14,165,233,0.92) 87.5%,
    rgba(255,158,44,0.92) 100%
  );

  /* Make the pattern longer so movement feels smooth */
  background-size: 200% 200%;
  background-position: 0% 50%;
  animation: ledSeamless 8s linear infinite;

  /* Only show border region */
  padding: var(--ledThickness);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  /* Remove bottom edge strip */
  clip-path: inset(0 0 var(--ledBottomCut) 0);

  filter:
    drop-shadow(0 0 10px rgba(255,158,44, calc(0.45 * var(--ledGlow))))
    drop-shadow(0 0 10px rgba(56,189,248, calc(0.40 * var(--ledGlow))));

  opacity: var(--ledOpacity);
}

@keyframes ledSeamless{
  0%   { background-position: 0% 50%; }
  100% { background-position: -100% 50%; }
}
/* =========================
   MAKING OF (Apple-style timeline)
   ========================= */

.page-making .makingHero{
  align-items: start;
}

.makingProgress{
  position: sticky;
  top: 74px;               /* sits under your sticky header */
  height: 6px;
  border-radius: 999px;
  border: 1px solid var(--stroke-10);
  background: var(--glass-04);
  overflow: hidden;
  margin-bottom: 18px;
  z-index: 3;
}

.makingProgressFill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--warm-1), var(--cool-1));
  box-shadow: 0 0 22px rgba(56,189,248,0.25);
  transform-origin: left center;
}

.makingTimeline{
  position: relative;
  padding-left: 26px;
}

/* Timeline spine */
.makingTimeline::before{
  content:"";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(255,158,44,0.55),
    rgba(56,189,248,0.45)
  );
  opacity: 0.65;
  border-radius: 999px;
}

/* Each stage row */
.makingItem{
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
}

/* The dot */
.makingDot{
  position: absolute;
  left: 2px;
  top: 34px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--stroke-14);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 45%),
    linear-gradient(135deg, rgba(255,158,44,0.9), rgba(56,189,248,0.85));
  box-shadow:
    0 0 18px rgba(255,158,44,0.25),
    0 0 22px rgba(56,189,248,0.18);
}

/* Card + media */
.makingCard{
  padding: 18px;
}

.makingCard h3{
  margin: 0 0 8px;
  font-size: 18px;
}

.makingCard p{
  margin: 0;
  color: var(--muted);
}

.makingMeta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Use your chip styling, but make it slightly tighter here */
.page-making .chip{
  padding: 6px 10px;
  background: var(--glass-06);
}

.makingMedia{
  margin: 0;
  padding: 14px;
  border: 1px solid var(--stroke-12);
  background: var(--glass-05);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.makingMedia img{
  width: 100%;
  border-radius: 14px;
  display: block;
  border: 1px solid var(--stroke-10);
}

.makingMedia figcaption{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* CTA layout */
.makingCTA{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.makingCTAButtons{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* -------------------------
   Scroll reveal animation
   ------------------------- */
.reveal{
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  filter: blur(6px);
  transition:
    opacity .6s ease,
    transform .6s ease,
    filter .6s ease;
  will-change: transform, opacity, filter;
}

.reveal.in{
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* -------------------------
   Parallax media (subtle)
   ------------------------- */
.makingMedia{
  transform: translateY(var(--parallax, 0px));
  transition: transform .12s linear;
  will-change: transform;
}

/* Responsive */
@media (max-width: 920px){
  .makingItem{
    grid-template-columns: 1fr;
  }
  .makingProgress{
    top: 70px;
  }
}
.makingShot{
  border: 1px solid var(--stroke-12);
  background: var(--glass-05);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.makingShotTitle{
  font-weight: 700;
  margin-bottom: 6px;
}

.makingShotSub{
  color: var(--muted);
  font-size: 13px;
}
