/* Wattfeld — public website.
 *
 * No web fonts, no analytics, no third-party requests. One script of our own (site.js),
 * no cookies. datenschutz.html relies on all of that being true; keep it true.
 *
 * Palette, from a review of Crusoe, Nscale, Verne, EcoDataCenter, Green Mountain, Vantage,
 * Aligned and Yondr (2026-09-28): a blue-black base rather than grey, warm off-white text
 * rather than pure white, and no brand accent in the interface at all. The only saturated
 * colour on the page is energy moving through the drawing: power, cold water, hot water.
 */

:root {
  --ink:      #05080f;
  --ink-2:    #0a0f19;
  --paper:    #f2efe6;
  --paper-2:  rgba(242, 239, 230, 0.72);
  --muted:    rgba(242, 239, 230, 0.48);
  --hair:     rgba(242, 239, 230, 0.12);
  --hair-2:   rgba(242, 239, 230, 0.2);

  --power:    #f4d58d;
  --cold:     #4da3ff;
  --hot:      #ff7a45;

  --bg-now:   var(--ink);          /* set per frame by site.js as the scroll moves */
  --tone:     var(--paper);        /* colour of the current stage */

  --sans: "Geist", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-now);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 300; letter-spacing: -0.035em; line-height: 1.04; }
p { margin: 0; }
::selection { background: var(--paper); color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 500;
}

/* ------------------------------------------------------------------ header */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  height: 72px; padding: 0 var(--gutter);
  transition: background-color .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.top.scrolled {
  background: color-mix(in srgb, var(--bg-now) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
          backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--hair);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 500; letter-spacing: -0.02em; font-size: 18px; }
.brand svg { width: 22px; height: 22px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 30px; }
.top nav a { text-decoration: none; font-size: 14px; color: var(--paper-2); transition: color .2s; }
.top nav a:hover { color: var(--paper); }
.top .lang { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--paper); color: var(--ink) !important;
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: transform .25s, background-color .25s;
}
.pill:hover { background: #fff; transform: translateY(-1px); }
.pill.ghost { background: transparent; color: var(--paper) !important; box-shadow: inset 0 0 0 1px var(--hair-2); }
.pill.ghost:hover { box-shadow: inset 0 0 0 1px var(--paper-2); }
.pill .arr { transition: transform .25s; }
.pill:hover .arr { transform: translateX(3px); }
@media (max-width: 860px) { .top nav a.opt { display: none; } .top nav { gap: 18px; } }

.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--tone); transition: background-color .6s; }

/* ------------------------------------------------------------------ the scroll */

.scrolly { position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
}
.stage::before {                                   /* halo in the colour of the stage */
  content: ""; position: absolute; inset: -20%;
  background: radial-gradient(40% 45% at 68% 52%, color-mix(in srgb, var(--tone) 13%, transparent), transparent 70%);
  transition: background .8s;
  pointer-events: none;
}
.stage-art { position: absolute; inset: 0; }
.stage-art > img { position: absolute; inset: auto 0 6% 0; width: 100%; height: 48%; object-fit: contain; opacity: .8; }
.stage-art > svg { width: 100%; height: 100%; }
.stage::after {                                    /* scrim so the copy reads over the drawing */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  /* --x0 is where the copy column ends, measured by site.js */
  background: linear-gradient(90deg,
    var(--bg-now) 0%,
    color-mix(in srgb, var(--bg-now) 92%, transparent) calc(var(--x0, 40%) - 6%),
    transparent calc(var(--x0, 40%) + 3%));
}
.stage.at-hero::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg-now) 70%, transparent) 0%, transparent 40%); }

.rail {
  position: absolute; right: var(--gutter); bottom: 40px; z-index: 3;
  list-style: none; margin: 0; padding: 0; display: grid; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.rail li { display: flex; align-items: center; gap: 12px; color: var(--muted); transition: color .4s; justify-content: flex-end; }
.rail li em { font-style: normal; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: opacity .4s; }
.rail li::after { content: ""; width: 14px; height: 1px; background: currentColor; transition: width .4s, background-color .4s; }
.rail li.on { color: var(--paper); }
.rail li.on em { max-width: none; opacity: 1; }
.rail li.on::after { width: 36px; background: var(--tone); }
.rail { width: 170px; transition: opacity .5s; }
.stage.at-hero .rail { opacity: 0; }

.steps { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; }
.step {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 0 var(--gutter);
}
.step:last-child { min-height: 150svh; align-items: flex-start; padding-top: 25svh; }
.card { max-width: min(30rem, 38vw); }
.step .kicker { color: var(--tone); display: flex; gap: 14px; align-items: center; margin-bottom: 26px; transition: color .6s; }
.step .kicker b { font-weight: 500; color: var(--muted); }
.step h2 { font-size: clamp(2rem, 3.7vw, 3.2rem); margin-bottom: 22px; }
.step p { color: var(--paper-2); font-size: 17.5px; }
.step p + p { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding: 0; list-style: none; }
.chips li {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--paper-2);
}

.step.hero { align-items: flex-start; padding-top: 22svh; }
.hero .card { max-width: 62rem; }
.hero h1 { font-size: clamp(2.7rem, 6.6vw, 6.4rem); line-height: .98; letter-spacing: -0.045em; }
.hero h1 span { color: var(--muted); }
.hero .lede { margin-top: 30px; max-width: 36rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--paper-2); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.cue { position: absolute; left: var(--gutter); bottom: 40px; z-index: 3; color: var(--muted); display: flex; gap: 14px; align-items: center; transition: opacity .5s; }
.cue i { width: 1px; height: 38px; background: linear-gradient(var(--paper), transparent); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.stage:not(.at-hero) .cue { opacity: 0; }

@media (max-width: 760px) {
  .stage::after { background: linear-gradient(0deg, var(--bg-now) 0%, color-mix(in srgb, var(--bg-now) 70%, transparent) 42%, transparent 58%); }
  .stage.at-hero::after { background: linear-gradient(0deg, var(--bg-now) 0%, color-mix(in srgb, var(--bg-now) 60%, transparent) 50%, transparent 62%); }
  .rail { display: none; }
  .step { align-items: flex-end; padding-bottom: 7svh; }
  .step.hero { align-items: flex-end; padding-top: 0; }
  .step:last-child { padding-top: 0; align-items: flex-end; min-height: 130svh; }
  .card { max-width: none; }
  .step:not(.hero) .card {
    padding: 22px 22px 24px; border-radius: 14px;
    background: color-mix(in srgb, var(--bg-now) 84%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px var(--hair);
  }
  .step h2 { font-size: 1.85rem; margin-bottom: 14px; }
  .step p { font-size: 16px; }
  .chips { margin-top: 18px; }
  .cue { display: none; }
}

/* ------------------------------------------------------------------ the drawing */

.stage-art .fx { --k: 2; }
.stage-art .fx .ln, .stage-art .fx .box, .stage-art .fx .wall, .stage-art .fx .rack, .stage-art .fx .pv {
  fill: var(--bg-now); stroke: rgba(242, 239, 230, .62);
  stroke-width: calc(var(--k) * 1.1px); stroke-linejoin: round; stroke-linecap: round;
}
.stage-art .fx .ln { fill: none; }
.stage-art .fx .faint { stroke: rgba(242, 239, 230, .2); }
.stage-art .fx .wire { stroke: rgba(242, 239, 230, .38); }
.stage-art .fx .ground { stroke: rgba(242, 239, 230, .3); }
.stage-art .fx .wall { stroke: rgba(242, 239, 230, .38); }
.stage-art .fx .pv { fill: color-mix(in srgb, var(--bg-now) 70%, #1b2a44); }
.stage-art .fx .soil { fill: color-mix(in srgb, var(--bg-now) 96.5%, #fff); }
.stage-art .fx .hallglow { fill: url(#hg); opacity: .8; transition: opacity 1s; }
.stage-art .fx .srv { stroke: rgba(242, 239, 230, .16); }
.stage-art .fx .led { fill: var(--cold); animation: blink var(--d) steps(2, jump-none) infinite; }
@keyframes blink { 0%, 60% { opacity: .95; } 61%, 100% { opacity: .15; } }

.stage-art .fx .structure { opacity: .8; }
.stage-art .fx .part { opacity: .26; transition: opacity .7s ease; }
.stage-art .fx .part.past { opacity: .5; }
.stage-art .fx .part.on { opacity: 1; }
.stage-art .fx[data-active="0"] .part { opacity: .62; }
.stage-art .fx[data-active="5"] .hallglow { opacity: 1; }

.stage-art .fx .lbl { opacity: 0; transition: opacity .5s; }
.stage-art .fx .part.on .lbl { opacity: 1; transition-delay: .25s; }
.stage-art .fx .lbl text {
  font-family: var(--mono); font-weight: 500; font-size: calc(var(--k) * 11px);
  letter-spacing: .1em; text-transform: uppercase; fill: var(--paper);
}
.stage-art .fx .lead { fill: none; stroke: rgba(242, 239, 230, .45); stroke-width: calc(var(--k) * .8px); }
.stage-art .fx .dot { fill: var(--paper); stroke: none; }

.stage-art .fx .flow { fill: none; stroke-width: calc(var(--k) * 2px); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.stage-art .fx .pulse {
  fill: none; stroke-width: calc(var(--k) * 3px); stroke-linecap: round;
  stroke-dasharray: 1.2 8.8; opacity: 0; transition: opacity .6s;
  animation: run 1.6s linear infinite;
}
.stage-art .fx .pulse.run { opacity: 1; }
@keyframes run { to { stroke-dashoffset: -10; } }
.stage-art .fx .power { stroke: var(--power); }
.stage-art .fx .cold  { stroke: var(--cold); }
.stage-art .fx .hot   { stroke: var(--hot); }
.stage-art .fx .pulse.power { stroke: #fff6dc; }
.stage-art .fx .pulse.cold  { stroke: #bfe0ff; }
.stage-art .fx .pulse.hot   { stroke: #ffd2bd; }
.stage-art .fx .flow.power, .stage-art .fx .pulse.power { filter: drop-shadow(0 0 calc(var(--k) * 3px) rgba(244, 213, 141, .55)); }
.stage-art .fx .flow.cold,  .stage-art .fx .pulse.cold  { filter: drop-shadow(0 0 calc(var(--k) * 3px) rgba(77, 163, 255, .55)); }
.stage-art .fx .flow.hot,   .stage-art .fx .pulse.hot   { filter: drop-shadow(0 0 calc(var(--k) * 3px) rgba(255, 122, 69, .55)); }

.stage-art .fx .win { fill: rgba(242, 239, 230, .05); stroke: rgba(242, 239, 230, .3); stroke-width: calc(var(--k) * .8px); transition: fill .9s ease var(--wd), filter .9s ease var(--wd); }
.stage-art .fx.warm .win { fill: #ffb37a; filter: drop-shadow(0 0 calc(var(--k) * 6px) rgba(255, 150, 90, .8)); }

/* ------------------------------------------------------------------ sections after the scroll */

.sec { padding: clamp(96px, 14vh, 160px) 0; border-top: 1px solid var(--hair); position: relative; }
.sec-head { display: grid; grid-template-columns: 200px 1fr; gap: 24px 48px; margin-bottom: clamp(48px, 7vh, 80px); }
.sec-head .mono { color: var(--muted); padding-top: 14px; }
.sec-head h2 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); max-width: 16ch; }
.sec-head p { grid-column: 2; color: var(--paper-2); max-width: 40rem; font-size: 18px; }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } .sec-head p { grid-column: 1; } }

/* Croatia */
.project { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (max-width: 960px) { .project { grid-template-columns: 1fr; } }
.render {
  position: relative; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(242, 239, 230, .04) 14px 15px),
    var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--hair);
  display: grid; place-items: center; text-align: center; padding: 24px;
}
.render .mono { color: var(--muted); }
.render .corner { position: absolute; width: 16px; height: 16px; border: 1px solid var(--hair-2); }
.render .c1 { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.render .c2 { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.render .c3 { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.render .c4 { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.facts dt, .facts dd { padding: 16px 0; border-bottom: 1px solid var(--hair); margin: 0; }
.facts dt { color: var(--muted); padding-right: 28px; }
.facts dd { font-size: 17px; }
.facts > :nth-child(-n+2) { border-top: 1px solid var(--hair); }
.ph { color: #e9c88a; background: rgba(233, 200, 138, .08); border-radius: 3px; padding: 1px 6px; font-family: var(--mono); font-size: .86em; }

.timeline { list-style: none; margin: clamp(48px, 7vh, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: var(--hair-2); }
.timeline li { position: relative; padding: 30px 16px 0 0; }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-now); box-shadow: inset 0 0 0 1px var(--paper-2); }
.timeline .mono { color: var(--muted); display: block; margin-bottom: 8px; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; gap: 22px; }
  .timeline::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .timeline li { padding: 0 0 0 30px; }
}

/* site owners */
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair); }
@media (max-width: 960px) { .routes { grid-template-columns: 1fr; } }
.route { background: var(--bg-now); padding: clamp(28px, 3vw, 44px); transition: background-color .4s; }
.route:hover { background: color-mix(in srgb, var(--bg-now) 90%, #fff); }
.route .mono { color: var(--muted); }
.route h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin: 88px 0 16px; }
.route p { color: var(--paper-2); font-size: 16.5px; }
.note { margin-top: 44px; display: flex; gap: 22px; align-items: baseline; color: var(--paper-2); max-width: 52rem; font-size: 18px; }
.note .mono { color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) { .note { flex-direction: column; gap: 8px; } }

/* contact */
.contact .big {
  display: inline-block; font-size: clamp(2rem, 6.4vw, 5.6rem); font-weight: 300; letter-spacing: -0.045em;
  text-decoration: none; line-height: 1; border-bottom: 1px solid var(--hair-2); padding-bottom: 12px;
  transition: border-color .3s; word-break: break-word;
}
.contact .big:hover { border-color: var(--paper); }
.contact .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(56px, 8vh, 96px); }
.contact .cols .mono { color: var(--muted); display: block; margin-bottom: 12px; }
.contact .cols p { color: var(--paper-2); font-size: 16px; }
@media (max-width: 860px) { .contact .cols { grid-template-columns: 1fr; } }

/* footer */
.foot { border-top: 1px solid var(--hair); padding: 36px 0 44px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; color: var(--muted); font-size: 14px; }
.foot a { text-decoration: none; color: var(--paper-2); }
.foot a:hover { color: var(--paper); }
.foot .sp { margin-left: auto; }

/* reveal on scroll, JS only */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }

/* ------------------------------------------------------------------ legal pages */

.legal { padding: 150px 0 110px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 18px; }
.legal .sub { color: var(--muted); margin-bottom: 48px; }
.legal h2 { font-size: 1.35rem; letter-spacing: -0.02em; font-weight: 400; margin: 52px 0 14px; }
.legal p, .legal li { color: var(--paper-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--paper); text-underline-offset: 3px; }
.legal dl { display: grid; grid-template-columns: 220px 1fr; margin: 0; }
.legal dt, .legal dd { padding: 13px 0; border-bottom: 1px solid var(--hair); margin: 0; }
.legal dt { color: var(--muted); }
@media (max-width: 640px) { .legal dl { grid-template-columns: 1fr; } .legal dt { border-bottom: 0; padding-bottom: 0; } }
.todo {
  border-radius: 8px; padding: 18px 20px; margin: 0 0 40px;
  background: rgba(233, 200, 138, .07); box-shadow: inset 0 0 0 1px rgba(233, 200, 138, .3);
  color: #ecd6aa; font-size: 15px;
}
.todo code { font-family: var(--mono); font-size: .9em; }

/* ------------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .stage-art .fx .pulse { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
