/* ============================================================
   RentalOS landing — monochrome editorial.
   Dark cinematic hero (biograph), white body, light-weight
   display type, serif pullquote, horizontal card scroll (af1),
   exploded kit (silo). No accent colours, no dependencies.
   ============================================================ */

:root {
  --bg: #fafaf8;
  --ink: #111111;
  --ink-2: #5c5a56;
  --ink-3: #8a8884;
  --line: rgba(0, 0, 0, 0.1);
  --card-line: rgba(0, 0, 0, 0.08);
  --card: #ffffff;
  --dark: #141414;
  --radius-img: 18px;
  --radius-card: 20px;
  --font-display: "Inter Tight", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  max-width: 18ch;
  margin: 18px 0 0;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section-sub {
  max-width: 52ch;
  margin-top: 22px;
  color: var(--ink-2);
  font-size: 16px;
}

.section { padding: clamp(90px, 11vw, 160px) 0 0; }

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding: 20px 0;
  color: #fff;
  transition: background 0.35s ease, color 0.35s ease, padding 0.35s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
}
.nav-links a { text-decoration: none; opacity: 0.85; }
.nav-links a:hover { opacity: 1; }

.nav-cta {
  font-size: 14px;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s ease;
}
.nav-cta:hover { background: rgba(255, 255, 255, 0.2); }

.site-header.scrolled {
  color: var(--ink);
  background: rgba(250, 250, 248, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.site-header.scrolled .nav-cta {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ---------- hero (scroll-driven turntable) ---------- */

/* Tall pin wrapper: scrolling through it scrubs the 360° rotation.
   JS reads its height; keep in sync with FRAMES pacing. */
.hero-pin {
  position: relative;
  height: 190vh; /* kortare pin: man når resten av sidan snabbare */
  background: #0b0b0b;
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0b0b0b;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

/* Med turntable: postern måste matcha canvasens ritning EXAKT, annars syns ett
   hopp när canvasen tar över. Boxen sätts till 78% höjd (= DEVICE_SCALE) och
   contain fyller den — då styr object-position placeringen precis som dx/dy
   i drawFrame(). Höjd-offset 10.1% = (1-0.78)*0.46. */
.has-turntable .hero-bg {
  object-fit: contain;
  object-position: 50% 50%;
  width: 100%;
  height: 78%;
  top: 10.1%;
  bottom: auto;
}
/* Desktop: devicen åt höger så hero-texten står fritt (matchar hBias i script.js) */
@media (min-width: 1000px) {
  .has-turntable .hero-bg { object-position: 68% 50%; }
}
.has-turntable .hero,
.has-turntable .hero-pin { background: rgb(54, 54, 56); }

/* Canvas draws the turntable frames on top of the poster img */
.hero-turntable {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  touch-action: pan-y;
  cursor: grab;
}
.hero-turntable.ready { opacity: 1; }
.hero-turntable.dragging { cursor: grabbing; }

/* No JS / reduced motion: pin collapses to a normal single viewport */
.no-turntable .hero-pin { height: auto; }
.no-turntable .hero { position: relative; height: auto; min-height: 100vh; min-height: 100svh; }

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(8, 8, 8, 0.55) 0%,
      rgba(8, 8, 8, 0.15) 30%,
      rgba(8, 8, 8, 0.3) 55%,
      rgba(8, 8, 8, 0.88) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(48px, 7vh, 88px);
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.04;
  max-width: 14ch;
}

.hero-sub {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

/* glassy inline waitlist pill (af1) */
.hero-form {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 24px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-width: 100%;
}

.hero-form input[type="email"] {
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font: 15px/1 var(--font-body);
  width: min(300px, 46vw);
  min-width: 0;
  padding: 12px 8px 12px 0;
}
.hero-form input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.55); }

.hero-form button {
  border: 0;
  cursor: pointer;
  border-radius: 100px;
  padding: 13px 24px;
  background: #f5f5f3;
  color: var(--ink);
  font: 500 14px/1 var(--font-body);
  white-space: nowrap;
  transition: background 0.2s ease;
}
.hero-form button:hover { background: #ffffff; }

.hero-hint {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: clamp(48px, 7vh, 88px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 760px) {
  .hero-hint { display: none; }
  .hero-form {
    display: flex;
    width: 100%;
  }
  .hero-form input[type="email"] { flex: 1; width: auto; }
}

/* ---------- stats (biograph) ---------- */

.stats { padding: clamp(90px, 12vw, 170px) 0 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 8px 32px 8px 0;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}
.stat:first-child { border-left: 0; padding-left: 0; }

.stat-value {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 5.5vw, 4.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}
.stat-value small {
  font-size: 0.32em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-left: 0.5em;
}

.stat-desc {
  margin-top: 26px;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 30ch;
}

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; row-gap: 48px; }
  .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }
  .stat:first-child { border-top: 0; padding-top: 0; }
}

/* ---------- pullquote (biograph serif) ---------- */

.pullquote {
  padding: clamp(110px, 14vw, 200px) 0 0;
  text-align: center;
}
.pullquote .kicker { margin-bottom: 36px; }
.pullquote blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 26ch;
  margin: 0 auto;
  color: #1c1c1a;
}

/* ---------- roles ---------- */

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(40px, 5vw, 72px);
}

.role-card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-card);
  padding: clamp(26px, 2.6vw, 36px);
}

.role-icon { width: 24px; height: 24px; color: var(--ink); }
.role-icon svg { width: 100%; height: 100%; }

.role-card h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 22px 0 10px;
}

.role-card > p { font-size: 15px; color: var(--ink-2); }

.role-more { margin-top: 22px; border-top: 1px solid var(--line); }
.role-more summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.role-more summary::-webkit-details-marker { display: none; }
.role-more ul {
  padding: 0 0 8px 18px;
  font-size: 14px;
  color: var(--ink-2);
  display: grid;
  gap: 8px;
}

/* chevron used by details */
.chev {
  width: 9px; height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex: none;
}
details[open] > summary .chev { transform: rotate(225deg); }

@media (max-width: 960px) {
  .role-grid { grid-template-columns: 1fr; }
}

/* ---------- gallery & hardware ---------- */

.gallery-grid,
.hardware-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(40px, 5vw, 72px);
}

.img-wrap {
  border-radius: var(--radius-img);
  overflow: hidden;
  background: #eceae6;
}
.img-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* even editorial rows */
.gallery-item.tall .img-wrap { aspect-ratio: 4 / 5; }
.gallery-item.wide .img-wrap { aspect-ratio: 3 / 2; }
.hw-item .img-wrap { aspect-ratio: 4 / 3; }
.hw-item.hw-wide { grid-column: 1 / -1; }
.hw-item.hw-wide .img-wrap { aspect-ratio: 16 / 9; }

@media (max-width: 700px) {
  .hw-item.hw-wide { grid-column: auto; }
}

.gallery-item figcaption,
.hw-item figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-3);
}

@media (max-width: 700px) {
  .gallery-grid, .hardware-grid { grid-template-columns: 1fr; }
}

/* ---------- screens: dark section, real UI in device bezels ---------- */

.screens.dark {
  background: #0b0b0b;
  color: #fff;
  border-radius: clamp(20px, 3vw, 36px);
  margin: clamp(40px, 6vw, 96px) clamp(12px, 2vw, 24px) 0;
  padding: clamp(64px, 9vw, 128px) 0;
}
.screens.dark .kicker { color: rgba(255, 255, 255, 0.55); }
.screens.dark h2 { max-width: 18ch; }
.screens-lead {
  margin-top: 18px;
  max-width: 44ch;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

/* Landscape, editorial band — three wide "kiosk on the wall" frames
   side by side, captions left-aligned beneath each. */
.device-row {
  margin-top: clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: clamp(24px, 3vw, 48px);
}

.device {
  margin: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* landscape kiosk framing — the wall-mounted screen, shown wide */
.device-shell {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  padding: 8px;
  background: linear-gradient(160deg, #2a2a2a, #141414);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 60px -24px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s ease;
}
.device:hover .device-shell { transform: translateY(-6px); }
.device-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 9px;
  display: block;
}

.device figcaption {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.2;
  color: #fff;
}

@media (max-width: 760px) {
  .device-row { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
}

/* ---------- kit, exploded (silo) ---------- */

.kit-list { margin-top: clamp(30px, 4vw, 56px); }

.kit-item {
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px) 1fr;
  align-items: center;
  padding: clamp(28px, 5vh, 64px) var(--gutter);
}

.kit-label {
  grid-column: 1;
  justify-self: end;
  padding-right: clamp(24px, 4vw, 64px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: right;
}

.kit-media { grid-column: 2; }
.kit-media img {
  width: 100%;
  /* Renders come on flat grey — lift the background towards the page white
     so the parts float, silo-style. */
  filter: brightness(1.38) contrast(1.04);
  mix-blend-mode: multiply;
}

@media (max-width: 700px) {
  .kit-item {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .kit-label { grid-column: 1; justify-self: start; text-align: left; padding: 0; }
  .kit-media { grid-column: 1; }
}

/* ---------- features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: clamp(24px, 3vw, 48px);
  row-gap: clamp(36px, 4vw, 56px);
  margin-top: clamp(40px, 5vw, 72px);
}

.feature-tile { border-top: 1px solid var(--line); padding-top: 18px; }
.feature-tile h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.feature-tile p { margin-top: 8px; font-size: 14px; color: var(--ink-2); }

@media (max-width: 960px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- box ---------- */

.box .box-row {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: 24px;
  padding: clamp(28px, 3vw, 44px) 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.box .container > .box-row:last-child { border-bottom: 1px solid var(--line); }

.box-title {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 400;
  margin: 0;
}

.box-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 15px;
  color: var(--ink-2);
}

@media (max-width: 760px) {
  .box .box-row { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- FAQ ---------- */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: clamp(32px, 5vw, 96px);
}

.faq-item { border-top: 1px solid var(--line); }
.faq-list .faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-body { padding: 0 0 24px; max-width: 60ch; }
.faq-body p { font-size: 15px; color: var(--ink-2); }

@media (max-width: 860px) {
  .faq-layout { grid-template-columns: 1fr; }
}

/* ---------- waitlist ---------- */

.waitlist { padding-bottom: clamp(90px, 11vw, 160px); }

.waitlist-inner {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: clamp(32px, 5vw, 96px);
}

.waitlist-sub { margin-top: 20px; color: var(--ink-2); font-size: 15px; max-width: 36ch; }

.waitlist-form { display: grid; gap: 30px; max-width: 560px; }

.form-row { display: grid; gap: 10px; }

.form-row label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.form-row .optional { text-transform: none; letter-spacing: 0; }

.form-row input,
.form-row select,
.form-row textarea {
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 0;
  background: transparent;
  padding: 10px 0 12px;
  font: 400 17px/1.4 var(--font-body);
  color: var(--ink);
  outline: none;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  resize: vertical;
}
.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 24px;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-bottom-color: var(--ink); }
.form-row ::placeholder { color: #b5b3ae; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 15px/1 var(--font-body);
  padding: 16px 30px;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { opacity: 0.85; }
.btn-ghost { border-color: rgba(0, 0, 0, 0.22); color: var(--ink); background: transparent; }

.waitlist-form .btn { justify-self: start; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(90px, 11vw, 160px);
  padding: 32px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.footer-row a { color: inherit; }

/* ---------- thanks page ---------- */

.thanks-main {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
}
.thanks-main h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.thanks-main h1 .serif { font-family: var(--font-serif); font-style: italic; }
.thanks-main p { margin: 20px 0 36px; color: var(--ink-2); max-width: 44ch; }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .site-header, .nav-cta, .chev, .btn { transition: none; }
}

/* ---------- colours: clickable finishes ---------- */

.colours-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.colours .kicker { text-align: center; }
.colours h2 { max-width: none; }

.colour-preview {
  margin: clamp(36px, 5vw, 64px) 0 0;
  width: 100%;
  max-width: 760px;
}
.colour-preview-frame {
  border-radius: var(--radius-img);
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 16%, #f3f1ec 0%, #e7e4de 100%);
  aspect-ratio: 13 / 10;
}
.colour-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease;
}
.colour-preview-frame.is-fading img { opacity: 0; }

.colour-caption {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  color: #1c1c1a;
}

.swatches {
  margin-top: clamp(24px, 3vw, 36px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font: 400 13px/1 var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.swatch:hover { border-color: rgba(0, 0, 0, 0.28); color: var(--ink); }
.swatch.is-active { border-color: var(--ink); color: var(--ink); }
.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
  flex: none;
}
.colour-note {
  margin-top: clamp(28px, 3.5vw, 44px);
  font-size: 14px;
  color: var(--ink-3);
  max-width: 40ch;
}

/* ---------- gallery: home-type tabs ---------- */

.home-tabs { margin-top: clamp(36px, 4.5vw, 64px); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0 0 14px;
  margin-bottom: -1px;
  font: 400 15px/1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink-3);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tab:hover { color: var(--ink-2); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.home-pair {
  margin-top: clamp(20px, 2.5vw, 32px);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(16px, 2vw, 28px);
}
.home-shot { margin: 0; }
.home-shot.wide .img-wrap { aspect-ratio: 3 / 2; }
.home-shot.tight .img-wrap { aspect-ratio: 4 / 5; }
.home-pair img { transition: opacity 0.4s ease; }
.home-pair.is-fading img { opacity: 0; }

@media (max-width: 700px) {
  .home-pair { grid-template-columns: 1fr; }
}

/* ---------- kit: scroll-assembly ---------- */

.kit-item .kit-media {
  opacity: 0;
  transform: translateX(var(--from, 40px)) translateY(14px);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.kit-item:nth-child(odd) .kit-media { --from: -40px; }
.kit-item:nth-child(even) .kit-media { --from: 40px; }
.kit-item.assembled .kit-media {
  opacity: 1;
  transform: none;
}

/* ---------- tech stack blurb ---------- */

.tech-stack {
  margin-top: clamp(48px, 6vw, 96px);
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 340px) 1fr;
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
}
.tech-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  letter-spacing: -0.01em;
  margin-top: 14px;
}
.tech-specs {
  list-style: none;
  display: grid;
  gap: 0;
  align-self: center;
}
.tech-specs li {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.tech-specs li:first-child { border-top: 0; }

.tech-visual { margin-top: clamp(40px, 5vw, 80px); }
.tech-visual img {
  width: 100%; display: block; border-radius: var(--radius-img);
  background: #111;
}
.tech-visual figcaption {
  margin-top: 14px; text-align: center;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.02em; color: var(--ink-2);
}

@media (max-width: 760px) {
  .tech-stack { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .kit-item .kit-media { opacity: 1; transform: none; transition: none; }
  .colour-preview-frame img, .home-pair img { transition: none; }
}

/* ============================================================
   Carousel — vänsterjusterad mot containern, spiller ut över
   höger browserkant. Hård snap (ett kort per svep), pilar uppe
   till höger vid rubriken.
   ============================================================ */
.carousel {
  position: relative;
  --card-w: min(760px, 86vw);
  --card-gap: 20px;
  /* containerns vänstra innerkant — korten linjerar med rubrikens "O" */
  --edge: calc(max((100vw - var(--container)) / 2, 0px) + var(--gutter));
}

/* Full-bleed: bryter ut ur .container */
.carousel-viewport { width: 100vw; margin-left: calc(50% - 50vw); }

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--card-w);
  gap: var(--card-gap);
  padding-inline-start: var(--edge);
  padding-inline-end: calc(100vw - var(--edge) - var(--card-w));
  /* snapport startar vid containerkanten — annars snappar korten mot
     viewportens kant i stället för mot rubriken */
  scroll-padding-inline-start: var(--edge);
  padding-block: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.carousel-track.is-dragging * { pointer-events: none; }

.carousel-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;   /* ett kort per svep — inte fritt förbi */
  min-width: 0;
  transition: opacity 0.45s ease;
}
.carousel-card:not(.is-current) { opacity: 0.5; }
@media (prefers-reduced-motion: reduce) {
  .carousel-card { transition: none; }
  .carousel-card:not(.is-current) { opacity: 1; }
}

/* ---- Sektionshuvud med pilar till höger ---- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.carousel-nav { display: flex; gap: 10px; flex: none; padding-bottom: 6px; }
.carousel-arrow {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}
.carousel-arrow:hover:not(:disabled) { background: rgba(17, 17, 17, 0.07); }
.dark .carousel-arrow:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.carousel-arrow:disabled { opacity: 0.25; cursor: default; }
.carousel-arrow svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.carousel-arrow:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 640px) { .carousel-nav { display: none; } }

/* ---- Kortinnehåll ---- */
.roles .carousel { --card-w: min(560px, 86vw); }
.screens .carousel { --card-w: min(1180px, 86vw); }

.carousel .role-card {
  display: flex;
  flex-direction: column;
  min-height: clamp(560px, 52vw, 680px);
  padding: 0;
  overflow: hidden;
}
.role-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ececea;
  flex: none;
}
.role-media img { width: 100%; height: 100%; object-fit: cover; }
.role-body { padding: clamp(24px, 2.4vw, 32px); display: flex; flex-direction: column; flex: 1; }
.role-body .role-more { margin-top: auto; }

@media (max-width: 700px) {
  .carousel { --card-gap: 14px; }
  .roles .carousel, .screens .carousel { --card-w: 86vw; }
  .carousel .role-card { min-height: 0; }
}

/* ============================================================
   Kort-refresh: platta vita kort, inga ramar/radier, ikoner bort,
   större typ och mer luft. Alla kort fullt synliga (ingen dimning).
   ============================================================ */
.carousel-card:not(.is-current) { opacity: 1; }

.carousel .role-card {
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: clamp(600px, 54vw, 720px);
}
.role-media { border-radius: 0; aspect-ratio: 16 / 11; }
.carousel .role-icon { display: none; }

.role-body { padding: clamp(30px, 3vw, 44px); }
.carousel .role-card h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 1.9vw, 30px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--ink);
}
.carousel .role-card p {
  font-size: 17px;
  line-height: 1.65;
  color: #33312e;            /* högre kontrast än --ink-2 */
  max-width: 46ch;
}
.carousel .role-more { margin-top: 28px; border-top: 1px solid rgba(0,0,0,0.12); }
.carousel .role-more summary { padding-top: 22px; font-size: 15px; }
.carousel .role-more ul { font-size: 15.5px; line-height: 1.6; color: #3a3835; }

/* Skärmkorten: platt ram utan radie, mer luft under */
.screens .carousel .device-shell { border-radius: 0; }
.screens .carousel figcaption { padding-top: 22px; }
.screens .carousel .card-title { font-size: clamp(19px, 1.5vw, 24px); }

/* Sektionshuvud: mer avstånd ner till korten */
.section-head { margin-bottom: clamp(34px, 3.4vw, 54px); }
