/* Paper Lisbon — hand-cut diorama landing */

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

:root {
  --paper: #f3eee4;
  --paper-deep: #e7dfd0;
  --ink: #241e18;
  --ink-soft: #4a4036;
  --muted: #6e6256;
  --line: rgba(36, 30, 24, 0.12);
  --terracotta: #c45c32;
  --azulejo: #2f6f7e;
  --honey: #c4924a;
  --amber: #e0a04a;
  --forest: #3d5340;
  --indigo: #1c2438;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shadow: 0 18px 40px rgba(36, 30, 24, 0.12);
  --nav-h: 4.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1814;
    --paper-deep: #14110e;
    --ink: #f3eee4;
    --ink-soft: #d4cbb8;
    --muted: #a89884;
    --line: rgba(243, 238, 228, 0.12);
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }
}

html {
  scroll-behavior: auto;
  background: #e4c9a0;
  color-scheme: light;
}

html.is-reduced {
  scroll-behavior: auto;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

body {
  font-family: var(--sans);
  background: #e4c9a0;
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 4000;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 1rem;
}

/* ── Nav ── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--nav-h);
  padding: 0.85rem 6vw;
  background: transparent;
  color: #f6f0e6;
  mix-blend-mode: normal;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-nav .brand,
.site-nav .nav-links a {
  text-shadow: 0 1px 14px rgba(12, 8, 4, 0.72);
}

.site-nav.is-released {
  background: rgba(243, 238, 228, 0.9);
  color: #241e18;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 var(--line);
}

.site-nav.is-released .brand,
.site-nav.is-released .nav-links a {
  text-shadow: none;
}

@media (prefers-color-scheme: dark) {
  .site-nav.is-released {
    background: rgba(27, 24, 20, 0.9);
    color: #f3eee4;
  }
}

.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand small {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 0.18rem;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.82;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}

/* ── Journey ── */

.journey {
  position: relative;
  height: 760vh;
  background: #e4c9a0;
}

.journey-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: #e4c9a0;
  background-image: url("../assets/posters/scene-1.jpg");
  background-size: cover;
  background-position: center;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.scene-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  background: #c9a06c;
}

.scene-layer[data-scene="0"] {
  opacity: 1;
  z-index: 1;
  background: #d7b48a;
}

.scene-layer[data-scene="4"] {
  background: #1c2438;
}

.scene-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 12, 8, 0.08) 0%, rgba(18, 12, 8, 0) 28%),
    linear-gradient(90deg, rgba(16, 10, 6, 0.42) 0%, rgba(16, 10, 6, 0.12) 42%, rgba(16, 10, 6, 0) 68%),
    linear-gradient(to top, rgba(16, 10, 6, 0.62) 0%, rgba(16, 10, 6, 0.22) 38%, rgba(16, 10, 6, 0) 62%);
}

.frame {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  transform-origin: 52% 48%;
}

.frame-b {
  opacity: 0;
}

.scrim {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 32%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 12, 8, 0.48) 0%, rgba(18, 12, 8, 0.16) 55%, rgba(18, 12, 8, 0) 100%);
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 14vh rgba(20, 12, 6, 0.22);
}

.haze {
  position: absolute;
  inset: -12%;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 38% at 18% 78%, rgba(255, 236, 210, 0.16), transparent 72%),
    radial-gradient(ellipse 38% 32% at 82% 18%, rgba(196, 92, 50, 0.1), transparent 70%);
  mix-blend-mode: soft-light;
  animation: haze-drift 18s ease-in-out infinite alternate;
}

@keyframes haze-drift {
  from { transform: translate3d(-1.4%, 0.6%, 0); }
  to { transform: translate3d(1.6%, -1.1%, 0); }
}

.motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.scene-copy {
  position: absolute;
  left: 6vw;
  bottom: 11svh;
  max-width: 34rem;
  z-index: 5;
  color: #fff8ee;
  opacity: 0;
  pointer-events: none;
  text-shadow:
    0 1px 2px rgba(12, 8, 4, 0.65),
    0 10px 28px rgba(12, 8, 4, 0.45);
}

.scene-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -8vw;
  right: -18%;
  top: -42%;
  bottom: -32%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(16, 10, 6, 0.58) 0%, rgba(16, 10, 6, 0.28) 52%, rgba(16, 10, 6, 0) 100%);
}

.scene-layer[data-scene="0"] .scene-copy {
  opacity: 1;
}

.scene-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.scene-title {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5.4vw, 4.2rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: #fff8ee;
  margin-bottom: 0.9rem;
}

.scene-title em {
  font-style: italic;
  color: var(--accent);
}

.scene-body {
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.6;
  max-width: 28rem;
  color: rgba(255, 248, 238, 0.94);
}

.scene-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.35rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #1a120c;
}

.btn-secondary {
  background: transparent;
  color: #fff8ee;
  border-color: rgba(255, 248, 238, 0.45);
}

.btn-secondary:hover {
  border-color: #fff8ee;
  background: rgba(255, 248, 238, 0.08);
}

.scroll-hint {
  position: absolute;
  right: 6vw;
  bottom: 8svh;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  color: rgba(247, 241, 232, 0.72);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scroll-hint span {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-hint i {
  display: block;
  width: 1px;
  height: 3.2rem;
  background: linear-gradient(to bottom, rgba(247, 241, 232, 0.05), rgba(247, 241, 232, 0.8));
}

.ticks {
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  pointer-events: none;
}

.ticks b {
  display: block;
  width: 11px;
  height: 2px;
  background: rgba(247, 241, 232, 0.28);
  transition: width 0.25s ease, background 0.25s ease;
}

.ticks b.is-on {
  width: 22px;
  background: var(--tick, #f7f1e8);
}

/* ── Page ── */

.page {
  position: relative;
  background: var(--paper);
  color: var(--ink);
}

.section {
  padding: 6.5rem 6vw 5.5rem;
  max-width: 88rem;
  margin: 0 auto;
}

.section-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 0.7rem;
}

.section-lead {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 2.6rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease;
}

.card.is-in {
  opacity: 1;
  transform: none;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-visual {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #d8c7aa;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.card:hover .card-visual img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
}

.card-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.card-blurb {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.food-section {
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
}

.food-section .section {
  max-width: 88rem;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.food-card .card-visual {
  aspect-ratio: 1;
}

.site-footer {
  padding: 3rem 6vw 2.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: end;
  border-top: 1px solid var(--line);
  width: 100%;
  background: var(--paper);
  color: var(--ink);
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

.footer-note {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 22rem;
  margin-top: 0.4rem;
}

.footer-links {
  display: flex;
  gap: 1.3rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Reduced motion: stacked static scenes ── */

@media (prefers-reduced-motion: reduce) {
  .journey {
    height: auto !important;
    background: var(--paper);
  }

  .journey-sticky {
    position: relative;
    height: auto;
    overflow: visible;
    background: transparent;
  }

  .stage {
    position: relative;
  }

  .scene-layer {
    position: relative;
    height: 100vh;
    height: 100svh;
    opacity: 1 !important;
    visibility: visible !important;
    background: #c9a06c;
  }

  .frame {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none !important;
  }

  .frame-b {
    display: none;
  }

  .frame-a {
    opacity: 1 !important;
  }

  .scene-copy {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
    bottom: 8svh;
  }

  .scene-cta {
    pointer-events: auto !important;
  }

  .scroll-hint,
  .ticks,
  .motes,
  .haze {
    display: none !important;
  }

  .card,
  .card.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card-visual img {
    transition: none;
  }

  .site-nav {
    background: rgba(243, 238, 228, 0.92);
    color: #241e18;
  }

  .site-nav .brand,
  .site-nav .nav-links a {
    text-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) and (prefers-color-scheme: dark) {
  .site-nav {
    background: rgba(27, 24, 20, 0.92);
    color: #f3eee4;
  }
}

html.is-reduced .journey {
  height: auto !important;
  background: var(--paper);
}

html.is-reduced .journey-sticky {
  position: relative;
  height: auto;
  overflow: visible;
  background: transparent;
}

html.is-reduced .stage {
  position: relative;
}

html.is-reduced .scene-layer {
  position: relative;
  height: 100vh;
  height: 100svh;
  opacity: 1 !important;
  visibility: visible !important;
}

html.is-reduced .frame {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none !important;
}

html.is-reduced .frame-b {
  display: none;
}

html.is-reduced .frame-a {
  opacity: 1 !important;
}

html.is-reduced .scene-copy {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto;
}

html.is-reduced .scene-cta {
  pointer-events: auto !important;
}

html.is-reduced .scroll-hint,
html.is-reduced .ticks,
html.is-reduced .motes,
html.is-reduced .haze {
  display: none !important;
}

html.is-reduced .card,
html.is-reduced .card.is-in {
  opacity: 1;
  transform: none;
  transition: none;
}

html.is-reduced .site-nav {
  background: rgba(243, 238, 228, 0.92);
  color: #241e18;
}

html.is-reduced .site-nav .brand,
html.is-reduced .site-nav .nav-links a {
  text-shadow: none;
}

@media (prefers-color-scheme: dark) {
  html.is-reduced .site-nav {
    background: rgba(27, 24, 20, 0.92);
    color: #f3eee4;
  }
}

/* ── Mobile ── */

@media (max-width: 900px) {
  .card-grid,
  .food-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .scene-copy {
    max-width: 88vw;
    bottom: 7.5svh;
  }

  .ticks {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-nav {
    gap: 0.75rem;
    padding: 0.7rem 5vw;
  }

  .brand small {
    display: none;
  }

  .nav-links {
    gap: 0.85rem;
  }

  .nav-links a {
    font-size: 0.68rem;
  }

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

  .section {
    padding: 4.2rem 6vw 3.6rem;
  }

  .scene-title {
    font-size: 2.15rem;
  }

  .scroll-hint {
    display: none;
  }
}

@media (pointer: coarse) {
  .motes {
    opacity: 0.55;
  }

  .haze {
    animation: none;
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .haze {
    animation: none;
  }
}
