/* Miniature Lisbon — paper-craft scroll journey */

:root {
  --ivory: #f6f0e4;
  --ivory-deep: #efe6d2;
  --charcoal: #2a2622;
  --forest: #2f5d46;
  --orange: #c4622d;
  --indigo: #2b3a67;
  --saffron: #e8a93d;
  --accent-s1: #c4622d;
  --accent-s2: #e8a93d;
  --accent-s3: #3e7c6b;
  --accent-s4: #8fa3e8;
  --nav-h: 64px;
}

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

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

body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.55;
  overflow-x: hidden;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ivory);
  color: var(--charcoal);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border: 2px solid var(--charcoal);
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3rem);
  z-index: 100;
  background: transparent;
  color: #fff;
  text-shadow: 0 1px 8px rgba(30, 24, 16, 0.55);
  transition: background 0.35s ease, color 0.35s ease, text-shadow 0.35s ease, box-shadow 0.35s ease;
}
.site-nav .brand {
  font-weight: bold;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-nav .brand span { font-weight: normal; font-style: italic; opacity: 0.85; }
.site-nav nav { display: flex; gap: clamp(0.75rem, 2.5vw, 2rem); }
.site-nav nav a {
  text-decoration: none;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.2rem;
  opacity: 0.9;
}
.site-nav nav a:focus-visible,
.site-nav .brand:focus-visible,
.cta-row a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}
/* sticky bar state after the journey releases */
.site-nav.is-sticky {
  position: sticky;
  background: rgba(246, 240, 228, 0.94);
  color: var(--charcoal);
  text-shadow: none;
  box-shadow: 0 1px 0 rgba(42, 38, 34, 0.15);
}
@media (prefers-color-scheme: dark) {
  .site-nav.is-sticky { background: rgba(26, 22, 18, 0.94); color: var(--ivory); }
}

/* ---------- Journey ---------- */
.journey {
  /* 4 scenes × 1.5 viewport-heights + 1 to release */
  height: 700vh; /* fallback */
  height: calc(100svh * 7);
  position: relative;
}
.journey-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #efe4cc;
}

.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity, transform;
  transform-origin: 50% 60%;
}
.scene.is-active { opacity: 1; }
.scene-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* scene copy */
.scene-copy {
  position: absolute;
  left: clamp(1.25rem, 6vw, 6rem);
  bottom: clamp(3.5rem, 12vh, 8rem);
  max-width: min(34rem, 80vw);
  color: #fff;
  text-shadow: 0 2px 14px rgba(25, 20, 12, 0.75), 0 0 2px rgba(25, 20, 12, 0.7);
  opacity: 0;
  will-change: opacity, transform;
}
.scene-copy .eyebrow {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  display: inline-block;
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.35rem;
}
.scene-copy h1, .scene-copy h2 {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  line-height: 1.05;
  margin-bottom: 0.6rem;
  font-weight: 700;
}
.scene-copy p:not(.eyebrow) {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  max-width: 30rem;
}
.scene[data-scene="0"] .scene-copy { color: #ffd9c2; }   /* burnt orange family */
.scene[data-scene="1"] .scene-copy { color: #ffe6ad; }   /* saffron family */
.scene[data-scene="2"] .scene-copy { color: #c8e8dc; }   /* teal-green family */
.scene[data-scene="3"] .scene-copy { color: #ccd6f6; }   /* indigo-light family */

.cta-row { margin-top: 1.4rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.cta-row a {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 3px;
  text-shadow: none;
}
.cta-primary {
  background: var(--saffron);
  color: #2a2013;
  font-weight: bold;
}
.cta-primary:hover { background: #f2c25e; }
.cta-secondary {
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
}
.cta-secondary:hover { background: rgba(255, 255, 255, 0.14); }

/* scrim for legibility */
.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(28, 22, 14, 0.55) 0%, rgba(28, 22, 14, 0.18) 34%, rgba(28, 22, 14, 0) 60%);
}

/* ambient life */
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particles span {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 244, 220, 0.55);
  top: 110%;
  animation: drift linear infinite;
}
.particles span:nth-child(1)  { left: 8%;  animation-duration: 17s; animation-delay: 0s;   transform: scale(1.1); }
.particles span:nth-child(2)  { left: 21%; animation-duration: 22s; animation-delay: 3s;   transform: scale(0.7); }
.particles span:nth-child(3)  { left: 33%; animation-duration: 19s; animation-delay: 8s;   transform: scale(1); }
.particles span:nth-child(4)  { left: 46%; animation-duration: 25s; animation-delay: 1.5s; transform: scale(0.6); }
.particles span:nth-child(5)  { left: 57%; animation-duration: 20s; animation-delay: 6s;   transform: scale(0.9); }
.particles span:nth-child(6)  { left: 66%; animation-duration: 24s; animation-delay: 10s;  transform: scale(0.75); }
.particles span:nth-child(7)  { left: 74%; animation-duration: 18s; animation-delay: 4s;   transform: scale(1.05); }
.particles span:nth-child(8)  { left: 83%; animation-duration: 23s; animation-delay: 7s;   transform: scale(0.65); }
.particles span:nth-child(9)  { left: 90%; animation-duration: 21s; animation-delay: 2s;   transform: scale(0.85); }
.particles span:nth-child(10) { left: 15%; animation-duration: 26s; animation-delay: 12s;  transform: scale(0.55); }
.particles span:nth-child(11) { left: 52%; animation-duration: 27s; animation-delay: 14s;  transform: scale(0.7); }
.particles span:nth-child(12) { left: 96%; animation-duration: 19s; animation-delay: 9s;   transform: scale(0.9); }
@keyframes drift {
  0%   { translate: 0 0; opacity: 0; }
  8%   { opacity: 0.8; }
  90%  { opacity: 0.5; }
  100% { translate: 4vw -118vh; opacity: 0; }
}
.haze {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 50% 72%, rgba(255, 240, 210, 0.10), rgba(255, 240, 210, 0) 70%);
  animation: hazeShift 26s ease-in-out infinite alternate;
}
@keyframes hazeShift {
  from { transform: translateX(-3%); opacity: 0.7; }
  to   { transform: translateX(3%);  opacity: 1; }
}

.journey-hint {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  translate: -50% 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(25, 20, 12, 0.7);
  animation: hintPulse 2.4s ease-in-out infinite;
  transition: opacity 0.5s ease;
}
.journey-hint.is-hidden { opacity: 0; }
@keyframes hintPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- Supporting sections ---------- */
.section {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.25rem, 4vw, 3rem);
}
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head .eyebrow, .scene-copy .eyebrow { color: var(--orange); }
.section-head .eyebrow {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 0.5rem; }
.section-alt {
  max-width: none;
  background: var(--ivory-deep);
}
.section-alt > * { max-width: 76rem; margin-left: auto; margin-right: auto; }
.section-alt > .section-head { margin-bottom: 2.5rem; }
@media (prefers-color-scheme: dark) {
  body { background: #211d18; color: var(--ivory); }
  .section-alt { background: #1a1712; }
  .site-footer { background: #171410; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.card {
  background: #fffdf6;
  border: 1px solid rgba(42, 38, 34, 0.14);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(42, 38, 34, 0.08);
  display: flex;
  flex-direction: column;
}
@media (prefers-color-scheme: dark) {
  .card { background: #2b2620; border-color: rgba(246, 240, 228, 0.12); }
}
.card img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.card h3 {
  font-size: 1.25rem;
  padding: 1.1rem 1.25rem 0.3rem;
}
.card p {
  padding: 0 1.25rem 1.3rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--ivory);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.site-footer .brand { font-weight: bold; font-size: 1.1rem; display: block; margin-bottom: 0.6rem; }
.site-footer p { max-width: 40rem; opacity: 0.85; }
.site-footer .footer-meta { margin-top: 1.2rem; font-size: 0.85rem; }
.site-footer a { color: var(--saffron); }

/* ---------- Reduced motion: stacked static story ---------- */
@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .journey-viewport { position: static; height: auto; overflow: visible; }
  .scene {
    position: relative;
    opacity: 1 !important;
    transform: none !important;
    min-height: 72svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-bottom: 4px solid var(--ivory-deep);
  }
  .scene-poster { height: 100%; }
  .scene-copy { position: relative; opacity: 1 !important; transform: none !important; padding: 1.25rem 1.25rem 2.5rem; left: auto; bottom: auto; }
  .particles, .haze, .journey-hint { display: none; }
  .site-nav { position: sticky; background: rgba(246, 240, 228, 0.94); color: var(--charcoal); text-shadow: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .journey-hint { display: none; }
}

/* ---------- Mobile / coarse pointer ---------- */
@media (max-width: 700px), (pointer: coarse) {
  :root { --nav-h: 56px; }
  .scene-copy { bottom: clamp(2.5rem, 10vh, 5rem); }
  .scene-copy p:not(.eyebrow) { font-size: 0.92rem; }
  .particles span:nth-child(n+7) { display: none; }
  .cta-row a { padding: 0.7rem 1.1rem; font-size: 0.8rem; }
}
