@font-face { font-family: "Grenze Gotisch"; src: url("/fonts/grenze-gotisch.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --display: "Grenze Gotisch", "Iowan Old Style", Georgia, serif;
  --text: "Schibsted Grotesk", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sun-x: 50%; --sun-y: 30%; --moon-x: 0.5; --moon-y: 0.5; --rise: 0.3; --set: 0.8;
}

/* Four skies. sky.js picks one from where the sun stands over Voss. */
:root, :root[data-sky="day"] {
  color-scheme: light;
  --sky-a: #63b7ea; --sky-b: #cdeef2; --ink: #0c2236; --far: #7fa6c0; --near: #52798f; --snow: #ffffff;
  --ground: #a9c93f; --on-ground: #17220a; --rock: #27343d; --on-rock: #e6edea; --link-rock: #cfe86e;
  --button: #0c2236; --on-button: #eaf7f5; --sun: #fff2a8; --moon: #dfe6ff; --cut: #16202a; --cut-hi: #ffffff8c; --edge: #37454f; --cast: #3c4d1280; --slit: #16202a;
}
:root[data-sky="golden"] {
  color-scheme: light;
  --sky-a: #ffac79; --sky-b: #ffe2a3; --ink: #2c1233; --far: #cf7f74; --near: #93506a; --snow: #ffe3cb;
  --ground: #c9b23c; --on-ground: #241a06; --rock: #3a2140; --on-rock: #fbe9dc; --link-rock: #ffcf8a;
  --button: #2c1233; --on-button: #ffeede; --sun: #fff6d6; --moon: #dfe6ff; --cut: #2a1230; --cut-hi: #fff4e08c; --edge: #4a2a50; --cast: #4a3a1280; --slit: #2a1230;
}
:root[data-sky="twilight"] {
  color-scheme: dark;
  --sky-a: #2a2063; --sky-b: #a63f6b; --ink: #fff2ee; --far: #5c2b63; --near: #3c2156; --snow: #e98a94;
  --ground: #24432f; --on-ground: #eef5d8; --rock: #1b1436; --on-rock: #f3e6ea; --link-rock: #ffc65c;
  --button: #ffc65c; --on-button: #2a1330; --sun: #ffd7a0; --moon: #f4e6f2; --cut: #ffd488; --cut-hi: transparent; --edge: #160f30; --cast: #0d1a1699; --slit: #0d0824;
}
:root[data-sky="night"] {
  color-scheme: dark;
  --sky-a: #17143c; --sky-b: #43347c; --ink: #f3efff; --far: #302861; --near: #221c4a; --snow: #8a83c4;
  --ground: #16342d; --on-ground: #e6f2dc; --rock: #110f2a; --on-rock: #e7e3f7; --link-rock: #ffc65c;
  --button: #ffc65c; --on-button: #1d1640; --sun: #ffd7a0; --moon: #eeeaff; --cut: #ffd488; --cut-hi: transparent; --edge: #0c0a22; --cast: #07120f99; --slit: #07061a;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--rock); }
body { margin: 0; font: 400 1.125rem/1.55 var(--text); color: var(--on-ground); background: var(--ground); }
h1, h2, h3 { font-family: var(--display); font-weight: 750; line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.16em; }
::selection { background: var(--button); color: var(--on-button); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 9; padding: 0.6rem 1rem; background: var(--button); color: var(--on-button); }
.skip:focus { top: 1rem; }

/* The sky */
.hero { position: relative; isolation: isolate; display: grid; grid-template: auto 1fr auto / minmax(0, 1fr) minmax(0, 0.95fr); column-gap: clamp(1rem, 4vw, 4rem); min-height: 100svh; padding: clamp(1.5rem, 5vh, 4rem) var(--gutter) 0; color: var(--ink); background: linear-gradient(var(--sky-a), var(--sky-b) 78%); overflow: hidden; --ground-h: clamp(9.5rem, 23svh, 13rem); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: var(--ground-h); background: var(--ground); z-index: -1; }
.sky { position: absolute; inset: 0 0 var(--ground-h); z-index: -2; overflow: hidden; }
.stars, .ridges { position: absolute; left: 0; width: 100%; }
.ridges { left: 50%; width: max(100%, 60rem); translate: -50% 0; }
.stars { top: 0; height: 100%; fill: #fff; opacity: 0; mask-image: linear-gradient(#000 8%, transparent 48%); }
[data-sky="night"] .stars { opacity: 0.85; }
[data-sky="twilight"] .stars { opacity: 0.25; }
.ridges { bottom: -1px; height: clamp(7rem, 23svh, 17rem); }
.far { fill: var(--far); } .near { fill: var(--near); } .snow { fill: var(--snow); }
.sun, .moon { position: absolute; width: clamp(4rem, 8vw, 7.5rem); aspect-ratio: 1; border-radius: 50%; translate: -50% 50%; }
.sun { left: var(--sun-x); bottom: calc(6% + var(--sun-y)); background: var(--sun); }
.moon { left: calc(50% + var(--moon-x) * 46%); bottom: calc(52% + var(--moon-y) * 34%); width: clamp(2.5rem, 4.5vw, 4.5rem); background: var(--moon); opacity: 0; }
[data-sky="night"] .moon, [data-sky="twilight"] .moon { opacity: 1; }
[data-sky="night"] .sun { opacity: 0; }

.say { grid-row: 2; grid-column: 1; align-self: center; padding-bottom: clamp(5rem, 17svh, 10rem); }
h1 { font-size: clamp(4.25rem, 11.2vw, 10.5rem); font-weight: 800; line-height: 0.82; letter-spacing: -0.025em; margin-left: -0.03em; }
.lead { font-size: clamp(1.3rem, 2.1vw, 1.9rem); line-height: 1.25; font-weight: 500; max-width: 20em; margin-top: 1.5rem; }
.first { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; font-weight: 600; }
.button { display: inline-block; padding: 0.85rem 1.4rem; background: var(--button); color: var(--on-button); text-decoration: none; clip-path: polygon(0.6rem 0, 100% 0, 100% calc(100% - 0.6rem), calc(100% - 0.6rem) 100%, 0 100%, 0 0.6rem); }
.button:hover { text-decoration: underline; }
.button:focus-visible { outline-offset: -6px; outline-color: var(--on-button); }

nav { display: flex; gap: 1.75rem; font-weight: 600; grid-column: 1 / -1; grid-row: 1; align-self: start; }
nav a { text-decoration: none; padding: 0.4rem 0; } nav a:hover { text-decoration: underline; }

/* The stones */
.stack { grid-row: 1 / 4; grid-column: 2; align-self: end; justify-self: center; width: 100%; height: min(calc(100svh - 4.5rem), 51rem); margin-bottom: clamp(1rem, 4svh, 2.5rem); overflow: visible; }
.f { stroke-width: 0.7; stroke-linejoin: round; }
.edge { fill: var(--edge); stroke: var(--edge); stroke-width: 1.4; stroke-linejoin: round; }
.cast { fill: var(--cast); }
.trunk { fill: var(--edge); }
.stone { text-decoration: none; transition: translate 0.5s var(--ease); }
.stone:hover, .stone:focus-visible { translate: 9px 0; }
.stone.zalonas:hover, .stone.zalonas:focus-visible { translate: -9px 0; }
.stone.company:hover, .stone.company:focus-visible { translate: 0 -3px; }
.stone:focus-visible { outline: none; }
.stone:focus-visible .edge { stroke: var(--ink); stroke-width: 7; }
.cut { font: 700 40px/1 var(--display); letter-spacing: 0.01em; text-anchor: middle; fill: var(--cut); }
.stone:hover .cut:not(.hi) { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.cut.hi { fill: var(--cut-hi); }
.company .cut { font-size: 44px; } .wingfriends .cut { font-size: 37px; }
.socket { fill: var(--slit); stroke: var(--slit); stroke-width: 2.5; stroke-linejoin: round; }
.iris { fill: #ffbe3d; }
.black { fill: #180d22; } .glint { fill: #fff6d8; }
.crack { fill: none; stroke: var(--slit); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lid { transform: translateY(-40px); transition: transform 0.9s var(--ease); }
.socket, .iris, .pupil-at, .lid .f { transition: opacity 0.4s; }
:is([data-sky="day"], [data-sky="golden"]) :is(.socket, .iris, .pupil-at, .lid .f) { opacity: 0; transition-delay: 0.45s; }
[data-sky="day"] .lid, [data-sky="golden"] .lid { transform: none; }
[data-sky="twilight"] .lid { transform: translateY(-17px); }
.pupil { transition: transform 0.18s ease-out; }
.moving .f { transition: fill 0.7s linear, stroke 0.7s linear; }
.moving .hero, .moving .hero::after, .moving body { transition: background-color 0.7s linear, color 0.7s linear; }
.moving .far, .moving .near, .moving .snow, .moving .edge, .moving .cut { transition: fill 0.7s linear; }
.moving .stars, .moving .moon, .moving .sun { transition: opacity 0.7s linear; }

/* The day in Voss */
.day { grid-row: 3; grid-column: 1; align-self: end; height: var(--ground-h); display: flex; flex-direction: column; justify-content: center; gap: 0.55rem; max-width: 34rem; color: var(--on-ground); }
.day[hidden] { display: none; }
.day label { font-weight: 600; }
.day output { font-weight: 800; margin-left: 0.3em; font-variant-numeric: tabular-nums; }
.day p { font-size: 1rem; min-height: 1.6em; }
.track { position: relative; height: 2.75rem; display: grid; align-items: center; }
.track::before, .lit { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 3px); height: 6px; background: color-mix(in srgb, var(--on-ground) 30%, transparent); }
.lit { left: calc(var(--rise) * 100%); right: calc((1 - var(--set)) * 100%); background: var(--on-ground); }
#time { position: relative; width: 100%; height: 2.75rem; margin: 0; background: none; appearance: none; -webkit-appearance: none; cursor: grab; }
#time:active { cursor: grabbing; }
#time::-webkit-slider-thumb { -webkit-appearance: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--sun); border: 3px solid var(--on-ground); }
#time::-moz-range-thumb { width: 1.9rem; height: 1.9rem; box-sizing: border-box; border-radius: 50%; background: var(--sun); border: 3px solid var(--on-ground); }
[data-sky="night"] #time::-webkit-slider-thumb { background: var(--moon); }
[data-sky="night"] #time::-moz-range-thumb { background: var(--moon); }
#now { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0.35rem 0.2rem; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
#now:hover { text-decoration-thickness: 0.16em; }

/* On the ground */
.products { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 3rem); padding: clamp(4rem, 10vh, 7rem) var(--gutter) clamp(4rem, 11vh, 8rem); }
h2 { font-size: clamp(2.6rem, 5vw, 4.25rem); }
.products h2 { grid-column: 1 / -1; }
.products article { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
h3 { font-size: clamp(2rem, 3.4vw, 3rem); }
h3 a { text-decoration: none; } h3 a:hover { text-decoration: underline; }
h3 + p { margin-top: 1rem; max-width: 36em; }
.state { margin-top: 0.9rem; font-weight: 600; }
.shot { display: block; background: #0b2a5b; padding: 0.75rem; clip-path: polygon(1.6rem 0, 100% 0, 100% calc(100% - 1.6rem), calc(100% - 1.6rem) 100%, 0 100%, 0 1.6rem); }
.uncut { display: block; width: 100%; max-height: 17rem; overflow: visible; }
.uncut .cut { font-size: 34px; }
.shot img { display: block; width: 100%; height: auto; }

/* Under it */
.under { position: relative; background: var(--rock); color: var(--on-rock); }
.edge-of-rock { position: absolute; left: 0; bottom: calc(100% - 1px); width: 100%; height: clamp(1.5rem, 4vw, 3.75rem); fill: var(--rock); }
.company { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(4rem, 10vh, 7rem) var(--gutter) clamp(3.5rem, 8vh, 6rem); }
.company p { margin-top: 1.4rem; max-width: 34em; }
.company p + p { margin-top: 1rem; }
dl { margin: 0.5rem 0 0; }
dl div { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 0.15rem 1.5rem; padding: 0.95rem 0; border-top: 1px solid color-mix(in srgb, var(--on-rock) 24%, transparent); }
dl div:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-rock) 24%, transparent); }
dt { color: color-mix(in srgb, var(--on-rock) 78%, var(--rock)); }
dd { margin: 0; font-weight: 600; }
.contact { padding: clamp(2rem, 5vh, 4rem) var(--gutter) clamp(4rem, 10vh, 7rem); }
.contact p { margin-top: 1rem; }
.big { font-weight: 750; font-size: clamp(1.9rem, 6.6vw, 5.5rem); line-height: 1.1; letter-spacing: -0.035em; }
.contact .big { margin-top: 0.4rem; }
.big a { color: var(--link-rock); text-decoration-thickness: 0.05em; text-underline-offset: 0.12em; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding: 1.5rem var(--gutter) 2rem; font-size: 1rem; border-top: 1px solid color-mix(in srgb, var(--on-rock) 24%, transparent); }

/* Not found */
.lost { min-height: 100svh; display: grid; align-content: center; gap: 1.5rem; padding: var(--gutter); color: var(--ink); background: linear-gradient(var(--sky-a), var(--sky-b)); }
.lost h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 0.95; }

@media (max-width: 52rem) {
  .hero { grid-template: auto auto 1fr auto / minmax(0, 1fr); --ground-h: 13.5rem; min-height: 0; }
  .say { align-self: start; padding: 2rem 0 1rem; }
  .moon { bottom: calc(22% + var(--moon-y) * 14%); left: calc(6% + var(--moon-x) * 88%); }
  .stack { grid-row: 3; grid-column: 1; height: auto; width: min(100%, 27rem); margin-bottom: -2rem; }
  .day { grid-row: 4; max-width: none; padding-top: 2rem; }
  .products article, .company { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: clamp(3.6rem, 19.5vw, 8rem); }
}
@media (max-width: 30rem) {
  dl div { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  [data-sky="night"] .lid { animation: blink 6.5s 2s infinite; }
  @keyframes blink { 0%, 95%, 100% { transform: translateY(-40px); } 97%, 98% { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
