/* IET — INNOVATION ENERGY TECHNOLOGY CORP.
   Theme: Stripe-style, with Dark / Light toggle.
   Light (day)  = Stripe: white / very light gray body, deep blue +
                   purple gradient accents, modern sans, mono for data.
   Dark (night) = near-black body, white text, IET orange signal,
                   reusing the previous dark-header discipline.
   The theme lives on <html data-theme="light|dark">. An inline script
   in Base.astro applies it before first paint (no white flash).
   No second brand, no copied content — theme language only. */
:root {
  /* Light / Stripe (day) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --ink: #0a2540;
  --body: #425466;
  --muted: #697386;
  --faint: #a3acb9;
  --line: #e3e8ee;
  --line-strong: #0a2540;
  --accent: #635bff;
  --accent-2: #a855f7;
  --accent-soft: #f1f0ff;
  --btn-bg: #0a2540;
  --btn-fg: #ffffff;
  --underline: linear-gradient(90deg, #635bff, #a855f7);
  --hero-grad: linear-gradient(115deg, #0a2540 0%, #232a7a 30%, #635bff 62%, #a855f7 100%);
  --footer-bg: #f6f9fc;
  --footer-fg: #0a2540;
  --footer-muted: #697386;
  --footer-rule: linear-gradient(90deg, #635bff, #a855f7);
  --header-bg: rgba(255, 255, 255, 0.86);
  --header-line: #e3e8ee;
  --th-bg: #f6f9fc;
  --code-bg: #f6f9fc;
  --logo-tile: #ffffff;
  --logo-tile-line: #e3e8ee;
  --logo-f1: #0a2540;
  --logo-f3: #a3b5ff;
  --logo-dot: #0a2540;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 16px 40px rgba(16, 24, 40, 0.12);
  --max: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}
:root[data-theme="dark"] {
  /* Dark (night) — near-black, white text, IET orange signal */
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --ink: #ffffff;
  --body: #d4d4d4;
  --muted: #9a9a9a;
  --faint: #6b6b6b;
  --line: #2a2a2a;
  --line-strong: #ffffff;
  --accent: #ff4d00;
  --accent-2: #ff8a50;
  --accent-soft: #1f140d;
  --btn-bg: #ff4d00;
  --btn-fg: #ffffff;
  --underline: #ff4d00;
  --hero-grad: linear-gradient(115deg, #060614 0%, #141a3a 45%, #2a1e6b 75%, #3b1d6e 100%);
  --footer-bg: #0a0a0a;
  --footer-fg: #ffffff;
  --footer-muted: #999999;
  --footer-rule: #ff4d00;
  --header-bg: rgba(10, 10, 10, 0.88);
  --header-line: #2a2a2a;
  --th-bg: #1a1a1a;
  --code-bg: #1a1a1a;
  --logo-tile: #1c1c1c;
  --logo-tile-line: #333333;
  --logo-f1: #ffffff;
  --logo-f3: #aaaaaa;
  --logo-dot: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.55);
}
/* Default (no data-theme attribute, e.g. JS disabled) is dark — same values
   as [data-theme="dark"] above. A saved / script-set data-theme="light"
   overrides this because :not([data-theme]) stops matching. */
:root:not([data-theme]) {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --ink: #ffffff;
  --body: #d4d4d4;
  --muted: #9a9a9a;
  --faint: #6b6b6b;
  --line: #2a2a2a;
  --line-strong: #ffffff;
  --accent: #ff4d00;
  --accent-2: #ff8a50;
  --accent-soft: #1f140d;
  --btn-bg: #ff4d00;
  --btn-fg: #ffffff;
  --underline: #ff4d00;
  --hero-grad: linear-gradient(115deg, #060614 0%, #141a3a 45%, #2a1e6b 75%, #3b1d6e 100%);
  --footer-bg: #0a0a0a;
  --footer-fg: #ffffff;
  --footer-muted: #999999;
  --footer-rule: #ff4d00;
  --header-bg: rgba(10, 10, 10, 0.88);
  --header-line: #2a2a2a;
  --th-bg: #1a1a1a;
  --code-bg: #1a1a1a;
  --logo-tile: #1c1c1c;
  --logo-tile-line: #333333;
  --logo-f1: #ffffff;
  --logo-f3: #aaaaaa;
  --logo-dot: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.55);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
::selection { background: var(--accent); color: #fff; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); color: #fff; padding: 6px 10px; z-index: 99; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); color: var(--accent); padding: 1px 5px; border-radius: 4px; }

/* Logo mark — fills follow the active theme via CSS classes */
.logo-tile { fill: var(--logo-tile); stroke: var(--logo-tile-line); }
.logo-f1 { fill: var(--logo-f1); }
.logo-f2 { fill: #ff4d00; }
.logo-f3 { fill: var(--logo-f3); }
.logo-dot { fill: var(--logo-dot); }

/* Header — Stripe light bar (day) / near-black bar (night). Sticky. */
.site-header { border-bottom: 1px solid var(--header-line); background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 24px; font-weight: 900; letter-spacing: 0.04em; color: var(--ink); }
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { position: relative; padding: 6px 8px; font-size: 14px; font-weight: 650; text-decoration: none; color: var(--ink); }
.site-nav a::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px; background: var(--underline); transform: scaleX(0); transform-origin: left; transition: transform 0.18s var(--ease); }
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Theme toggle — sun / moon, keyboard-focusable, aria-pressed */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease); }
.theme-toggle:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
.theme-toggle .toggle-label-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .toggle-label-dark { display: inline; }
:root[data-theme="dark"] .theme-toggle .toggle-label-light { display: none; }
/* No-JS default is dark: toggle shows sun + "Light" (switch to light). */
:root:not([data-theme]) .theme-toggle .icon-sun { display: inline; }
:root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
:root:not([data-theme]) .theme-toggle .toggle-label-dark { display: inline; }
:root:not([data-theme]) .theme-toggle .toggle-label-light { display: none; }

/* Layout */
main { max-width: var(--max); margin: 0 auto; padding: 8px 24px 72px; }
.breadcrumbs { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 20px 0 4px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 700; }

/* Hero — Stripe gradient mesh + diagonal composition + abstract geometry.
   White text on the gradient in both themes. Rounded card, soft shadow. */
.hero { position: relative; overflow: hidden; margin-top: 24px; padding: 64px 48px 56px; border-radius: 20px; background: var(--hero-grad); color: #fff; box-shadow: var(--shadow-hover); }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(520px 320px at 88% 8%, rgba(168, 85, 247, 0.55), transparent 60%),
  radial-gradient(480px 300px at 8% 100%, rgba(99, 91, 255, 0.45), transparent 60%),
  radial-gradient(300px 200px at 60% 110%, rgba(255, 77, 0, 0.25), transparent 65%);
  pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -180px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%; pointer-events: none; }
.hero > * { position: relative; }
.hero .kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #d9d4ff; }
.hero .kicker::before { content: ""; width: 24px; height: 2px; background: #fff; }
.hero h1 { font-size: clamp(52px, 8.5vw, 100px); line-height: 0.94; letter-spacing: -0.035em; font-weight: 900; margin: 20px 0 16px; text-wrap: balance; }
.hero .lede { font-size: 20px; line-height: 1.5; max-width: 740px; color: rgba(255, 255, 255, 0.88); }
.hero p time { font-family: var(--mono); font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; padding: 13px 22px; font-weight: 800; font-size: 15px; text-decoration: none; border: 1px solid var(--btn-bg); border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
/* Buttons on the gradient hero: white pill (Stripe) in light theme,
   orange accent button in dark theme (dark-default discipline). */
.hero .btn { background: #fff; border-color: #fff; color: #0a2540; }
.hero .btn:hover { background: #fff; color: #0a2540; }
:root[data-theme="dark"] .hero .btn,
:root:not([data-theme]) .hero .btn { background: #ff4d00; border-color: #ff4d00; color: #fff; }
:root[data-theme="dark"] .hero .btn:hover,
:root:not([data-theme]) .hero .btn:hover { background: #ff6a26; border-color: #ff6a26; color: #fff; }
.hero .btn.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* Sections — Stripe: clearly separated blocks, soft borders, roomy rhythm */
section { padding: 48px 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }
h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -0.025em; font-weight: 900; margin: 0 0 14px; text-wrap: balance; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; margin: 20px 0 8px; font-weight: 800; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.grid { display: grid; gap: 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
/* Split layout — two-column Stripe-style block (text + visual / data) */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: var(--surface); box-shadow: var(--shadow); transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease); }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card h3 { margin-top: 0; }
.card .num { font-size: 44px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.card .num small { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat-card { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: var(--surface); box-shadow: var(--shadow); transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.stat-value { font-size: 34px; font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; }
.stat-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.note { background: var(--accent-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: 16px 18px; font-size: 14px; line-height: 1.6; color: var(--body); }
.note strong { color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--th-bg); color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
tbody tr:hover td { background: var(--surface-2); }
.badge { display: inline-block; border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); }
.badge.orange { background: var(--accent); color: #fff; }
figure.diagram { margin: 24px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
figure.diagram iframe { display: block; width: 100%; height: 660px; border: 0; background: #fff; }
figure.diagram figcaption { padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
.feed-item { border-top: 1px solid var(--line); padding: 22px 0; }
.feed-item time { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.feed-item h3 { margin: 8px 0 6px; font-size: 24px; }
.feed-item h3 a { text-decoration: none; }
.feed-item h3 a:hover { color: var(--accent); }
.feed-item p { color: var(--body); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 24px; }
.filter-row a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; background: var(--surface); }
.filter-row a:hover { border-color: var(--accent); color: var(--accent); }
.filter-row a.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mail-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.mail-list li { border-bottom: 1px solid var(--line); padding: 6px 0; font-size: 15px; }
.mail-list a { font-weight: 600; text-decoration: none; }
.mail-list a:hover { color: var(--accent); }

/* Footer — Stripe light footer (day) / near-black footer (night) */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); margin-top: 0; border-top: 2px solid transparent; border-image: var(--footer-rule) 1; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 48px 24px 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer a { color: var(--footer-fg); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand .brand-mark { width: 44px; height: 44px; }
.footer-brand .brand-name { color: var(--footer-fg); }
.footer-brand .brand-sub { color: var(--footer-muted); }
.footer-blurb { font-size: 14px; color: var(--footer-muted); max-width: 340px; }
.footer-note { font-size: 13px; color: var(--footer-muted); }
.footer-inner h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner li { margin-bottom: 7px; font-size: 14px; }
.copyright { max-width: var(--max); margin: 0 auto; padding: 18px 24px 26px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--footer-muted); }

@media (max-width: 760px) {
  .grid.cols-2, .grid.cols-3, .split, .footer-inner, .mail-list { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-nav { margin-left: 0; }
  .hero { padding: 40px 24px 36px; }
  .hero h1 { font-size: clamp(44px, 13vw, 64px); }
  figure.diagram iframe { height: 520px; }
}
