/* Tokens ------------------------------------------------------------------ */
:root {
  --bg: #000000;
  --surface: #121212;
  --ink: #f2f2f2;         /* text */
  --muted: #9b9b9b;
  --rule: #262626;
  --rule-strong: #3d3d3d;
  --accent: #2fd1c0;      /* teal from the LiDAR depth ramp */
  --accent-soft: rgba(47, 209, 192, 0.18);
  --on-accent: #04201d;
  --success: #4fd39a;
  --error: #ff7a7a;

  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1280px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
}

/* Type scale: 14 / 16 / 18 / 21 / 28 / 36 / display */
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(56px, 10vw, 136px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

p {
  max-width: 64ch;
  text-wrap: pretty;
  margin: 0 0 16px;
}

/* Hero: the scan printout ------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

.scan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image:
    linear-gradient(100deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.3) 38%, #000 72%),
    linear-gradient(180deg, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(100deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.3) 38%, #000 72%),
    linear-gradient(180deg, #000 72%, transparent 100%);
  mask-composite: intersect;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(56px, 12dvh, 140px) 0 32px;
}

@media (min-width: 900px) {
  .hero-inner {
    min-height: min(84dvh, 860px);
  }
}

.hero-lede {
  max-width: 34ch;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #000;
  font: 600 16px/1.2 var(--font-sans);
  text-decoration: none;
  transition: background 0.15s;
}

@media (hover: hover) {
  .button:hover {
    background: var(--accent);
    color: var(--on-accent);
  }
}

.text-link {
  color: var(--ink);
  font: 600 16px/1.2 var(--font-sans);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.15s;
}

@media (hover: hover) {
  .text-link:hover {
    text-decoration-color: var(--accent);
  }
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 12px 56px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
}

.hero-meta dt {
  color: var(--muted);
  font-size: 14px;
}

.hero-meta dd {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 600;
}

/* Layout: sidebar nav + content ----------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-top: 64px;
}

.tab-bar {
  position: sticky;
  top: 32px;
  align-self: start;
}

.tab-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--rule);
}

.tab-button {
  position: relative;
  margin: 0 0 0 -1px;
  padding: 10px 16px;
  border: 0;
  border-left: 3px solid transparent;
  background: none;
  color: var(--muted);
  font: 500 17px/1.2 var(--font-sans);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.2s;
}

@media (hover: hover) {
  .tab-button:hover {
    color: var(--ink);
  }
}

.tab-button[aria-selected="true"] {
  border-left-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.panels {
  min-width: 0;
}

.tab-panel {
  min-height: 360px;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel:not([hidden]) {
  animation: panel-in 0.2s ease-out both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* About ------------------------------------------------------------------ */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 30%, 320px);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.about-lede {
  max-width: 28ch;
  margin-bottom: 28px;
  font-family: var(--font-sans);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.about-text p:not(.about-lede) {
  color: #cfcfcf;
}

.about-photo-frame {
  margin: 0;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -24px rgba(0, 0, 0, 0.9);
  transform: rotate(1.5deg);
}

.about-photo {
  display: block;
  outline: 1px solid oklch(1 0 0 / 0.1);
  outline-offset: -1px;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 25%;
  border-radius: var(--radius-sm);
}

/* Entries ---------------------------------------------------------------- */
.entry {
  padding: 28px 32px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
}

.entry-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.entry-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font: 600 14px/1.2 var(--font-sans);
  white-space: nowrap;
}

.entry-tag.is-live {
  background: rgba(79, 211, 154, 0.12);
  color: var(--success);
}

.entry-tag.is-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.entry-points {
  max-width: 64ch;
  margin: 20px 0 0;
  padding-left: 20px;
}

.entry-points li + li {
  margin-top: 8px;
}

.entry-points li::marker {
  color: var(--accent);
}

.subsection-title {
  margin: 56px 0 20px;
}

/* Classes: rows, not cards */
.class-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.class-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: 6px 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.class-name {
  margin: 0;
  font: 600 17px/1.4 var(--font-sans);
}

.class-description {
  margin: 0;
  color: var(--muted);
}

/* Video ------------------------------------------------------------------ */
.video-player {
  position: relative;
  max-width: 960px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  border: 1px solid var(--rule);
}

.video-player video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.video-player.is-playing video {
  cursor: auto;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0;
  padding: 0 0 0 4px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #000;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

@media (hover: hover) {
  .video-play:hover {
    background: var(--accent);
    color: var(--on-accent);
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.video-player.is-playing .video-play {
  display: none;
}

/* Kiosk flow: a real sequence, so it's numbered ------------------------- */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow-step {
  position: relative;
  padding-right: 24px;
  counter-increment: flow;
}

.flow-step::before {
  content: counter(flow);
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font: 700 15px/1 var(--font-sans);
}

.flow-step:last-child::before {
  background: var(--accent);
  color: var(--on-accent);
}

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  right: 0;
  left: 36px;
  height: 2px;
  background: var(--rule-strong);
}

.flow-title {
  margin: 0 0 4px;
  font: 700 17px/1.3 var(--font-sans);
}

.flow-text {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* Empty state ---------------------------------------------------------- */
.empty-state {
  margin: 0;
  padding: 20px 24px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding-block: 48px;
}

.empty-state a {
  color: var(--accent);
  font-style: normal;
}

/* Contact ---------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.contact-heading {
  margin-bottom: 12px;
}

.contact-intro p {
  color: var(--muted);
}

form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

label {
  font: 600 15px/1.3 var(--font-sans);
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}

@media (hover: hover) {
  input:hover,
  textarea:hover {
    border-color: var(--muted);
  }
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  resize: vertical;
}

button[type="submit"] {
  width: fit-content;
  margin: 4px 0 0;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #000;
  font: 600 16px/1.2 var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
}

button[type="submit"]:active,
.button:active {
  transform: translateY(1px);
}

@media (hover: hover) {
  button[type="submit"]:hover {
    background: var(--accent);
    color: var(--on-accent);
  }
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status {
  min-height: 1.5em;
  margin: 0;
  font: 500 15px/1.5 var(--font-sans);
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--error);
}

/* Focus ------------------------------------------------------------------ */
button:focus-visible,
a:focus-visible,
.tab-panel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tab-panel:focus-visible {
  border-radius: var(--radius-sm);
}

/* Footer ----------------------------------------------------------------- */
.site-footer {
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 120px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 400 15px/1.5 var(--font-sans);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
}

@media (hover: hover) {
  .site-footer a:hover {
    color: var(--ink);
  }
}

/* Tablet and phone: nav becomes a sticky bar ---------------------------- */
@media (max-width: 899px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 0;
  }

  .tab-bar {
    top: 0;
    z-index: 10;
  }

  .tab-bar::before {
    content: "";
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -1;
    border-bottom: 1px solid var(--rule);
    background: rgba(0, 0, 0, 0.82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .tab-list {
    flex-direction: row;
    gap: 24px;
    overflow-x: auto;
    border-left: 0;
    scrollbar-width: none;
  }

  .tab-list::-webkit-scrollbar {
    display: none;
  }

  .tab-button {
    flex-shrink: 0;
    margin: 0;
    padding: 18px 0 15px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    font-size: 16px;
  }

  .tab-button[aria-selected="true"] {
    border-bottom-color: var(--accent);
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-photo-frame {
    order: -1;
    max-width: 240px;
  }

  .contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .hero-lede {
    font-size: 19px;
  }


  .hero-meta {
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
  }

  .entry,
  form {
    padding: 22px 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .class-card {
    grid-template-columns: 1fr;
  }

  .flow {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .flow-step {
    display: grid;
    grid-template-columns: 36px 1fr;
    column-gap: 16px;
    padding: 0;
  }

  .flow-step::before {
    grid-row: span 2;
    margin: 0;
  }

  .flow-step:not(:last-child)::after {
    top: 36px;
    bottom: -24px;
    left: 17px;
    width: 2px;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Utility ---------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
