/* ==============  Aetherstak Theme (v3.1)  ============== */
/* Color tokens */
:root{
  /* neutrals */
  --bg: #0b0f17;
  --panel: #0f1420;
  --fg: #e8eef7;
  --muted: #9aa7b8;
  --border: #1e2633;

  /* brand + accents */
  --brand: #e8eef7;
  --accent: #7ee787;          /* CTA green */
  --accent-2:#7cb8ff;         /* link hover blue */

  /* button fg colors (explicit so hover never loses contrast) */
  --btn-fg: #07110a;          /* dark text on green button (dark mode) */
  --btn-fg-contrast: #07110a; /* same, but a separate token if you tweak later */

  /* card gradient stops (dark) */
  --g1a:#1b2333; --g1b:#0a3a67;   /* blue tint */
  --g2a:#1f2a2b; --g2b:#0f573d;   /* green tint */
  --g3a:#2a2031; --g3b:#4a255b;   /* purple tint */

  /* hero gradient (dark) */
  --hero-tl:#0e1623;
  --hero-br:#09111d;
}

@media (prefers-color-scheme: light){
  :root{
    --bg:#f7f9fc;
    --panel:#ffffff;
    --fg:#0e1420;
    --muted:#516070;
    --border:#dbe3ee;

    --brand:#0e1420;
    --accent:#1fbf75;
    --accent-2:#2a7cf6;

    --btn-fg:#062311;

    --g1a:#e9f0ff; --g1b:#d8e8ff;
    --g2a:#e8fbf3; --g2b:#d6f5e8;
    --g3a:#f2e6ff; --g3b:#ead8ff;

    --hero-tl:#eef3ff;
    --hero-br:#eaf6ef;
  }
}

/* Base */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.container{max-width:1080px;margin:0 auto;padding:0 16px}

/* Global interactive defaults */
a{
  color:var(--accent-2);
  text-decoration:none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 0% 2px;
  background-repeat: no-repeat;
  transition: background-size .18s ease, color .15s ease, text-shadow .15s ease, opacity .15s ease;
}
a:hover{ color:var(--accent); background-size: 100% 2px; text-shadow: 0 0 12px color-mix(in oklab, var(--accent), transparent 80%); }
a:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:6px }

/* Buttons (explicit colors so text never disappears) */
.button{
  display:inline-block; padding:12px 16px; border-radius:10px; text-decoration:none;
  background: var(--accent);
  color: var(--btn-fg) !important; /* fix: keep text visible on hover */
  font-weight:700; letter-spacing:.2px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22), 0 0 0 1px rgba(255,255,255,.05) inset;
  transform: translateY(0);
  transition: transform .08s ease, box-shadow .18s ease, filter .15s ease;
}
.button:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);                 /* subtle pop without changing text color */
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.button:active{ transform: translateY(0); filter: brightness(.98); }
.button:focus-visible{ outline:2px solid var(--accent-2); outline-offset:3px }

/* Header / Nav */
.site-header{
  position:sticky; top:0; z-index:10;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0)) , var(--bg);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .container{height:64px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{color:var(--brand);font-weight:800;font-size:18px}
.nav a{color:var(--fg);opacity:.9;margin-left:16px}
.nav a:hover{opacity:1}
.nav a:focus-visible{outline-offset:6px}

/* Hero */
.hero{
  padding: 96px 0 64px;
  background:
    radial-gradient(1200px 600px at 60% -10%, rgba(126,231,135,.11), rgba(126,231,135,0) 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(124,184,255,.10), rgba(124,184,255,0) 50%),
    linear-gradient(145deg, var(--hero-tl), var(--hero-br));
  border-bottom: 1px solid var(--border);
}
.hero h1{margin:0 0 12px; font-size: clamp(36px, 6vw, 64px); line-height:1.05;}
.lede{margin:0 0 20px; color:var(--muted); font-size:18px}

/* Sections */
.section{padding:56px 0}
.section h2{margin:0 0 20px; font-size:28px}

/* Cards */
.cards{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap:20px;
}
.card{
  position:relative;
  border-radius:16px;
  padding:18px;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .20s ease, border-color .18s ease;
}
.card:before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(135deg,var(--g1a),var(--g1b));
  opacity:.28; pointer-events:none;
}
.cards .card:nth-child(2):before{ background: linear-gradient(135deg,var(--g2a),var(--g2b)); }
.cards .card:nth-child(3):before{ background: linear-gradient(135deg,var(--g3a),var(--g3b)); }

/* Card hover glow + slight lift */
.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.28), 0 0 0 1px color-mix(in oklab, var(--border), white 12%) inset;
  border-color: color-mix(in oklab, var(--border), white 12%);
}
.card h3{margin:0 0 6px; font-weight:800}
.card .sub{margin:0 0 10px; color:var(--muted)}
.card ul{margin:0 14px 14px 18px}
.card .cta{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.direct{color:var(--muted);font-size:14px;word-break:break-all}

/* Footer */
.site-footer{border-top:1px solid var(--border); padding:28px 0; color:var(--muted)}

/* Accessibility helper */
.skip{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip:focus{left:16px;top:8px;width:auto;height:auto;padding:8px 10px;background:var(--accent);color:var(--btn-fg);border-radius:6px}

/* Motion preference */
@media (prefers-reduced-motion: reduce){
  *{animation:none !important; transition:none !important}
}
