@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-300-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("../fonts/manrope-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color: #151914;
  background: #1c3028;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: #f5f3eb;
  --ink: #151914;
  --muted: #61665f;
  --amber: #f36b21;
  --forest: #1c3028;
  --stage: #f1f2ed;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-width: 320px;
  height: 100%;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  color: var(--ink);
  background: var(--forest);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
:focus-visible {
  outline: 3px solid rgba(243, 107, 33, 0.55);
  outline-offset: 4px;
}

/* —— Outer forest shell (Study 01 continuity) —— */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--forest);
}
.app::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 82%, rgba(243, 107, 33, 0.1), transparent 36%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  content: "";
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: calc(10px + var(--safe-top)) clamp(18px, 3.5vw, 48px) 8px;
  color: #f6f2e8;
}
.roover-mark {
  display: inline-flex;
  align-items: baseline;
  font: 400 14px/1 Manrope, sans-serif;
  letter-spacing: 0.23em;
}
.roover-mark i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 2px;
  background: var(--amber);
  border-radius: 50%;
}
.chrome-title {
  color: rgba(246, 242, 232, 0.55);
  font: 400 12px/1 Manrope, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chrome-quiet {
  color: rgba(246, 242, 232, 0.4);
  font: 400 11px/1 Manrope, sans-serif;
  letter-spacing: 0.1em;
}

/* —— Paper story window —— */
.stage-wrap {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  padding: 0 clamp(14px, 3vw, 40px) 12px;
}
.story-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--stage);
  border-radius: 28px;
  box-shadow: 0 28px 72px #00000055;
}

/* —— Full-bleed film (no right-only panel) —— */
.film {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform-origin: 62% 28%;
}
.film video,
.film-still {
  position: absolute;
  top: 0;
  left: 50%;
  width: 118%;
  height: 132%;
  transform: translateX(-50%);
  object-fit: cover;
  /* Bias framing to the right so faces/roof stay in the open image zone */
  object-position: 58% 10%;
}
.film video {
  /* Supporting evidence — never a competing focal point */
  opacity: 0.48;
  filter: grayscale(1) contrast(1.04) brightness(0.94);
}
.film-still {
  display: none;
  opacity: 0.52;
  filter: grayscale(1) contrast(1.04) brightness(0.94);
}
.film-grain {
  position: absolute;
  inset: -20%;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  mix-blend-mode: multiply;
}

/* —— Soft paper wash: left solid → transparent (NO edge, NO second panel) —— */
.paper-wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    /* Primary left→right fade: type zone only, then dissolves into film */
    linear-gradient(
      90deg,
      rgba(241, 242, 237, 0.94) 0%,
      rgba(241, 242, 237, 0.88) 18%,
      rgba(245, 243, 235, 0.72) 34%,
      rgba(245, 243, 235, 0.38) 48%,
      rgba(241, 242, 237, 0.12) 62%,
      rgba(241, 242, 237, 0) 78%
    ),
    /* Gentle vertical calm so type stays readable without a card */
    linear-gradient(
      180deg,
      rgba(241, 242, 237, 0.22) 0%,
      rgba(241, 242, 237, 0.08) 40%,
      rgba(241, 242, 237, 0.18) 100%
    );
}

/* —— Left-column type (Study 01 letter-type rhythm + sizing) —— */
.type-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(28px, 5vw, 56px) clamp(22px, 3.5vw, 48px);
  max-width: min(520px, 48%);
  pointer-events: none;
}
.type-layer .lead,
.type-layer .support {
  margin: 0;
  color: var(--ink);
  font-weight: 300;
  letter-spacing: -0.04em;
}
.type-layer .lead {
  display: inline;
  max-width: 11ch;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.05;
}
.type-layer .support {
  display: block;
  margin-top: 18px;
  max-width: 22ch;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.caret {
  display: inline-block;
  width: 0.05em;
  height: 0.85em;
  margin-left: 0.04em;
  vertical-align: -0.05em;
  background: var(--ink);
  opacity: 0;
  animation: blink 1s steps(1) infinite;
}
.caret.on { opacity: 0.55; }
@keyframes blink {
  50% { opacity: 0; }
}

/* —— Quiet beat nav (chrome, not scan/HUD overlay) —— */
.nav {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 6px clamp(18px, 3.5vw, 48px) calc(14px + var(--safe-bottom));
  color: #f6f2e8;
}
.nav-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-btn {
  min-width: 44px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(246, 242, 232, 0.22);
  border-radius: 999px;
  color: rgba(246, 242, 232, 0.88);
  font: 400 12px/1 Manrope, sans-serif;
  letter-spacing: 0.08em;
}
.nav-btn:hover { border-color: rgba(246, 242, 232, 0.5); }
.nav-btn:disabled { opacity: 0.35; cursor: default; }
.dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(246, 242, 232, 0.28);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.dots span.on {
  background: var(--amber);
  transform: scale(1.15);
}
.beat-label {
  color: rgba(246, 242, 232, 0.5);
  font: 400 11px/1 Manrope, sans-serif;
  letter-spacing: 0.12em;
}

/* —— Phone: wash still protects type; film never steals focus —— */
@media (max-width: 720px) {
  .chrome-title { display: none; }
  .story-card { border-radius: 22px; }
  .type-layer {
    max-width: 100%;
    padding: clamp(24px, 6vw, 40px) clamp(20px, 5vw, 32px);
  }
  .type-layer .lead {
    max-width: 12ch;
    font-size: clamp(32px, 9vw, 44px);
  }
  .type-layer .support {
    font-size: clamp(16px, 4.2vw, 20px);
  }
  .paper-wash {
    background:
      linear-gradient(
        90deg,
        rgba(241, 242, 237, 0.96) 0%,
        rgba(241, 242, 237, 0.9) 28%,
        rgba(245, 243, 235, 0.72) 52%,
        rgba(245, 243, 235, 0.4) 72%,
        rgba(241, 242, 237, 0.12) 88%,
        rgba(241, 242, 237, 0) 100%
      ),
      linear-gradient(
        180deg,
        rgba(241, 242, 237, 0.28) 0%,
        rgba(241, 242, 237, 0.12) 45%,
        rgba(241, 242, 237, 0.22) 100%
      );
  }
  .film video,
  .film-still {
    object-position: 48% 8%;
    opacity: 0.4;
  }
  .film video { opacity: 0.4; }
}

@media (max-width: 520px) {
  .nav-btn { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { display: none !important; }
  .film video { display: none; }
  .film-still { display: block; }
}
