/* HayLuz VE website. Same language as the app: flat surfaces, one yellow accent, colour = meaning. */
:root {
  --bg: #F2F2F7; --card: #FFFFFF; --text: #111114; --muted: #5E5E66; --line: rgba(0,0,0,.08);
  --brand: #FFCC00; --brand-ink: #B25000; --power: #248A3D; --outage: #D70015; --uncertain: #C93400; --nodata: #8E8E93;
  --radius: 22px; --shadow: 0 1px 2px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not(.blackout) { --bg: #000; --card: #1C1C1E; --text: #F5F5F7; --muted: #A1A1A8; --line: rgba(255,255,255,.1);
    --brand-ink: #FFD60A; --power: #30D158; --outage: #FF453A; --uncertain: #FF9F0A; }
}
/* The hero switch "turns the light off": the whole page goes dark. */
:root.blackout { --bg: #050506; --card: #141416; --text: #E9E9EE; --muted: #8B8B93; --line: rgba(255,255,255,.08);
  --brand-ink: #FFD60A; --power: #30D158; --outage: #FF453A; --uncertain: #FF9F0A; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; transition: background-color .5s ease, color .5s ease; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #000; padding: 8px 12px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.fine { color: var(--muted); font-size: .8rem; margin-top: 16px; }
section { padding: 72px 0; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { border-radius: 9px; }
.brand b { color: var(--brand-ink); }
.top nav { display: flex; gap: 22px; font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--text); }
@media (max-width: 720px) { .top nav { display: none; } }

/* Hero */
.hero { padding-top: 64px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.kicker { color: var(--brand-ink); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 12px; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 38ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem; }
.btn.primary { background: var(--brand); color: #111; }
.btn.primary:hover { filter: brightness(.96); }
.soon { color: var(--muted); font-size: .9rem; }

.switch-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 32px 24px; text-align: center; box-shadow: var(--shadow); }
.switch-label { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.switch { width: 120px; height: 200px; border-radius: 30px; border: 1px solid var(--line); background: var(--bg); position: relative; cursor: pointer; padding: 0; }
.switch .knob { position: absolute; left: 14px; right: 14px; top: 14px; height: 84px; border-radius: 20px; background: var(--brand);
  transition: transform .35s cubic-bezier(.3,1.4,.5,1), background-color .35s; }
.switch[aria-pressed="true"] .knob { transform: translateY(86px); background: #2C2C2E; }
.switch-state { font-size: 1.6rem; font-weight: 800; margin: 18px 0 2px; }
.switch-clock { margin: 0; color: var(--outage); font-variant-numeric: tabular-nums; }
.switch-note { margin: 8px 0 0; color: var(--muted); font-size: .9rem; min-height: 1.4em; }

/* Numbers */
.numbers { padding: 24px 0 32px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stats b { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stats span { color: var(--muted); font-size: .9rem; }

/* Zone lookup */
.section-lead { color: var(--muted); margin: 0 0 18px; }
.search { position: relative; max-width: 620px; }
.search input { width: 100%; font: inherit; font-size: 1.1rem; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.results { position: absolute; z-index: 3; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; max-height: 340px; overflow: auto; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.results li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.results li small { display: block; color: var(--muted); }
.results li[aria-selected="true"], .results li:hover { background: var(--bg); }
.zone-card { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 26px; }
.zone-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.zone-head h3 { font-size: 1.6rem; margin: 0; }
.zone-head p { margin: 2px 0 0; }
.pill { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; background: color-mix(in srgb, currentColor 13%, transparent); }
.pill.on { color: var(--power); } .pill.off { color: var(--outage); } .pill.mixed { color: var(--uncertain); } .pill.none { color: var(--nodata); }
.zone-detail { color: var(--muted); }
.zone-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-top: 12px; align-items: start; }
@media (max-width: 760px) { .zone-grid { grid-template-columns: 1fr; } }
.panel { background: var(--bg); border-radius: 18px; padding: 18px; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); align-items: end; gap: 3px; height: 120px; }
.hours i { display: block; background: color-mix(in srgb, var(--outage) 35%, transparent); border-radius: 4px 4px 2px 2px; min-height: 3px; transition: height .5s ease; position: relative; }
.hours i.peak { background: var(--outage); }
.hours i:hover::after, .hours i:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-size: .75rem; white-space: nowrap; padding: 4px 8px; border-radius: 8px; font-style: normal; }
.hours-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: 6px; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.events li:last-child { border-bottom: 0; }
.events b { color: var(--outage); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Gallery */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.tabs button { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(300px, 72%); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; scrollbar-width: thin; }
.rail figure { margin: 0; scroll-snap-align: start; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: var(--card);
  transition: border-color .3s ease, transform .3s ease; }
.rail figure.active { border-color: var(--brand); transform: translateY(-4px); }

/* How */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps p { color: var(--muted); margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #111; font-weight: 800; margin-bottom: 14px; }

.privacy-strip { padding: 24px 0 56px; }
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-grid > div { border-top: 3px solid var(--brand); padding-top: 14px; }
.privacy-grid p { color: var(--muted); margin: 0; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 0 0 16px; }

/* Footer + legal pages */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 18px; }
.legal { padding: 48px 0 72px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal p, .legal li { color: var(--muted); }
.legal .updated { font-size: .9rem; }

/* Grid children may shrink below their content (long words, rails) instead of widening the page. */
.hero-grid > *, .zone-grid > *, .stats > *, .steps > *, .privacy-grid > * { min-width: 0; }
body { overflow-x: hidden; }
