/* === Theme: Coolors palette ===
   Red: #e63946  | Off-white: #f1faee
   Teal: #a8dadc | Steel: #457b9d | Deep: #1d3557
*/

:root{
  --accent:#ffc300;         /* primary CTA, active nav */
  --accent-alt:#457b9d;     /* links, secondary accents */
  --text:#f1faee;
  --muted:#a8dadc;
  --border:#457b9d;
}

/* base */
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  line-height:1.6;
  background:radial-gradient(circle at 20% 0,#1d3557 0,#1d3557 40%,#457b9d 100%);
}

/* links */
a{ color:var(--accent-alt); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* layout */
.page{ max-width:1100px; margin:0 auto; padding:2rem 1.5rem; position:relative; z-index:1; }
header{ padding:1rem 0 2rem; }
main{ display:grid; grid-template-columns:1fr 1fr; gap:2rem; }
@media (max-width:900px){ .hero{ grid-template-columns:1fr; } main{ grid-template-columns:1fr; }}

/* top nav */
.top-nav-main{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:2rem; }
.nav-pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.45rem 1rem; border-radius:999px; border:1px solid var(--border);
  color:var(--muted); background:transparent;
}
.nav-pill:hover{ border-color:var(--accent-alt); color:var(--text); }
.nav-pill.active{ background:var(--accent); border-color:var(--accent); color:#0b1020; font-weight:600; }

/* hero */
.hero{ display:grid; grid-template-columns:1fr minmax(280px,420px); gap:2rem; align-items:start; }
h1{ font-size:clamp(2.25rem,6vw,4rem); line-height:1.1; margin:0 0 .75rem; }
h2{ font-size:1.25rem; font-weight:700; margin:.25rem 0 .75rem; }
.hero-subtitle{ font-size:1.5rem; color:var(--muted); margin:.25rem 0; }
.hero-text{ max-width:62ch; }
.hero-links{ display:flex; gap:1rem; margin-top:1rem; }
.hero-meta{ color:var(--muted); margin-top:.75rem; }

/* buttons */
.btn{ display:inline-flex; align-items:center; gap:.5rem; border-radius:999px; padding:.9rem 1.2rem; font-weight:600; border:1px solid var(--border); }
.btn-primary{ background:var(--accent); color:#0b1020; border-color:var(--accent); }
.btn-primary:hover{ filter:brightness(1.05); }
.btn-ghost{ background:transparent; color:var(--text); }
.btn-ghost:hover{ border-color:var(--accent-alt); }

/* glass cards */
.hero-panel, .card{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(8px);
  box-shadow:0 6px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}
.hero-panel{ border-radius:1.25rem; padding:1.25rem; }
.card{ border-radius:1rem; padding:1.25rem; }

/* lists + tags */
.list{ list-style:none; padding:0; margin:0; display:grid; gap:1rem; }
.list-heading{ font-weight:700; }
.list-meta{ color:var(--muted); margin:.1rem 0 .25rem; }
.list-body{ color:var(--text); }
.tag-row{ display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.75rem; }
.tag{ font-size:.85rem; color:var(--muted); padding:.25rem .6rem; border:1px solid rgba(255,255,255,.14); border-radius:999px; }

/* section titles */
.section-title{ font-size:1.1rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:.75rem; }

/* footer */
footer{ margin-top:2rem; padding:2rem 0; border-top:1px solid rgba(255,255,255,.1); color:var(--muted); font-size:.9rem; display:flex; gap:1rem; flex-wrap:wrap; }

/* reveal */
/* slower, smoother reveal */
.reveal{
  opacity: 0;
  transform: translateY(12px);                     /* keep a small lift if you use it */
  transition:
    transform 2.1s cubic-bezier(.22,.8,.18,1),
    opacity   2.1s cubic-bezier(.22,.8,.18,1);
  will-change: transform, opacity;
}
.reveal.show{
  opacity: 1;
  transform: none;
}

/* side directions override the default */
.reveal-left{  transform: translateX(-28px); }
.reveal-right{ transform: translateX( 28px); }
.reveal-left.show, .reveal-right.show{ transform:none; }


/* background layers: WebGL + CSS fallback */
.bg-canvas{ position:fixed; inset:0; z-index:0; width:100vw; height:100vh; pointer-events:none; display:none; }
body::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(circle at 20% 0,#1d3557 0,#1d3557 40%,#457b9d 100%);
  animation:bgShift 18s ease-in-out infinite alternate; opacity:1;
}
@keyframes bgShift{ 0%{ filter:hue-rotate(0) saturate(100%);} 100%{ filter:hue-rotate(12deg) saturate(112%);} }
.webgl-ok .bg-canvas{ display:block; }
.webgl-ok body::before{ display:none; }
@media (prefers-reduced-motion:reduce){ body::before{ animation:none; } }
.page{ position:relative; z-index:1; }
.bg-canvas{ position:fixed; inset:0; z-index:0; width:100vw; height:100vh; pointer-events:none; display:none; }

/* show canvas when JS marks WebGL ok; hide CSS fallback */
.webgl-ok .bg-canvas{ display:block; }
.webgl-ok body::before{ display:none; }
/* --- force glass back --- */
.hero-panel, .card{
  background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 8px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}
.hero-panel{ border-radius: 20px; padding: 20px; }
.card{ border-radius: 16px; padding: 20px; }
/* --- debug: guarantee animated background even if WebGL fails or OS reduces motion --- */              /* hide WebGL canvas for now */
body::before{
  content:"";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 0, #1d3557 0, #1d3557 40%, #457b9d 100%);
  animation: bgShift 18s ease-in-out infinite alternate !important;  /* always animate */
  opacity: 1;
}
@keyframes bgShift{
  0%   { filter: hue-rotate(0deg) saturate(100%); }
  100% { filter: hue-rotate(12deg) saturate(112%); }
}
/* If WebGL initialises, always hide the CSS fallback */
.webgl-ok body::before{ display:none !important; animation:none !important; }
.webgl-ok .bg-canvas{ display:block !important; }
/* Phones/tablets: do not animate the CSS fallback */
@media (max-width: 768px), (pointer: coarse){
  body::before{ 
    animation: none !important;  /* stop “spinning light” */
    /* keep the same static gradient */
    background: radial-gradient(circle at 20% 0, #1d3557 0, #1d3557 40%, #457b9d 100%);
  }
}
/* — Background: static only — */
.bg-canvas{ display:none !important; }        /* hide WebGL layer */
body::before{ animation:none !important; }    /* stop CSS fallback animation */
/* Kill animated backgrounds everywhere */
.bg-canvas{ display:none !important; }
body::before{ animation:none !important; }
.reveal{ opacity:0; transition:transform .6s cubic-bezier(.2,.7,.2,1), opacity .6s; will-change:transform,opacity; }
.reveal.show{ opacity:1; }
.reveal-left{  transform:translateX(-28px); }
.reveal-right{ transform:translateX(28px); }
.reveal-left.show, .reveal-right.show{ transform:none; }
/* hard stop: no animated backgrounds */
.bg-canvas{ display:none !important; }
body::before{ content:none !important; animation:none !important; }
/* hard stop: no animated background anywhere */
.bg-canvas{ display:none !important; }
body::before{ content:none !important; animation:none !important; }
/* --- Mobile fix: stack hero, remove negative margins, prevent overflow --- */
html, body { overflow-x: hidden; }

@media (max-width: 640px){
  .page{ padding: 1.25rem 1rem; }

  /* stack hero */
  .hero{
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 1rem;
    align-items: start;
  }

  /* full-width cards/panel, no bleed */
  .card,
  .hero-panel{
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 14px;
  }

  /* calmer buttons + headings on small screens */
  h1{ font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hero-subtitle{ font-size: 1.1rem; }
  .btn{ padding: .8rem 1rem; font-size: .95rem; }

  /* nav pills scroll instead of wrapping weirdly */
  .top-nav-main{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .5rem;
    padding-bottom: .25rem;
  }
  .nav-pill{
    white-space: nowrap;
    padding: .5rem .9rem;
    font-size: .95rem;
  }

  /* smaller reveal offset so edges don't clip */
  .reveal-left{  transform: translateX(-16px); }
  .reveal-right{ transform: translateX( 16px); }
}
/* Background paths layer */
.bg-paths{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0; /* content sits above */
}

/* Keep your content above the background */
.page, header, nav { position: relative; z-index: 1; }

/* Dash animation */
@keyframes bgdash{
  0%   { stroke-dashoffset: var(--bgdash-start, 1200); opacity: .28; }
  50%  { opacity: .50; }
  100% { stroke-dashoffset: 0; opacity: .28; }
}

/* Disable on small screens and when users prefer less motion */
@media (max-width: 767px){
  .bg-paths{ display: none !important; }
}
@media (prefers-reduced-motion: reduce){
  .bg-paths path{ animation: none !important; }
}
