/* ============================================================
   Roadtrip Labs · roadtriplabs.com
   D1 Berlin Postcard page with the H1 image hero (image set a,
   /hero/berlin-scene.*) and H1's dialog-box copy.
   Self-hosted fonts only, no CDN.
   ============================================================ */

@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/fonts/silkscreen-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/pixelify-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "VT323"; src: url("/fonts/vt323-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ============================================================
   Reset + tokens
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root {
  --paper:       #F6F1E6;
  --paper-dim:   #EFE8D8;
  --ink:         #211D18;
  --ink-soft:    #4A4239;
  --line:        rgba(33, 29, 24, 0.12);
  --terracotta:  #A84E30;
  --terracotta-deep: #7E381F;
  --cream:       #FBF7EE;
  --hero-fg:     #FBF7EE;

  /* dialog box, from H1 */
  --dlg-bg:      rgba(20, 22, 38, 0.8);
  --dlg-rim:     #f6ecd6;
  --dlg-edge:    #14161f;
  --dlg-gold:    #f3c10a;
  --dlg-ink:     #fff8e8;
  --dlg-ink-2:   #e9ddc2;
  --dlg-shadow:  #b8412c;

  --serif: "Instrument Serif", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans-tight: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --pixel-label: "Silkscreen", var(--mono);
  --pixel-mark: "Pixelify Sans", var(--mono);
  --pixel-text: "VT323", var(--mono);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

/* ============================================================
   Hero: the H1 image scene. Sizing and layers live in
   /hero/berlin-scene.css (.bs-hero); this file adds nav + dialog.
   ============================================================ */

/* --- nav capsule, top-center (D1) --- */

.nav-capsule {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.hero[data-bs-sky="light"] .nav-capsule { background: rgba(16, 30, 60, 0.22); }

.nav-capsule a {
  font-family: var(--sans-tight);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--hero-fg);
  text-decoration: none;
  opacity: 0.92;
  white-space: nowrap;
}
.nav-capsule a:hover { opacity: 1; }
.nav-capsule a:focus-visible { outline-color: var(--hero-fg); }

.nav-capsule__mark {
  font-family: var(--pixel-label);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding-right: 16px;
  margin-right: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  opacity: 1 !important;
}

/* --- 16-bit dialog box (H1): the one copy block in the hero, top-left in the sky --- */

.dialog {
  position: absolute;
  z-index: 10;
  left: clamp(16px, 3.2vw, 56px);
  top: clamp(16px, 3.6vw, 60px);
  max-width: min(88vw, 30rem);
  padding: 12px 16px 14px;
  background: var(--dlg-bg);
  color: var(--dlg-ink);
  /* hard pixel border, no blur, no rounded corners: cream rim, dark edge, offset drop */
  box-shadow:
    0 0 0 3px var(--dlg-rim),
    0 0 0 6px var(--dlg-edge),
    6px 6px 0 6px rgba(20, 22, 38, 0.35);
}

.dialog__clock {
  margin: 0 0 8px;
  font: 400 12px/1 var(--pixel-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dlg-gold);
}
.dialog__clock span { font-variant-numeric: tabular-nums; }

.dialog__mark {
  margin: 0;
  font: 700 clamp(30px, 3.1vw, 54px)/0.95 var(--pixel-mark);
  letter-spacing: 0.01em;
  color: var(--dlg-ink);
  text-shadow: 3px 3px 0 var(--dlg-shadow);
  white-space: nowrap;
}

.dialog__line {
  margin: 8px 0 0;
  font: 400 clamp(19px, 1.45vw, 26px)/1.05 var(--pixel-text);
  color: var(--dlg-ink-2);
}

/* Below ~1240px the top-left box would run into the TV tower (and, lower, the
   centred nav capsule); dropping it under the capsule covers the tower too. It takes the classic RPG
   text-box slot at the bottom-left instead, over the water. */
@media (max-width: 1240px) {
  .dialog { top: auto; bottom: clamp(16px, 2.6vw, 28px); }
}

/* ============================================================
   Below-fold sections (D1)
   ============================================================ */

main { background: var(--paper); }

.section {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 24px;
}

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--pixel-label);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}

.intro {
  padding-top: 108px;
  max-width: 620px;
}
.intro__text {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.42;
  color: var(--ink);
}

/* --- apps --- */

.apps { max-width: 920px; border-top: 1px solid var(--line); }

.apps__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.app-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--cream);
}
.app-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-dim);
}
.app-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.app-card__body { padding: 22px 22px 24px; }
.app-card__title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
}
.app-card__wt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  vertical-align: 2px;
  margin-left: 4px;
}
.app-card__text {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.app-card__tag {
  display: inline-block;
  font-family: var(--pixel-label);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}
.app-card__tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--terracotta);
  vertical-align: middle;
}

/* --- how we work / why roadtrip (from D2): one compact two-column row --- */

.notes {
  max-width: 920px;
  padding-top: 64px;
  padding-bottom: 72px;
  border-top: 1px solid var(--line);
}
.notes__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.note {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 20px;
  align-items: start;
}
.note__img {
  display: block;
  width: 128px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-dim);
}
.note__title {
  margin: 2px 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.15;
  color: var(--ink);
}
.note__text {
  margin: 0;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* --- founders --- */

.founders { border-top: 1px solid var(--line); }
.founders__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.founder__portrait {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-dim);
  margin-bottom: 16px;
}
.founder__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.founder__name {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  color: var(--ink);
}
.founder__role {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* --- contact --- */

.contact { border-top: 1px solid var(--line); }
.contact__line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 26px);
  color: var(--ink);
}
.contact__line a,
.legal a {
  color: var(--terracotta-deep);
  text-decoration: underline;
  text-decoration-color: rgba(168, 78, 48, 0.35);
  text-underline-offset: 3px;
}
.contact__line a:hover,
.legal a:hover { text-decoration-color: rgba(168, 78, 48, 0.9); }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.site-footer__legal {
  margin: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.site-footer__links { display: flex; gap: 18px; }
.site-footer__links a {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.site-footer__links a:hover { color: var(--ink); }
.site-footer__links a[aria-current="page"] { color: var(--ink); text-decoration-color: currentColor; }

/* ============================================================
   Legal pages (Impressum, Datenschutz)
   ============================================================ */

.legal-bar {
  border-bottom: 1px solid var(--line);
}
.legal-bar__inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.legal-bar__mark {
  font: 700 22px/1 var(--pixel-mark);
  color: var(--ink);
  text-decoration: none;
  text-shadow: 2px 2px 0 rgba(168, 78, 48, 0.28);
}
.legal-bar__back {
  font-family: var(--sans-tight);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.legal-bar__back:hover { color: var(--ink); }

.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}
.legal h1 {
  margin: 0 0 36px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.1;
  color: var(--ink);
}
.legal h2 {
  margin: 36px 0 10px;
  font-family: var(--pixel-label);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}
.legal p {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ============================================================
   Mobile (<= 700px)
   ============================================================ */

@media (max-width: 700px) {

  .nav-capsule {
    top: 16px;
    gap: 10px;
    padding: 8px 14px;
    max-width: 94vw;
  }
  .nav-capsule a { font-size: 11px; }
  .nav-capsule__mark { padding-right: 8px; }

  .dialog { left: 14px; right: 14px; bottom: 16px; max-width: none; padding: 10px 12px 11px; }
  .dialog__clock { font-size: 11px; margin-bottom: 7px; }
  .dialog__mark { font-size: 28px; }
  .dialog__line { font-size: 17px; margin-top: 6px; }

  .section { padding: 64px 20px; }
  .intro { padding-top: 72px; }
  .notes { padding-top: 48px; padding-bottom: 56px; }

  .apps__grid,
  .founders__grid,
  .notes__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .note { grid-template-columns: 104px 1fr; gap: 16px; }
  .note__img { width: 104px; height: 78px; }

  .site-footer { padding: 24px 20px 40px; }
  .legal-bar__inner { padding: 18px 20px; }
  .legal { padding: 48px 20px 72px; }
}

@media (min-width: 701px) and (max-width: 980px) {
  .apps__grid,
  .founders__grid,
  .notes__grid { gap: 24px; }
  .note { grid-template-columns: 104px 1fr; gap: 16px; }
  .note__img { width: 104px; height: 78px; }
}

/* Time scrubber: on narrow screens the dialog box sits bottom-left, so the scrubber moves up under the nav */
@media (max-width: 1240px) {
  .bs-scrub { top: 68px; bottom: auto; right: 12px; }
}
