/* Mingo — "Varje timme har sitt ljus". Claude-koncept, nov 2026. */
@font-face { font-family: "Instrument Serif"; src: url(../assets/instrument-serif.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url(../assets/instrument-serif-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(../assets/dm-sans.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --paper: #f3eee6;
  --ink: #17140f;
  --muted: #5d554a;
  --night: #0c0b0a;
  --ember: #e0864a;          /* enda accenten: kvällsljus */
  --sky: #efe9dc;            /* styrs av klockan i JS */
  --sky-ink: #17140f;
  --gutter: clamp(1rem, 4vw, 3rem);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: .95; letter-spacing: -.02em; }
h2 { font-size: clamp(2.6rem, 7vw, 6rem); }
em { font-style: italic; }
.wrap { width: min(100% - 2 * var(--gutter), 82rem); margin-inline: auto; }
.kicker { font: 600 .74rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1rem; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; border-radius: 2px; }
.skip { position: fixed; left: 1rem; top: 1rem; z-index: 50; background: var(--ink); color: var(--paper); padding: .7rem 1rem; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Header: difference-blend så den syns över både ljust och mörkt */
.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem var(--gutter); color: #fff; mix-blend-mode: difference; pointer-events: none; }
.top a { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: .5rem; }
.brand img { filter: none; } /* logotypen är vit; difference-blend gör den mörk över ljus bakgrund */
.top nav { display: none; gap: 2rem; font-size: .92rem; }
.top nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.cta { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.15rem; border: 1px solid currentColor; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: .9rem; transition: transform .12s ease-out, background-color .2s; }
.cta:active { transform: scale(.97); }
@media (min-width: 52rem) { .top nav { display: flex; } }

/* ---------- 1. Bländaren ---------- */
.hero { position: relative; height: 230svh; background: var(--night); }
.hero-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; color: var(--paper); }
.hero-photo { position: absolute; left: 0; top: 0; width: var(--bw, 100%); height: var(--bh, 100%); object-fit: cover; object-position: 50% 58%; transform: translate3d(var(--bx, 0px), var(--by, 0px), 0) scale(var(--zoom, 1.18)); }
.iris { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(5.5rem, 14svh, 9rem); max-width: 40rem; opacity: var(--copy, 1); transform: translateY(calc((1 - var(--copy, 1)) * -2rem)); }
.hero-copy h1 { font-size: clamp(3.4rem, 10.5vw, 9.5rem); }
.hero-copy h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-copy h1 em { color: #f3b383; }
.hero-sub { max-width: 27rem; margin-top: 1.4rem; color: #d9d0c3; }
.exif { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.4rem; display: flex; gap: 1.4rem; font: 500 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #a39a8d; font-variant-numeric: tabular-nums; opacity: var(--copy, 1); }
.exif span { white-space: nowrap; }
.exif-cue { margin-left: auto; color: var(--paper); }
@media (max-width: 30rem) { .exif span:nth-child(3) { display: none; } }
.exif-cue::after { content: ""; display: inline-block; width: 1px; height: .9rem; margin-left: .7rem; vertical-align: -.2rem; background: currentColor; animation: cue 1.8s var(--ease-out) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (min-width: 52rem) { .hero-copy { bottom: auto; top: 50%; transform: translateY(calc(-50% + (1 - var(--copy, 1)) * -2rem)); } }
/* intro-animation för rubriken */
.js .hero-copy .line > * , .js .hero-copy .line { --d: 0s; }
.js .hero-copy h1 .line { animation: rise 1.2s var(--ease-out) both; }
.js .hero-copy h1 .line + .line { animation-delay: .12s; }
.js .hero-sub, .js .hero-copy .kicker { animation: fade 1.2s .35s var(--ease-out) both; }
@keyframes rise { from { clip-path: inset(0 0 100% 0); transform: translateY(.4em); } to { clip-path: inset(0 0 -10% 0); transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(.6rem); } }

/* ---------- 2. Dagen ---------- */
.day { position: relative; background: var(--sky); color: var(--sky-ink); }
.day-intro { width: min(100% - 2 * var(--gutter), 82rem); margin-inline: auto; padding-block: clamp(5rem, 12vw, 10rem) clamp(2rem, 5vw, 4rem); display: grid; gap: 1.2rem; }
.day-intro p:last-child { max-width: 34rem; opacity: .78; }
.day-intro h2 em, .plan-head h2 em, .about h2 em, .contact h2 em { color: var(--ember); }
.day-stage { position: relative; }
.track { list-style: none; padding: 0 var(--gutter) 3rem; display: flex; gap: clamp(1rem, 3vw, 2.5rem); overflow-x: auto; scroll-snap-type: x mandatory; }
.track li { flex: none; scroll-snap-align: center; }
.track figure { width: min(62vw, 22rem); }
.track figure.land { width: min(84vw, 34rem); }
.frame { overflow: hidden; border-radius: 3px; background: #0002; }
.frame img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.land .frame img { aspect-ratio: 3 / 2; }
.track figcaption { display: flex; gap: .7rem; align-items: baseline; padding-top: .7rem; font-size: .92rem; }
.track time { font: italic 1.5rem/1 var(--serif); color: var(--ember); font-variant-numeric: tabular-nums; }
.sky-arc, .sun, .clock { display: none; }

/* Interaktivt läge: scrollen styr klockan */
.is-pinned .day-pin { height: var(--pin-h, 600vh); }
.is-pinned .day-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.is-pinned .track { position: absolute; left: 0; top: 0; height: 100%; overflow: visible; align-items: center; padding: 3rem 0 16svh calc(50vw - 10rem); gap: clamp(2rem, 6vw, 6rem); will-change: transform; transform: translate3d(var(--x, 0px), 0, 0); }
.is-pinned .track li { position: relative; }
.is-pinned .track li:nth-child(4n+2) { transform: translateY(-9svh); }
.is-pinned .track li:nth-child(4n+3) { transform: translateY(7svh); }
.is-pinned .track li:nth-child(4n) { transform: translateY(-3svh); }
.is-pinned .track figure { display: flex; flex-direction: column; width: max-content; height: min(56svh, 34rem); transform: scale(var(--s, .9)); transform-origin: 50% 60%; transition: none; }
.is-pinned .track figure .frame { height: calc(100% - 2.6rem); aspect-ratio: 2 / 3; }
.is-pinned .track figure.land { height: min(44svh, 26rem); }
.is-pinned .track figure.land .frame { aspect-ratio: 3 / 2; }
.is-pinned .frame img { height: 100%; aspect-ratio: auto; transform: translate3d(var(--px, 0px), 0, 0) scale(1.18); }
.is-pinned .track figcaption { opacity: var(--o, .35); }
.is-pinned .sky-arc { display: block; position: absolute; left: 5vw; right: 5vw; top: 4.6rem; width: 90vw; height: 13svh; overflow: visible; }
.sky-arc path { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; opacity: .45; }
.is-pinned .sun { display: block; position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--sun, #f6c66b); box-shadow: 0 0 0 6px color-mix(in srgb, var(--sun, #f6c66b) 25%, transparent), 0 0 40px 10px color-mix(in srgb, var(--sun, #f6c66b) 45%, transparent); transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0); }
.is-pinned .clock { display: grid; position: absolute; left: var(--gutter); bottom: clamp(1rem, 4svh, 2.5rem); z-index: 2; pointer-events: none; }
.clock-time { font: 400 clamp(4.5rem, 15vw, 13rem)/.8 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.clock-label { font: 600 .74rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin-top: .6rem; }
.is-pinned .day-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (max-width: 51.99rem) {
  .is-pinned .track { padding-left: calc(50vw - 8rem); }
  .is-pinned .track figure { height: min(52svh, 30rem); }
  .is-pinned .track figure.land { height: auto; width: 82vw; }
  .is-pinned .track figure.land .frame { height: auto; }
  .is-pinned .clock { right: var(--gutter); }
}

/* ---------- 3. Paketväljaren ---------- */
.plan { background: var(--paper); padding-block: clamp(5rem, 12vw, 10rem); }
.plan-head { display: grid; gap: 1.2rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.plan-head p:last-child { max-width: 38rem; color: var(--muted); }
.picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.picker button { display: grid; gap: .2rem; text-align: left; min-height: 64px; padding: .8rem 1rem; border: 1px solid #17140f33; border-radius: 6px; background: transparent; color: var(--ink); font: 600 .98rem/1.2 var(--sans); cursor: pointer; transition: transform .12s ease-out, background-color .25s, color .25s, border-color .25s; }
.picker button span { font: italic 400 1.1rem/1 var(--serif); color: var(--muted); }
.picker button:active { transform: scale(.97); }
.picker button[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.picker button[aria-checked="true"] span { color: #f3b383; }
@media (min-width: 52rem) { .picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ruler { position: relative; height: clamp(8rem, 13vw, 11.5rem); margin-top: 2.5rem; }
.ruler-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 1.6rem; border-top: 1px solid #17140f40; }
.ruler-ticks span { position: absolute; top: 0; height: .45rem; border-left: 1px solid #17140f55; font: 500 .7rem/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.ruler-ticks span b { position: absolute; top: .65rem; left: 0; transform: translateX(-50%); font-weight: 500; }
.ruler-ticks span:nth-child(even) b { display: none; }
.ruler-window { position: absolute; top: 0; bottom: 1.6rem; left: 0; width: 0; border-radius: 6px; background: color-mix(in srgb, var(--ember) 16%, transparent); border: 1px solid color-mix(in srgb, var(--ember) 70%, transparent); transform: translateX(var(--wl, 0px)); width: var(--ww, 0px); }
.ruler-from, .ruler-to { position: absolute; top: -1.5rem; font: italic 1.05rem/1 var(--serif); color: #b4592a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ruler-from { left: 0; }
.ruler-to { right: 0; }
.ruler-moments { position: absolute; inset: 1.2rem 0 2.6rem; }
.moment { position: absolute; top: 0; width: clamp(1.6rem, 4.2vw, 3.8rem); aspect-ratio: 2 / 3; transform: translateX(-50%); border-radius: 2px; overflow: hidden; transition: filter .45s, opacity .45s, transform .45s var(--ease-out); box-shadow: 0 2px 8px #0002; }
.moment:nth-child(odd) { top: 1.2rem; }
.moment img { width: 100%; height: 100%; object-fit: cover; }
.moment.out { filter: grayscale(1); opacity: .32; transform: translateX(-50%) scale(.86); }
.plan-result { display: grid; gap: 1rem; margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid #17140f22; }
.res-name { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.res-text { margin-top: .7rem; max-width: 34rem; color: var(--muted); }
.res-price { font: 400 clamp(2rem, 4.5vw, 3.4rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.res-count { margin-top: .4rem; font-size: .92rem; color: var(--muted); }
@media (min-width: 52rem) { .plan-result { grid-template-columns: 1fr auto; align-items: end; } .res-side { text-align: right; } }
.family { margin-top: clamp(3rem, 7vw, 5rem); padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 8px; background: #e9e2d6; display: grid; gap: .5rem; }
.family h3 { font-size: clamp(2rem, 4vw, 2.8rem); }
.family-price { font: 400 1.8rem/1 var(--serif); }
@media (min-width: 52rem) { .family { grid-template-columns: 1fr 1.4fr auto; align-items: end; gap: 2rem; } .family .kicker { grid-column: 1 / -1; margin: 0; } }

/* ---------- 4–5. Om och kontakt ---------- */
.about { display: grid; gap: 2rem; padding-block: clamp(4rem, 10vw, 8rem); align-items: center; }
.about-photo { overflow: hidden; border-radius: 3px; max-width: 26rem; }
.about-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about p:not(.kicker) { margin-top: 1.2rem; max-width: 34rem; color: var(--muted); }
@media (min-width: 52rem) { .about { grid-template-columns: 1fr 1.2fr; gap: 5rem; } }
.contact { background: var(--night); color: var(--paper); padding-block: clamp(5rem, 13vw, 10rem); }
.contact h2 { font-size: clamp(3.2rem, 11vw, 9rem); }
.contact p:not(.kicker) { margin-top: 1.2rem; color: #c9c0b3; }
.contact-links { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; margin-top: 2.2rem; }
.cta.big { background: var(--paper); color: var(--ink); border-color: var(--paper); min-height: 54px; padding-inline: 1.6rem; font-size: 1rem; }
.cta.big:hover { background: #f3b383; border-color: #f3b383; }
.phone { min-height: 44px; display: inline-flex; align-items: center; font-size: 1.1rem; }
.foot { display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding-block: 1.5rem; font-size: .88rem; color: var(--muted); }
.foot a { min-height: 44px; display: inline-flex; align-items: center; }
body:has(.contact) { background: var(--paper); }

/* ---------- Reducerad rörelse ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-stage { position: relative; }
  .hero-photo { transform: none; }
  .exif-cue::after, .js .hero-copy h1 .line, .js .hero-sub, .js .hero-copy .kicker { animation: none; }
  .moment, .picker button, .cta { transition: opacity .2s, filter .2s; }
}
