/* ==========================================================================
   DevWise — shared stylesheet (used by index.html and terms.html)
   Pure CSS, no build step.
   ========================================================================== */

:root {
  /* Palette sampled from the DevWise dragon logo */
  --bg: #07100a;
  --surface: #0e1c11;
  --surface-2: #0a160d;
  --border: rgba(140, 176, 148, 0.14);
  --border-strong: rgba(140, 176, 148, 0.24);
  --text: #f2fdf4;
  --text-2: #cfe3d3;
  --muted: #8fab96;
  --accent: #39e75f;        /* neon wordmark green */
  --accent-hover: #5cf07c;
  --accent-2: #1fa626;      /* dragon green */
  --accent-deep: #142915;   /* emblem background */
  --accent-light: #8af5a3;
  --accent-soft: rgba(57, 231, 95, 0.1);
  --on-accent: #03140a;
  --radius: 14px;
  --maxw: 1160px;
  --header-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--text); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
svg { flex-shrink: 0; }

::selection { background: var(--accent); color: var(--on-accent); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 16px); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 16, 10, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.03em;
}
.logo-emblem { display: block; line-height: 0; }
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 0 1px rgba(57, 231, 95, 0.35), 0 0 18px -2px rgba(57, 231, 95, 0.45);
}
.logo .wise {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(57, 231, 95, 0.55);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a:not(.btn) {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s, background-color 0.15s;
}
.nav-links a:not(.btn):hover,
.nav-links a:not(.btn).active,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(140, 176, 148, 0.08);
}
.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(140, 176, 148, 0.06);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 12px 24px 22px;
    background: rgba(7, 16, 10, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.8);
  }
  .nav-menu.open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a:not(.btn) { padding: 12px; font-size: 1rem; }
  .nav-cta { margin: 10px 0 0; }
  .nav-cta .btn { width: 100%; height: 46px; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 0 1px rgba(57, 231, 95, 0.4), 0 10px 30px -10px rgba(57, 231, 95, 0.75);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(140, 176, 148, 0.06);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: rgba(140, 176, 148, 0.12);
  border-color: rgba(140, 176, 148, 0.4);
  transform: translateY(-1px);
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 0.88rem; }
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 104px 0 112px;
  overflow: hidden;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 176, 148, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 176, 148, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 30%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 30%, #000 25%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  left: 50%;
  top: -480px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(57, 231, 95, 0.22), rgba(31, 166, 38, 0.08) 40%, transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(14, 28, 17, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
}
.eyebrow .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.hero h1 {
  margin: 24px 0 22px;
  font-size: clamp(2.3rem, 5.2vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
}
.grad {
  background: linear-gradient(90deg, #5cf07c, #39e75f 45%, #1fa626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(57, 231, 95, 0.35));
}
.hero .lead {
  max-width: 560px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  color: var(--muted);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--accent); }

/* Decorative code window */
.code-window {
  background: linear-gradient(180deg, #0f1f13, #0a160d);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(57, 231, 95, 0.06), 0 0 80px -30px rgba(57, 231, 95, 0.35);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 10, 0.55);
}
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: #1f3a25; }
.code-bar .file {
  margin-left: 10px;
  font: 500 0.78rem/1 var(--mono);
  color: var(--muted);
}
.code-bar .file b { color: var(--accent-light); font-weight: 500; }
pre.code {
  margin: 0;
  padding: 20px 22px 22px;
  overflow-x: auto;
  font: 400 clamp(0.74rem, 1vw + 1.4px, 0.82rem)/1.8 var(--mono);
  color: #cfe3d3;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: #1f3a25 transparent;
}
pre.code::-webkit-scrollbar { height: 6px; }
pre.code::-webkit-scrollbar-track { background: transparent; }
pre.code::-webkit-scrollbar-thumb { background: #1f3a25; border-radius: 3px; }
.hero-grid > * { min-width: 0; }
.tk-k { color: #4be86c; }
.tk-f { color: #a3e635; }
.tk-s { color: #fde68a; }
.tk-c { color: #5a7a62; font-style: italic; }
.tk-t { color: #5eead4; }
.tk-n { color: #fca5a5; }

@media (max-width: 1040px) {
  .hero { padding: 72px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .code-window { max-width: 640px; }
  pre.code { font-size: 0.82rem; }
}
@media (max-width: 520px) {
  pre.code { font-size: 0.72rem; padding: 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* --------------------------------------------------------------------------
   Sections & shared headings
   -------------------------------------------------------------------------- */

.section { padding: 104px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-label {
  display: inline-block;
  margin-bottom: 14px;
  font: 600 0.76rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-head h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.section-head p { margin-top: 16px; font-size: 1.05rem; color: var(--muted); }

@media (max-width: 640px) {
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 40px; }
}

/* --------------------------------------------------------------------------
   Cards / grids
   -------------------------------------------------------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: rgba(57, 231, 95, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -28px rgba(57, 231, 95, 0.5);
}
.card h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 10px; }
.card p { font-size: 0.96rem; color: var(--muted); }

.icon-tile {
  width: 46px;
  height: 46px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid rgba(57, 231, 95, 0.28);
  color: #4be86c;
}
.icon-tile svg { width: 22px; height: 22px; }

.feature-list {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
  padding: 20px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-2);
}
.feature-list li { display: flex; align-items: flex-start; gap: 10px; }
.feature-list svg { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }

.note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--muted);
}
.note svg { width: 17px; height: 17px; color: var(--accent-light); }
.note a { color: var(--accent-light); font-weight: 500; }
.note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Portfolio
   -------------------------------------------------------------------------- */

.project { padding: 0; overflow: hidden; display: flex; flex-direction: column; }

.media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }

.placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(57, 231, 95, 0.2), transparent 55%),
    radial-gradient(circle at 85% 95%, rgba(31, 166, 38, 0.18), transparent 50%),
    var(--surface-2);
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 176, 148, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 176, 148, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.placeholder-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font: 500 0.74rem/1.3 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}
.placeholder-inner svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 11px;
  color: var(--accent-light);
  background: rgba(7, 16, 10, 0.6);
  border: 1px solid var(--border-strong);
}
.placeholder .num {
  position: absolute;
  top: 14px;
  left: 16px;
  font: 600 0.72rem/1 var(--mono);
  color: rgba(140, 176, 148, 0.7);
}

.project-body { display: flex; flex-direction: column; gap: 12px; padding: 24px 26px 28px; flex: 1; }
.project-body h3 { margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 6px 9px;
  border-radius: 6px;
  font: 500 0.72rem/1 var(--mono);
  color: var(--accent-light);
  background: rgba(57, 231, 95, 0.1);
  border: 1px solid rgba(57, 231, 95, 0.22);
}

/* Clickable screenshots (open in the lightbox) */
.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.shot img {
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s;
}
.card:hover .shot img { transform: scale(1.04); }
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 16, 10, 0.55));
  pointer-events: none;
}
.zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(7, 16, 10, 0.75);
  border: 1px solid var(--border-strong);
  font: 500 0.72rem/1 var(--mono);
  color: var(--text);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.zoom svg { width: 13px; height: 13px; }
.shot:hover .zoom, .shot:focus-visible .zoom { opacity: 1; transform: none; }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }

.project-meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font: 500 0.74rem/1.4 var(--mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.project-meta b { color: var(--accent-light); font-weight: 500; }

/* Featured case study */
.featured {
  padding: 0;
  overflow: hidden;
  margin-bottom: 20px;
}
.featured .media { aspect-ratio: 2000 / 935; }
.featured-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px 48px;
  align-items: start;
  padding: 32px 36px 34px;
}
.featured-intro { display: flex; flex-direction: column; gap: 14px; }
.featured-body h3 { font-size: 1.5rem; margin: 0; letter-spacing: -0.025em; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 0.74rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.featured .feature-list { margin: 0; padding: 0; border-top: 0; font-size: 0.92rem; gap: 12px; }
.featured .feature-list li {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(7, 16, 10, 0.5);
}
.featured .feature-list svg { margin-top: 4px; }

@media (max-width: 900px) {
  .featured-body { grid-template-columns: 1fr; padding: 26px 24px 28px; }
}

/* Specialty strip under the hero */
.specialties {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(14, 28, 17, 0.45);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.specialties:hover .marquee { animation-play-state: paused; }
.specialties ul {
  display: flex;
  flex-shrink: 0;
  gap: 44px;
  margin: 0;
  padding: 22px 44px 22px 0;
  list-style: none;
}
.specialties li { white-space: nowrap; }
.specialties li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 0.82rem/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.specialties li::before {
  content: "";
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 8px rgba(57, 231, 95, 0.8);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 3vh 3vw;
  background: rgba(2, 6, 3, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lightbox-panel {
  margin: 0;
  width: min(1200px, 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-2);
  overflow: hidden;
  cursor: default;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(57, 231, 95, 0.35);
  transform: scale(0.97);
  transition: transform 0.2s;
}
.lightbox.open .lightbox-panel { transform: none; }
.lightbox-panel img { display: block; width: 100%; max-height: calc(94vh - 70px); object-fit: contain; background: #000; }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.lightbox-bar p { font-size: 0.92rem; color: var(--text); }
.lightbox-close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(140, 176, 148, 0.06);
  color: var(--text);
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-close svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Process timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  left: calc((100% - 72px) / 8);
  right: calc((100% - 72px) / 8);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  opacity: 0.55;
}
.step { position: relative; display: flex; flex-direction: column; }
.step-node {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid rgba(57, 231, 95, 0.6);
  font: 600 0.92rem/1 var(--mono);
  color: var(--accent-light);
  box-shadow: 0 0 0 6px var(--bg), 0 0 26px -4px rgba(57, 231, 95, 0.7);
}
.step .card { flex: 1; text-align: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(140, 176, 148, 0.08);
  border: 1px solid var(--border);
}

@media (max-width: 1000px) {
  .timeline { grid-template-columns: 1fr; gap: 20px; }
  .timeline::before {
    top: 24px;
    bottom: 24px;
    left: 23.5px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
  }
  .step { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; }
  .step-node { margin: 0; }
  .step .card { text-align: left; }
  .chips { justify-content: flex-start; }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 56px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px circle at 85% -10%, rgba(57, 231, 95, 0.2), transparent 65%),
    linear-gradient(180deg, rgba(14, 28, 17, 0.95), rgba(14, 28, 17, 0.75));
}
.contact-copy h2 { font-size: clamp(1.85rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; }
.contact-copy p { margin-top: 16px; color: var(--muted); font-size: 1.02rem; }
.contact-copy .tip {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  font-size: 0.9rem;
  color: var(--text-2);
}
.contact-copy .tip strong { color: var(--text); font-weight: 600; }

.contact-methods { display: grid; gap: 14px; }
.method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(7, 16, 10, 0.65);
  transition: border-color 0.2s;
}
a.method:hover { border-color: rgba(57, 231, 95, 0.45); }
.method-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  flex-shrink: 0;
}
.method-icon svg { width: 22px; height: 22px; }
.method-icon.discord { background: rgba(88, 101, 242, 0.15); border: 1px solid rgba(88, 101, 242, 0.4); color: #a5b4fc; }
.method-icon.mail { background: var(--accent-soft); border: 1px solid rgba(57, 231, 95, 0.35); color: #4be86c; }
.method-text { min-width: 0; flex: 1; }
.method-text small {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.method-text strong {
  display: block;
  font: 500 0.95rem/1.5 var(--mono);
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Copy button states */
.btn .icon-check { display: none; }
.btn.copied { background: var(--accent-deep); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 18px -4px rgba(57, 231, 95, 0.6); }
.btn.copied:hover { background: var(--accent-deep); }
.btn.copied .icon-copy { display: none; }
.btn.copied .icon-check { display: block; }

@media (max-width: 960px) {
  .contact-card { grid-template-columns: 1fr; gap: 36px; padding: 40px 28px; }
}
@media (max-width: 520px) {
  .contact-card { padding: 32px 20px; }
  .method { flex-wrap: wrap; }
  .method .btn { width: 100%; }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: var(--accent-deep);
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast svg { width: 18px; height: 18px; color: #4ade80; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 20px; }
.footer-brand .logo { font-size: 1rem; }
.footer-brand .logo-mark { width: 30px; height: 30px; }
.footer-brand p { font-size: 0.86rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.88rem; }
.footer-links a { color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Terms page
   -------------------------------------------------------------------------- */

.legal-hero {
  position: relative;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  overflow: clip;
}
.legal-hero::after {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  left: 50%;
  top: -460px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(57, 231, 95, 0.18), transparent 65%);
  pointer-events: none;
}
.legal-hero .container { position: relative; z-index: 1; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}
.back-link svg { width: 16px; height: 16px; transition: transform 0.15s; }
.back-link:hover { color: var(--text); }
.back-link:hover svg { transform: translateX(-3px); }
.legal-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.legal-hero .subtitle { margin-top: 12px; font-size: 1.12rem; color: var(--muted); }
.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(14, 28, 17, 0.7);
  font: 500 0.78rem/1.2 var(--mono);
  color: var(--text-2);
}
.updated svg { width: 14px; height: 14px; color: var(--accent); }

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 64px;
  padding: 56px 24px 104px;
}
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.toc-title {
  margin-bottom: 12px;
  font: 600 0.74rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 7px 14px;
  border-left: 1px solid transparent;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--accent); }

.prose { max-width: 760px; }
.prose .intro {
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(57, 231, 95, 0.3);
  background: linear-gradient(180deg, rgba(57, 231, 95, 0.08), rgba(14, 28, 17, 0.6));
  font-size: 1.02rem;
  color: var(--text-2);
}
.prose section { padding: 40px 0 0; }
.prose section + section { margin-top: 40px; border-top: 1px solid var(--border); }
.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 1.32rem;
  font-weight: 700;
}
.prose h2 .n {
  flex-shrink: 0;
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 7px;
  text-align: center;
  font: 600 0.78rem/1 var(--mono);
  color: var(--accent-light);
  background: var(--accent-soft);
  border: 1px solid rgba(57, 231, 95, 0.28);
  transform: translateY(-2px);
}
.prose ul { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 22px; line-height: 1.75; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent-light); text-decoration: underline; text-decoration-color: rgba(147, 197, 253, 0.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose code {
  padding: 2px 7px;
  border-radius: 6px;
  font: 500 0.86em var(--mono);
  background: rgba(140, 176, 148, 0.1);
  border: 1px solid var(--border);
}

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .toc {
    position: static;
    padding: 20px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
  }
}

/* --------------------------------------------------------------------------
   Animation
   -------------------------------------------------------------------------- */

:root { --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes headerDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes menuDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } }
@keyframes gradShift { to { background-position: 200% 50%; } }
@keyframes gridPan { to { background-position: 56px 56px, 56px 56px; } }
@keyframes breathe { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes lineIn { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.4); } 70% { transform: scale(1.12); } 100% { opacity: 1; transform: none; } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(320%) skewX(-20deg); } }
@keyframes emblemGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(57, 231, 95, 0.35), 0 0 12px -2px rgba(57, 231, 95, 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(57, 231, 95, 0.6), 0 0 24px 0 rgba(57, 231, 95, 0.6); }
}
@keyframes nodeGlow {
  0%, 100% { box-shadow: 0 0 0 6px var(--bg), 0 0 18px -4px rgba(57, 231, 95, 0.55); }
  50% { box-shadow: 0 0 0 6px var(--bg), 0 0 30px 0 rgba(57, 231, 95, 0.8); }
}

/* Page load */
.site-header { animation: headerDown 0.6s var(--ease-out) both; }
.nav-menu.open { animation: menuDown 0.22s var(--ease-out); }
.hero-grid > div:first-child > * { animation: fadeUp 0.8s var(--ease-out) both; }
.hero-grid > div:first-child > :nth-child(1) { animation-delay: 0.1s; }
.hero-grid > div:first-child > :nth-child(2) { animation-delay: 0.2s; }
.hero-grid > div:first-child > :nth-child(3) { animation-delay: 0.32s; }
.hero-grid > div:first-child > :nth-child(4) { animation-delay: 0.44s; }
.hero-grid > div:first-child > :nth-child(5) { animation-delay: 0.56s; }
.code-window { animation: slideInRight 1s var(--ease-out) 0.35s both, float 7s ease-in-out 1.4s infinite; }
.legal-hero .container > * { animation: fadeUp 0.8s var(--ease-out) both; }
.legal-hero .container > :nth-child(2) { animation-delay: 0.1s; }
.legal-hero .container > :nth-child(3) { animation-delay: 0.2s; }
.legal-hero .container > :nth-child(4) { animation-delay: 0.3s; }

/* Ambient motion */
.hero::before { animation: gridPan 6s linear infinite; }
.hero::after, .legal-hero::after { animation: breathe 6s ease-in-out infinite; }
.eyebrow .pulse { animation: pulseRing 1.8s ease-out infinite; }
.logo-mark { animation: emblemGlow 3.5s ease-in-out infinite; }
.grad {
  background: linear-gradient(90deg, #5cf07c, #39e75f 25%, #1fa626 50%, #39e75f 75%, #5cf07c);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradShift 6s linear infinite;
}
.step-node { animation: nodeGlow 3s ease-in-out infinite; }
.step:nth-child(2) .step-node { animation-delay: 0.4s; }
.step:nth-child(3) .step-node { animation-delay: 0.8s; }
.step:nth-child(4) .step-node { animation-delay: 1.2s; }

/* Code window: lines appear one by one, then a blinking caret */
pre.code .ln { opacity: 0; animation: lineIn 0.35s ease calc(1s + var(--i) * 60ms) forwards; }
pre.code .caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 1s steps(1) infinite;
}

/* Hover motion */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
}
.btn-primary:hover::after { animation: shine 0.75s ease; }
.icon-tile { transition: transform 0.3s var(--ease-out), box-shadow 0.3s; }
.card:hover .icon-tile { transform: translateY(-3px) rotate(-6deg); box-shadow: 0 0 22px -4px rgba(57, 231, 95, 0.65); }
.tag, .chip { transition: border-color 0.2s, background-color 0.2s; }
.card:hover .tag { border-color: rgba(57, 231, 95, 0.45); }

/* Scroll reveal (classes are added by JS, so content stays visible without it) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .step.in .step-node { animation: pop 0.6s var(--ease-out) calc(var(--d, 0ms) + 0.15s) both, nodeGlow 3s ease-in-out 1s infinite; }

/* Timeline line draws itself in */
.js .timeline::before { transform: scaleX(0); transform-origin: left center; transition: transform 1.4s cubic-bezier(0.6, 0, 0.2, 1) 0.2s; }
.js .timeline.drawn::before { transform: scaleX(1); }
@media (max-width: 1000px) {
  .js .timeline::before { transform: scaleY(0); transform-origin: center top; }
  .js .timeline.drawn::before { transform: scaleY(1); }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  pre.code .ln { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
  .js .timeline::before { transform: none; }
  .specialties { -webkit-mask-image: none; mask-image: none; }
  .marquee { width: auto; justify-content: center; }
  .specialties ul { flex-wrap: wrap; justify-content: center; gap: 10px 34px; padding: 22px 16px; }
  .specialties ul[aria-hidden="true"] { display: none; }
}
