/* Spare Megawatt site. Light by default; dark only when the visitor picks it (data-theme="dark"). */
:root {
  --ink: #121417; --paper: #F4F5F2; --card: #FFFFFF; --soft: #4A5057; --rule: #DCDFDA; --fline: #7C838A;
  --green: #0B7A49; --gfx: #0E9E5F; --glow: #19C27A;
  --table: #0E1012; --on-table: #F4F5F2; --on-table-2: #C9CED2; --hair-d: rgba(244, 245, 242, .16);
  --gut: clamp(20px, 4.2vw, 68px); --ease: cubic-bezier(.16, 1, .3, 1);
  --display: 'Antonio', 'Arial Narrow', sans-serif; --mono: 'Overpass Mono', ui-monospace, monospace;
}
:root[data-theme="dark"] { --ink: #F4F5F2; --paper: #121417; --card: #1B1F23; --soft: #B9BFC4; --rule: #2C3237; --green: #19C27A; --gfx: #19C27A; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 'Public Sans', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gut); }
.display { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.04; }
.kicker { font-family: var(--mono); font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 1px solid transparent; border-radius: 3px; font: 700 1rem/1 'Public Sans', sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .5s var(--ease), background-color .25s, color .25s, border-color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn--green { background: var(--glow); color: #0B0D0F; }
.btn--green:hover { background: #3BD691; }
.btn--ghost { border-color: rgba(244, 245, 242, .5); color: var(--on-table); }
.btn--ghost:hover { border-color: var(--on-table); }
.btn--ink { background: var(--ink); color: var(--paper); width: 100%; }
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* header */
.hd { position: fixed; z-index: 10; top: 0; left: 0; right: 0; height: 72px; padding: 0 var(--gut); display: flex; align-items: center; gap: 28px; color: var(--on-table); transition: background-color .35s, height .4s var(--ease), backdrop-filter .35s; }
.hd.is-stuck { height: 60px; background: rgba(14, 16, 18, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hd__logo { display: flex; align-items: center; min-height: 44px; margin-right: auto; }
.hd__logo img { display: block; width: 190px; height: auto; }
.hd__nav { display: flex; gap: 26px; font-size: .95rem; font-weight: 600; }
.hd__nav a { text-decoration: none; padding: 12px 0; opacity: .86; transition: opacity .25s; }
.hd__nav a:hover { opacity: 1; }
.hd__cta { min-height: 44px; padding: 0 18px; font-size: .92rem; }
@media (max-width: 860px) { .hd__nav { display: none; } }
@media (max-width: 520px) { .hd__cta { display: none; } }

/* hero */
.hero { position: relative; min-height: max(100svh, 640px); padding-top: 96px; background: var(--table); color: var(--on-table); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.hero__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.72) contrast(1.06) brightness(.9); animation: drift 26s var(--ease) both; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(14, 16, 18, .96) 4%, rgba(14, 16, 18, .7) 40%, rgba(14, 16, 18, .25) 72%, rgba(14, 16, 18, .45) 100%), linear-gradient(to right, rgba(14, 16, 18, .7), rgba(14, 16, 18, 0) 66%); }
.hero__body { position: relative; padding: 0 var(--gut); }
.hero__kicker { color: var(--on-table-2); animation: fadeUp 1s var(--ease) .15s both; }
.hero__title { font-size: clamp(2.5rem, 6.6vw, 6.8rem); margin-top: 16px; }
.ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.ln > span { display: block; animation: rise 1.3s var(--ease) both; }
.ln:nth-child(2) > span { animation-delay: .1s; }
.ln:nth-child(3) > span { animation-delay: .2s; }
.ln:nth-child(3) { color: var(--glow); }
@media (max-width: 600px) { .hero { padding-top: 84px; } .hero__title { font-size: clamp(1.8rem, 9vw, 3.2rem); } .hero__kicker { font-size: .68rem; letter-spacing: .1em; } }
@keyframes rise { from { transform: translateY(112%); } to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 48px; margin: clamp(20px, 3vh, 34px) 0 clamp(22px, 3.6vh, 38px); animation: fadeUp 1.2s var(--ease) .45s both; }
.hero__lead { max-width: 52ch; font-size: clamp(1.02rem, 1.25vw, 1.2rem); line-height: 1.45; color: var(--on-table-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cartouche { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hair-d); animation: fadeUp 1.2s var(--ease) .6s both; }
.cartouche > div { padding: 12px 16px 16px; border-left: 1px solid var(--hair-d); }
.cartouche > div:first-child { border-left: 0; padding-left: var(--gut); }
.cartouche dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-table-2); }
.cartouche dd { font-size: .92rem; margin-top: 2px; }
@media (max-width: 760px) { .cartouche { grid-template-columns: repeat(2, 1fr); } .cartouche > div:nth-child(3) { border-left: 0; padding-left: var(--gut); } .cartouche > div:nth-child(n+3) { border-top: 1px solid var(--hair-d); } }

/* the film: one pinned screen, the footage changes as you scroll */
.film { position: relative; background: var(--table); color: var(--on-table); }
.film__stage { position: sticky; top: 0; height: 100svh; min-height: 560px; overflow: hidden; }
.film__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: grayscale(.72) contrast(1.06) brightness(.9); transform: scale(1.05); transition: opacity .8s ease, transform 7s var(--ease); }
.film__frame video.is-on { opacity: 1; transform: none; }
.film__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(14, 16, 18, .94) 0, rgba(14, 16, 18, .62) 26%, rgba(14, 16, 18, 0) 56%), linear-gradient(to bottom, rgba(14, 16, 18, .6), rgba(14, 16, 18, 0) 20%); }
.film__top { position: absolute; top: 84px; left: var(--gut); right: var(--gut); display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: rgba(14, 16, 18, .66); color: var(--on-table-2); border-radius: 2px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border: 1px solid currentColor; transition: background-color .4s, border-color .4s; }
.dots i.is-on { background: var(--glow); border-color: var(--glow); }
.film__caps { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(30px, 6vh, 64px); height: 0; }
.film__cap { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; pointer-events: none; transition: opacity .35s; }
.film__cap.is-on { opacity: 1; transition: opacity .5s .1s; }
.film__cap h2 { font-size: clamp(2.3rem, 6vw, 6rem); }
.film__cap .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.film__cap .w > span { display: inline-block; transform: translateY(112%); transition: transform 1s var(--ease); }
.film__cap.is-on .w > span { transform: none; }
.film__cap:last-child h2 { color: var(--glow); }
.film__cap p { margin-top: 12px; max-width: 52ch; font-size: clamp(1.02rem, 1.3vw, 1.25rem); color: var(--on-table-2); }
.film__steps { margin-top: -100svh; visibility: hidden; pointer-events: none; }
.film__steps > div { height: 105svh; }

/* section titles */
.sheet__title { font-size: clamp(2.1rem, 4.6vw, 4.4rem); margin-top: 14px; max-width: 18ch; }

/* contact */
.contact { padding: clamp(72px, 11vh, 140px) 0; background: var(--card); border-top: 1px solid var(--rule); }
.contact__grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px clamp(40px, 7vw, 110px); }
.contact__text { flex: 999 1 420px; min-width: 0; }
.lead { margin-top: 20px; font-size: 1.2rem; max-width: 40ch; }
.letter { margin-top: clamp(32px, 5vh, 56px); padding: 24px 26px; border-left: 4px solid var(--gfx); background: var(--paper); max-width: 520px; }
.letter h3 { font-size: 1.15rem; }
.letter p { margin-top: 8px; color: var(--soft); }
.form { flex: 1 1 380px; min-width: 0; max-width: 480px; display: flex; flex-direction: column; gap: 6px; padding: 30px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; }
.form label { font-size: .92rem; font-weight: 600; margin-top: 10px; }
.form label span { font-weight: 400; color: var(--soft); }
.form input { width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--card); border: 1px solid var(--fline); border-radius: 4px; }
.form input.mono { font-family: var(--mono); }
.form__pair { display: flex; flex-wrap: wrap; gap: 0 16px; }
.form__pair > div { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.form .btn { margin-top: 18px; }
.form__note { margin-top: 8px; font-size: .86rem; color: var(--soft); }
.form__note.is-ok { color: var(--green); font-weight: 600; }
.form__note.is-bad { color: #B3261E; font-weight: 600; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* footer */
.ft { background: var(--table); color: var(--on-table-2); padding: 36px 0; font-size: .92rem; }
.ft__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 36px; }
.ft__row img { display: block; margin-right: auto; }
.ft a { padding: 12px 0; }
.ft__theme { min-height: 44px; padding: 0 14px; background: none; color: inherit; border: 1px solid var(--hair-d); border-radius: 3px; font: inherit; cursor: pointer; }
.ft__theme:hover { border-color: var(--on-table-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .film__cap .w > span { transform: none; }
}
