/* ============================================================
   Gamatech Inc. — Modern Dark Redesign (prototype)
   Self-contained: does NOT import main.css/animations.css.
   ============================================================ */

/* ---- Tokens ---- */
:root {
  --bg:        #07080D;
  --bg-2:      #0B0D15;
  --surface:   rgba(255,255,255,0.035);
  --surface-2: rgba(255,255,255,0.06);
  --border:    rgba(255,255,255,0.09);
  --border-2:  rgba(255,255,255,0.16);
  --text:      #EAECF2;
  --muted:     #9BA1B0;
  --muted-2:   #6B7180;
  --accent:    #7C5CFF;   /* violet */
  --accent-2:  #22D3EE;   /* cyan   */
  --accent-grad: linear-gradient(135deg, #7C5CFF 0%, #22D3EE 100%);
  --glow-violet: rgba(124,92,255,0.45);
  --glow-cyan:   rgba(34,211,238,0.35);

  /* semantic tokens (overridden by light theme) */
  color-scheme: dark;
  --heading:   #ffffff;
  --header-bg: rgba(7,8,13,0.6);
  --panel-bg:  #12141E;
  --grid-line: rgba(255,255,255,0.045);
  --chip-bg:   rgba(255,255,255,0.94);
  --on-accent: #07080D;

  --maxw: 1180px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Light theme ---- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:        #F6F7FB;
  --bg-2:      #FFFFFF;
  --surface:   rgba(12,16,40,0.04);
  --surface-2: rgba(12,16,40,0.07);
  --border:    rgba(12,16,40,0.10);
  --border-2:  rgba(12,16,40,0.18);
  --text:      #3A404C;
  --muted:     #5C6475;
  --muted-2:   #8A92A3;
  --heading:   #0C0E16;
  --header-bg: rgba(255,255,255,0.72);
  --panel-bg:  #FFFFFF;
  --grid-line: rgba(12,16,40,0.06);
  --chip-bg:   #FFFFFF;
  --glow-violet: rgba(124,92,255,0.20);
  --glow-cyan:   rgba(34,211,238,0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;        /* clip off-canvas mobile menu */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* ambient page glows */
  background-image:
    radial-gradient(60rem 40rem at 80% -10%, rgba(124,92,255,0.12), transparent 60%),
    radial-gradient(50rem 35rem at -10% 20%, rgba(34,211,238,0.10), transparent 55%);
  background-attachment: fixed;
}

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

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

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-grad); color: var(--on-accent);
  box-shadow: 0 8px 30px -8px var(--glow-violet);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px var(--glow-violet); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent-2); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Header ---- */
.site-header {
  /* z-index must sit ABOVE .nav-overlay (1040): the header is a stacking
     context (sticky + backdrop-filter) and the off-canvas menu lives inside
     it, so the header has to outrank the overlay or Safari paints the overlay
     on top of the menu (menu looks dimmed and taps hit the overlay). */
  position: sticky; top: 0; z-index: 1060;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand .dot {
  flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-grad); box-shadow: 0 0 16px var(--glow-cyan);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--heading); }
.brand-text i {
  font-style: normal; color: var(--muted); font-family: var(--font-body); font-weight: 500;
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 3px;
}

.nav-menu { display: flex; align-items: center; gap: 0.4rem; }
.nav-menu a.nav-link {
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  padding: 0.5rem 0.85rem; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.nav-menu a.nav-link:hover { color: var(--heading); background: var(--surface); }
.nav-menu .btn { margin-left: 0.5rem; }

.menu-btn {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px; z-index: 1100; margin-left: auto;
}
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--heading); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---- */
.hero { position: relative; padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 6rem); overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; z-index: 0; pointer-events: none; }
.hero-orb.a { width: 380px; height: 380px; background: var(--glow-violet); top: -80px; right: 6%; animation: floaty 16s ease-in-out infinite; }
.hero-orb.b { width: 320px; height: 320px; background: var(--glow-cyan); bottom: -60px; left: 2%; animation: floaty 20s ease-in-out infinite reverse; }
@keyframes floaty { 0%,100%{ transform: translate(0,0);} 50%{ transform: translate(20px,-30px);} }

.hero .container { position: relative; z-index: 2; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem;
  padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em;
}
.eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; margin-bottom: 1.4rem; }
.hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { max-width: 620px; margin: 0 auto 2.2rem; color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.25rem); }
.hero-cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

.hero-stats { display: flex; gap: clamp(1.5rem,5vw,4rem); justify-content: center; flex-wrap: wrap; margin-top: 3.5rem; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat b { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--heading); }
.hero-stats .stat span { font-size: 0.85rem; color: var(--muted-2); }

/* ---- Section scaffolding ---- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.section-head { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }
.kicker { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.8rem 0 1rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---- Service cards ---- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.card {
  position: relative; padding: 2rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--accent-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.35s;
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(124,92,255,0.18), rgba(34,211,238,0.14));
  border: 1px solid var(--border-2); margin-bottom: 1.3rem; color: var(--accent-2);
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.3rem; margin-bottom: 0.6rem; color: var(--heading); }
.card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 1.2rem; }
.card .card-link { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.card .card-link .arrow { transition: transform 0.25s var(--ease); }
.card:hover .card-link .arrow { transform: translateX(4px); }

/* ---- Approach (split) ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,6vw,5rem); align-items: center; }
.split .col h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 1.2rem; }
.split .col p { color: var(--muted); margin-bottom: 1.5rem; }
.feature-list { list-style: none; display: grid; gap: 1rem; }
.feature-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.feature-list .check {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(34,211,238,0.12); border: 1px solid var(--border-2); color: var(--accent-2);
}
.feature-list b { color: var(--heading); font-weight: 600; }
.feature-list span { color: var(--muted); }
.split .visual {
  position: relative; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(124,92,255,0.10), rgba(34,211,238,0.05));
  min-height: 320px; padding: 2rem; overflow: hidden; display: grid; align-content: center; gap: 1rem;
}
.split .visual .e-row { display: flex; align-items: center; gap: 1rem; }
.split .visual .e-badge { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.split .visual small { color: var(--muted-2); }

/* ---- Clients ---- */
.clients { text-align: center; }
.clients .kicker { display: block; margin-bottom: 2rem; }
.client-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; align-items: center; }
.client-chip {
  background: var(--chip-bg); border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 1.2rem;
  display: grid; place-items: center; min-width: 120px; height: 64px;
  transition: transform 0.3s var(--ease);
}
.client-chip:hover { transform: translateY(-4px); }
.client-chip img { max-height: 38px; width: auto; }

/* ---- News ---- */
.news-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface);
  padding: clamp(1.5rem, 4vw, 3rem); overflow: hidden; position: relative;
}
.news-card .tag { display: inline-block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 1rem; }
.news-card h3 { font-size: 1.5rem; color: var(--heading); margin-bottom: 0.8rem; }
.news-card p { color: var(--muted); }
.news-side { display: grid; place-items: center; }
.news-side .pill { font-family: var(--font-display); font-size: clamp(2rem,5vw,3rem); font-weight: 700; color: var(--heading); opacity: 0.9; text-align: center; line-height: 1.1; }
.news-side .pill em { font-style: normal; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-inner {
  border-radius: var(--radius-lg); border: 1px solid var(--border-2); padding: clamp(2.5rem,6vw,4.5rem) 2rem;
  background:
    radial-gradient(40rem 20rem at 50% 0%, rgba(124,92,255,0.22), transparent 70%),
    var(--bg-2);
  position: relative; overflow: hidden;
}
.cta-inner h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.cta-inner p { color: var(--muted); max-width: 520px; margin: 0 auto 2rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 4rem 0 2rem; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-grid .brand { margin-bottom: 1rem; }
.footer-about p { color: var(--muted); font-size: 0.92rem; max-width: 280px; }
.footer-col h4 { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1rem; font-family: var(--font-body); font-weight: 700; }
.footer-col a { display: block; color: var(--muted); font-size: 0.92rem; padding: 0.3rem 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; color: var(--muted-2); font-size: 0.85rem; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .menu-btn { display: flex; }
  .nav-menu {
    position: fixed; inset: 0 0 0 auto; width: min(80%, 320px); height: 100dvh;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0.25rem;
    background: var(--panel-bg); border-left: 1px solid var(--border); padding: 6rem 1.5rem 2rem;
    transform: translateX(100%); transition: transform 0.4s var(--ease); z-index: 1050;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a.nav-link { padding: 0.9rem 1rem; font-size: 1.05rem; }
  .nav-menu .btn { margin: 1rem 0 0; justify-content: center; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; visibility: hidden; transition: opacity 0.3s; z-index: 1040; }
  .nav-overlay.open { opacity: 1; visibility: visible; }

  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .news-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Inner pages (rolled-out template)
   ============================================================ */

/* bare .btn fallback (content buttons without a modifier) */
.btn:not(.btn-primary):not(.btn-ghost) { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn:not(.btn-primary):not(.btn-ghost):hover { background: var(--surface-2); border-color: var(--accent-2); transform: translateY(-2px); }

/* Page hero (title banner) */
.page-hero { position: relative; overflow: hidden; padding: clamp(4rem,9vw,6.5rem) 0 clamp(2.4rem,5vw,3.4rem); border-bottom: 1px solid var(--border); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero .kicker { display: block; margin-bottom: 0.7rem; }
.page-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 700; }
.page-hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Main + prose */
.page-main { padding: clamp(3rem,7vw,5rem) 0 clamp(4rem,9vw,6rem); }
.prose { max-width: 820px; margin: 0 auto; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.6rem,3.5vw,2.2rem); color: var(--heading); margin: 2.6rem 0 1rem; }
.prose h3 { font-size: 1.3rem; color: var(--heading); margin: 2rem 0 0.8rem; }
.prose h4 { font-size: 1.05rem; color: var(--heading); margin: 1.6rem 0 0.6rem; }
.prose p { color: var(--muted); margin-bottom: 1.1rem; }
.prose strong { color: var(--heading); font-weight: 600; }
.prose a { color: var(--accent-2); }
.prose a:hover { text-decoration: underline; }
.prose img { border-radius: 10px; margin: 1rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4rem 0; }

/* lists */
.prose ul { list-style: none; padding: 0; margin: 0 0 1.3rem; display: grid; gap: 0.7rem; }
.prose ul li { position: relative; padding-left: 1.6rem; color: var(--muted); }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-grad); }
.prose ol { list-style: none; counter-reset: i; padding: 0; margin: 0 0 1.3rem; display: grid; gap: 0.8rem; }
.prose ol li { counter-increment: i; position: relative; padding-left: 2.4rem; color: var(--muted); }
.prose ol li::before { content: counter(i); position: absolute; left: 0; top: -0.1em; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 8px; font-family: var(--font-display); font-size: 0.85rem; color: var(--accent-2); background: rgba(34,211,238,0.10); border: 1px solid var(--border-2); }
.prose li strong { color: var(--heading); }

/* contact / address blocks */
.prose address { font-style: normal; display: inline-block; padding: 1.3rem 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); line-height: 1.9; }
.prose dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; line-height: 1.9; margin-bottom: 1.2rem; }
.prose dt { color: var(--heading); font-weight: 600; }
.prose dd { color: var(--muted); margin: 0; }

/* accent callout (reused from old .highlight-message) */
.prose .highlight-message { padding: 1.4rem 1.6rem; border-radius: var(--radius); border: 1px solid var(--border-2); border-left: 3px solid var(--accent); background: linear-gradient(135deg, rgba(124,92,255,0.10), rgba(34,211,238,0.05)); color: var(--heading); font-size: 1.1rem; margin: 1.8rem 0; }

/* forms */
.prose form { display: grid; gap: 1.2rem; max-width: 640px; }
.prose .form-group { display: grid; gap: 0.5rem; }
.prose label { color: var(--heading); font-weight: 600; font-size: 0.92rem; }
.prose input, .prose textarea, .prose select {
  width: 100%; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px;
  padding: 0.85rem 1rem; color: var(--text); font-family: var(--font-body); font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.prose input:focus, .prose textarea:focus, .prose select:focus { outline: none; border-color: var(--accent-2); background: var(--surface-2); }
.prose textarea { min-height: 170px; resize: vertical; }
.prose ::placeholder { color: var(--muted-2); }

/* client logo chips inside prose (e.g. clientele page) */
.prose .client-row { justify-content: flex-start; }

/* client logo grid (clientele page) */
.prose .client-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.6rem 0; }
.prose .client-logo { background: var(--chip-bg); border: 1px solid var(--border); border-radius: 12px; height: 92px; display: grid; place-items: center; padding: 1rem; transition: transform 0.3s var(--ease); }
.prose .client-logo:hover { transform: translateY(-4px); }
.prose .client-logo img { max-height: 54px; width: auto; margin: 0; border-radius: 0; }
@media (max-width: 760px) { .prose .client-grid { grid-template-columns: repeat(2, 1fr); } }

/* sitemap */
.prose .sitemap-section { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.prose .sitemap-section h3 { margin: 0 0 0.6rem; font-size: 1.1rem; }
.prose .sitemap-section h3 a { color: var(--heading); }
.prose .sitemap-section h3 a:hover { color: var(--accent-2); text-decoration: none; }
.prose ul.sitemap-links { margin: 0; gap: 0.45rem; }
.prose ul.sitemap-links li { padding-left: 0; }
.prose ul.sitemap-links li::before { display: none; }
.prose ul.sitemap-links li a { color: var(--muted); }
.prose ul.sitemap-links li a:hover { color: var(--accent-2); }
.prose ul.sitemap-links li.sub-link { padding-left: 1.1rem; }

/* dl pairs: drop stray <br> so the two-column grid stays aligned */
.prose dl br { display: none; }

/* ---- Header tools: theme toggle ---- */
.nav-right { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text); cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--heading); border-color: var(--accent-2); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ============================================================
   Mobile polish: safe-area insets (notch / home indicator).
   .nav-inner is also a .container, so extending .container covers
   the header too — no separate nav-inner rule needed.
   ============================================================ */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  .nav-menu { padding-right: max(1.5rem, env(safe-area-inset-right)); }
  .site-footer { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
}
