@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&display=swap');

/* ============================================================
   LOCAL FONTS
============================================================ */
@font-face {
  font-family: 'Editors Note';
  src: url('../assets/fonts/EditorsNote-Semibold-iF664322be731c3.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Editors Note';
  src: url('../assets/fonts/EditorsNote-BoldItalic-iF664322be3e863.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Editors Note';
  src: url('../assets/fonts/EditorsNote-SemiboldItalic-iF664322be785e3.otf') format('opentype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--espresso);
  color: var(--espresso);
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
.amp { font-family: 'Helvetica Neue', Arial, sans-serif; }

/* ============================================================
   DESIGN SYSTEM
============================================================ */
:root {
  --brown:      #3e2723;
  --yellow:     #ffeda2;
  --cream:      #f8f6f1;
  --warm-white: #faf9f7;
  --stone:      #d8d3cb;
  --muted-gold: #d8c178;
  --espresso:   #2b1c19;
  --warm-grey:  #7a746f;
  --ease-lux:   cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1);
  --z-nav:      1100;
  --z-drop:     90;
  --z-obj:      10;
  --z-card:     20;
}

/* ============================================================
   GRAIN OVERLAY (fixed, full-screen, very subtle)
============================================================ */
.grain-overlay {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.020;
  filter: url(#grain-filter);
  animation: grain-move 9s steps(1) infinite;
}
@keyframes grain-move {
  0%   { transform: translate(0,    0);    }
  11%  { transform: translate(-3%,  -4%);  }
  22%  { transform: translate(4%,   2%);   }
  33%  { transform: translate(-2%,  5%);   }
  44%  { transform: translate(3%,  -2%);   }
  55%  { transform: translate(-4%,  3%);   }
  66%  { transform: translate(2%,  -4%);   }
  77%  { transform: translate(-3%,  2%);   }
  88%  { transform: translate(1%,  -1%);   }
  100% { transform: translate(0,    0);    }
}

/* ============================================================
   NAV
============================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 0 28px;
  height: 75px;
  background: rgba(250,249,247,0.94);
  transition: border-color 300ms ease, backdrop-filter 300ms ease;
  border-bottom: 0.5px solid transparent;
  overflow: visible;
}
.site-nav.is-scrolled {
  border-bottom-color: var(--stone);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250,249,247,0.88);
}

.nav-wordmark {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-style: normal;
  font-size: 18px;
  color: var(--espresso);
  line-height: 1.1;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.nav-avatar {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.nav-wordmark-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ============================================================
   FLIP-CLOCK NAV COMPONENT
============================================================ */

/* Outer container — sized to skeleton aspect ratio (2066 × 1024) */
.flip-nav {
   transform: scale(0.85);
  transform-origin: top right;
  position: relative;
  width: 300px;
  height: 149px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: -19px;
}

/* Skeleton frame image */
.flip-skeleton-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  display: block;
}

/* Up / Down arrow buttons */
.flip-ctrl {
  position: absolute;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  line-height: 0;
  transition: opacity 160ms ease, transform 120ms ease;
  z-index: 2;
}
.flip-ctrl:hover  { opacity: 0.70; transform: scale(1.12); }
.flip-ctrl:active { opacity: 0.45; transform: scale(0.96); }
.flip-ctrl img {
  display: block;
  width: 14px;
  height: 13px;
  pointer-events: none;
}
.flip-ctrl--up   { left: 37px; top: 44px; }
.flip-ctrl--down { left: 37px; top: 58.5px; }

/* Tile display button (clickable area over black panel) */
.flip-display-wrap {
  position: absolute;
  left: 70px;
  top: 49px;
  width: 191px;
  height: 29px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  perspective: 500px;
  perspective-origin: 50% 50%;
}
.flip-display-wrap:focus { outline: none; }

/* Individual page tile images */
.flip-tile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  backface-visibility: hidden;
  transform-origin: top center;
}
.flip-tile.is-current { opacity: 1; }

/* Flip animations */
@keyframes flip-exit {
  from { transform: perspective(500px) rotateX(0deg);   opacity: 1; }
  to   { transform: perspective(500px) rotateX(-88deg); opacity: 0; }
}
@keyframes flip-enter {
  from { transform: perspective(500px) rotateX(88deg);  opacity: 0; }
  to   { transform: perspective(500px) rotateX(0deg);   opacity: 1; }
}
.flip-tile.is-exit  { animation: flip-exit  0.20s ease-in  forwards; }
.flip-tile.is-enter { animation: flip-enter 0.20s ease-out 0.18s forwards; }

/* Expandable dropdown menu */
.flip-menu {
  position: absolute;
  left: 68px;
  top: 90px;
  width: 191px;
  background: #0d0d0d;
  border: 1px solid #2c2c2c;
  border-top: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 360ms var(--ease-lux);
  z-index: calc(var(--z-nav) + 5);
  overflow: hidden;
}
.flip-menu.is-open { clip-path: inset(0 0 0% 0); }

.flip-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  color: #f5f1ea;
  font-family: 'Playfair Display', serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid #1c1c1c;
  transition: color 150ms ease, background 150ms ease;
}
.flip-menu-item:last-child { border-bottom: none; }
.flip-menu-item:hover      { color: #ffffff; background: rgba(255,255,255,0.03); }
.flip-menu-item.is-current { color: var(--yellow); }

.flip-menu-num {
  font-size: 9px;
  color: #444;
  letter-spacing: 0.08em;
  min-width: 16px;
}
.flip-menu-item.is-current .flip-menu-num { color: var(--muted-gold); }

@media (max-width: 700px) {
  .site-nav { padding: 0 8px 0 20px; }
}

/* ============================================================
   SECTION 1 — HERO
============================================================ */
.section-hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  background: var(--warm-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 48px 100px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-headline {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(50px, 7.5vw, 92px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--brown);
  margin-bottom: 30px;
}

.hero-body {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.78;
  color: var(--warm-grey);
  max-width: 520px;
  margin: 0 auto;
  hyphens: none;
}

/* Fixed overlay — stays visible while user scrolls through hero */
#hero-sticky {
  position: absolute;
  bottom: 52px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 50;
  pointer-events: none;
}

.hero-subline {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--stone);
  margin: 0;
}

.hero-scroll-arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--stone);
  border-bottom: 2px solid var(--stone);
  transform: rotate(45deg);
  margin: 20px auto 0;
  animation: hero-arrow-blink 2s ease-in-out infinite;
}
@keyframes hero-arrow-blink {
  0%, 100% { opacity: 0.15; }
  50%       { opacity: 1; }
}

/* FALLING-TEXT DISABLED — un-comment to restore per-character spans
.hero-char {
  display: inline;
  vertical-align: baseline;
  line-height: inherit;
}
*/

/* Per-character reveal spans */
.tc { display: inline; }

/* Typing cursor — fixed so it never affects layout */
.hero-cursor {
  position: fixed;
  width: 2px;
  background: var(--espresso);
  pointer-events: none;
  z-index: 9999;
}
.hero-cursor--blink {
  animation: hero-cursor-blink 0.75s step-end infinite;
}
@keyframes hero-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   SECTION 2 — WALKING ANIMATION
============================================================ */
.section-walking {
  position: relative;
  height: 100vh;
  min-height: 620px;
  background: var(--warm-white);
  overflow: hidden;
}

.walk-inner {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Left column: footsteps */
.walk-col-left {
  position: relative;
  flex: 0 0 58%;
  height: 100%;
  padding-left: 14%;
}

.foot {
  position: absolute;
  width: 140px;
  pointer-events: none;
}
.foot img {
  width: 100%;
  height: auto;
  display: block;
}

/* foot-1: both feet (LANDING), centred & straight */
.foot-1 { left: 40%; top: 7%;  transform: rotate(0deg); }
/* foot-2–4: individual right/left/right feet */
.foot-2 { left: 52%; top: 30%; transform: rotate(3deg); }
.foot-3 { left: 34%; top: 54%; transform: rotate(-3deg); }
.foot-4 { left: 52%; top: 76%; transform: rotate(3deg); }

/* Right column: object labels */
.walk-col-right {
  flex: 0 0 48%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 32px 60px 0;
}

.walk-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  position: relative;
}
.walk-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 1px;
  background: var(--stone);
}
.walk-label:last-child::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 220px;
  height: 1px;
  background: var(--stone);
}

.wl-icon {
  width: 55px;
  height: 55px;
  flex-shrink: 0;
  opacity: 0.7;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  padding: 0;
  margin: 0;
}

.wl-title {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 400;
  color: var(--espresso);
  opacity: 0.5;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ============================================================
   SECTION 3 — DESK OVERVIEW (editorial note)
============================================================ */
.section-desk-intro {
  background: var(--warm-white);
  padding: 110px 48px 90px;
}

.editorial-note {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  max-width: 620px;
  margin-left: 9%;
}
.editorial-note__line {
  flex-shrink: 0;
  width: 2px;
  align-self: stretch;
  background: var(--brown);
  border-radius: 1px;
}
.editorial-note__copy {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--espresso);
  line-height: 1.3;
}

/* ============================================================
   SECTION 4 — INTERACTIVE DESK
============================================================ */
.section-desk {
  background: url('../assets/carpet.jpg') center / cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.desk-surface {
  position: relative;
  width: min(1200px, 96vw);
  aspect-ratio: 16 / 9;
  background: url('../assets/table_top.png') center / cover no-repeat;
  background-size: 120% 180%;
  border-radius: 14px;
  box-shadow:
    0 28px 70px rgba(0,0,0,0.42),
    0 10px 26px rgba(0,0,0,0.20),
    0 0   0 1px rgba(0,0,0,0.08);
  overflow: visible;
}

/* ---- Desk objects ---- */
.desk-obj {
  position: absolute;
  z-index: var(--z-obj);
  cursor: pointer;
  transition:
    transform  500ms var(--ease-lux),
    filter     500ms var(--ease-lux);
}
.desk-obj--deco {
  cursor: default;
  pointer-events: none;
}
.desk-obj:not(.desk-obj--deco):hover,
.desk-obj:not(.desk-obj--deco):focus-within {
  transform: translateY(-5px) rotate(1.5deg);
  filter: drop-shadow(0 20px 34px rgba(0,0,0,0.30));
  z-index: calc(var(--z-obj) + 1);
  outline: none;
}
.desk-obj img {
  width: 100%;
  height: auto;
  pointer-events: none;
  display: block;
}
.desk-obj:not(.desk-obj--deco):focus-visible {
  outline: 2px solid var(--muted-gold);
  outline-offset: 4px;
  border-radius: 4px;
}
#obj-glasses {
  pointer-events: auto;
  cursor: default;
}
#obj-glasses:hover {
  transform: translateY(-5px) rotate(1.5deg);
  filter: drop-shadow(0 20px 34px rgba(0,0,0,0.30));
  z-index: calc(var(--z-obj) + 1);
}

/* Object positions (% of desk width/height) */
#obj-moodboard  { left:  calc(2%  + 8px);  top:  8%;  width: 21%; }
#obj-macbook    { left:  calc(29% + 5px);  top: -10%; width: 43%;
                  z-index: calc(var(--z-obj) + 2); }
#obj-camera     { left: calc(72% + 20px);  top:  2%;  width: 18%; }
#obj-calculator { left: calc(20% + 35px);  top: 58%;  width: 10%; }
#obj-coffee     { left: calc(56% + 5px);  top: 58%;  width: 14%; }
#obj-book       { left: calc(70% + 35px);  top:  40%; width: 21%; }
#obj-glasses    { left:  25%;  top: 52%;  width: 16%; opacity: 0.85; }

#obj-macbook:hover,
#obj-macbook:focus-within {
  transform: translateY(-4px) rotate(0.5deg);
}

#obj-coffee:hover,
#obj-coffee:focus-within,
#obj-coffee.is-active {
  z-index: calc(var(--z-obj) + 15);
}

/* ---- Info cards ---- */
.info-card {
  position: absolute;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  bottom: calc(100% + 24px);
  left: 44%;
  transform: translateX(-50%) translateY(8px);
  width: 212px;
  background: #ffffff;
  border: 1px solid var(--stone);
  border-radius: 2px;
  padding: 16px 18px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.09), 0 2px 8px rgba(0,0,0,0.05);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity   280ms var(--ease-lux),
    transform 280ms var(--ease-lux);
  z-index: var(--z-card);
  white-space: nowrap;
}

.desk-obj:hover .info-card,
.desk-obj:focus-within .info-card,
.desk-obj.is-active .info-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Moodboard (top-left) — opens DOWNWARD, left-aligned */
#obj-moodboard .info-card {
  top: calc(100% + 2px);
  bottom: auto;
  left: 0;
  transform: translateX(0) translateY(8px);
}
#obj-moodboard:hover .info-card,
#obj-moodboard:focus-within .info-card,
#obj-moodboard.is-active .info-card {
  transform: translateX(0) translateY(0);
}

/* Camera (top-right) — opens DOWNWARD, right-aligned */
#obj-camera .info-card {
  top: calc(100% - 50px);
  bottom: auto;
  left: auto;
  right: -60px;
  transform: translateX(0) translateY(8px);
}
#obj-camera:hover .info-card,
#obj-camera:focus-within .info-card,
#obj-camera.is-active .info-card {
  transform: translateX(0) translateY(0);
}

/* MacBook (centre, large) — opens DOWNWARD, centred */
#obj-macbook .info-card {
  top: calc(100% - 110px);
  left: 38%;
  bottom: auto;
  transform: translateX(-50%) translateY(8px);
}
#obj-macbook:hover .info-card,
#obj-macbook:focus-within .info-card,
#obj-macbook.is-active .info-card {
  transform: translateX(-50%) translateY(0);
}

/* Calculator (left edge) — opens RIGHTWARD */
#obj-calculator .info-card {
  bottom: 60%;
  top: auto;
  left: calc(100% + 28px);
  transform: translateX(8px) translateY(50%);
}
#obj-calculator:hover .info-card,
#obj-calculator:focus-within .info-card,
#obj-calculator.is-active .info-card {
  transform: translateX(0) translateY(50%);
  opacity: 1;
}

/* Library (right side) — shift right and slightly lower than default */
#obj-book .info-card {
  left: calc(100% + 28px);
  bottom: calc(100% - 50px);
}
#obj-book:hover .info-card,
#obj-book:focus-within .info-card,
#obj-book.is-active .info-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* About Me (coffee) — lower than default */
#obj-coffee .info-card {
  bottom: calc(100% - 5px);
  left: 60%;
}
#obj-coffee:hover .info-card,
#obj-coffee:focus-within .info-card,
#obj-coffee.is-active .info-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip card PNG backgrounds — replace ivory square with designed card images */
#obj-moodboard  .info-card,
#obj-macbook    .info-card,
#obj-camera     .info-card,
#obj-calculator .info-card,
#obj-coffee     .info-card,
#obj-book       .info-card {
  background-color: transparent;
  border: none;
  box-shadow: none;
  width: 320px;
  height: 213px;
  white-space: normal;
  padding: 48px 48px 16px;
  overflow: hidden;
  background: url('../assets/tooltip_card.png') center / cover no-repeat;
}

/* Info card typography */
.ic-title {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 510;
  color: var(--espresso);
  line-height: 1.3;
  margin-bottom: 8px;
}
.ic-body {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 12.5px;
  font-weight: 420;
  color: var(--warm-grey);
  line-height: 1.70;
  white-space: normal;
  margin-bottom: 12px;
}
.ic-cta {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--espresso);
  text-transform: uppercase;
  transition: opacity 100ms ease;
}
.ic-cta:hover { opacity: 0.65; }

/* ============================================================
   SECTION 5 — CURRENT FOCUS
============================================================ */
.section-focus {
  background: var(--warm-white);
  padding: 130px 48px 110px;
}

.focus-header {
  text-align: center;
  margin-bottom: 68px;
}

.section-label {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--warm-grey);
  margin-bottom: 16px;
}

.focus-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 400;
  color: var(--espresso);
  line-height: 1.2;
  margin-bottom: 16px;
}

.focus-body-text {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--warm-grey);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.75;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 940px;
  margin: 0 auto;
}

.note-card {
  background: var(--cream);
  border: 1px solid var(--stone);
  border-radius: 2px;
  padding: 36px 28px;
  min-height: 220px;
  position: relative;
}
.note-card::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(216,211,203,0.55);
  border-radius: 1px;
  pointer-events: none;
}
.note-card p {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  color: var(--stone);
}
.note-card--1 { transform: rotate(-1.5deg); }
.note-card--2 { transform: rotate(0.8deg); }
.note-card--3 { transform: rotate(-0.6deg); }

/* ============================================================
   SECTION 6 — CONTACT (envelope + letter)
============================================================ */
.desk-bumper {
  height: 80px;
  background: var(--cream);
}

.section-contact {
  background: var(--cream);
  padding: 80px 48px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 60px;
  align-items: start;
}

.contact-header {
  grid-column: 1;
  grid-row: 1;
  text-align: left;
  margin: 0 auto;
  align-self: center;
}

.env-scene {
  grid-column: 2;
  grid-row: 1 / 3;
  margin-top: -50px;
  padding-bottom: 40px;
}

.section-contact > .basket-wrap {
  grid-column: 1;
  grid-row: 2;
}

/* ── Basket parallax component ── */
.basket-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 3 / 2;
  margin-top: 38px;
  margin: 0 auto;
  display: block;
  cursor: default;
  overflow: visible;
}

.basket-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
  user-select: none;
  display: block;
  -webkit-user-drag: none;
}

.basket-obj {
  position: absolute;
  z-index: 3;
  display: block;
  cursor: pointer;
  will-change: transform;
  transform-origin: center center;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 4px;
}

.basket-obj img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.basket-obj:hover {
  z-index: 3;
}

.basket-tip {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  display: none;
  color: #1a1a1a;
  font-family: 'Playfair Display', serif;
  font-size: 0.785rem;
  font-weight: 700;
  padding: 2px 5px;
  max-width: 210px;
  line-height: 1.5;
  background: var(--stone);
}
.basket-tip.is-visible { display: block; }

.contact-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 400;
  color: var(--espresso);
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-body-text {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--warm-grey);
  max-width: 460px;
  line-height: 1.78;
}

/* ---- Envelope scene ---- */
.env-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

.envelope {
  position: relative;
  width: min(580px, 90vw);
  aspect-ratio: 2 / 3;
  --env-h: calc(min(580px, 90vw) * 1.5);
  transition:
    transform 500ms var(--ease-lux),
    opacity   500ms var(--ease-lux);
}
.envelope.sent {
  transform: translateX(48px);
  opacity: 0;
}

/* PNG layers — back, front, flap all fill the container exactly */
.env-back-img,
.env-front-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.env-back-img  { z-index: 1; transform: scale(1.02) translateY(-40.5px); left: 2px; }
.env-front-img { z-index: 3; }

@keyframes letter-send {
  0%   { transform: translateY(calc(var(--env-h) * -0.506)); }
  18%  { transform: translateY(calc(var(--env-h) * -0.552)); }
  100% { transform: translateY(calc(var(--env-h) * -0.287)); }
}

.env-letter {
  position: absolute;
  bottom: 0;
  left: 9%; right: 9%;
  background: #fefefe;
  border: 1px solid #e8e3db;
  padding: 20px 20px 16px;
  transform: translateY(calc(var(--env-h) * -0.460));
  transition: transform 620ms var(--ease-lux);
  z-index: 4;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.055);
}
.envelope.sending .env-letter {
  animation: letter-send 750ms var(--ease-lux) forwards;
  transition: none;
}
.envelope.sealing .env-letter,
.envelope.sealed  .env-letter,
.envelope.sent    .env-letter {
  z-index: 1;
}

/* Flap — open (pointing up) by default; rotates closed on submit */
.env-flap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  left: 0.5px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 50% 68%;
  transform: translateY(calc(var(--env-h) * -0.299)) rotateX(0deg);
  transition: transform 300ms var(--ease-lux);
}
.envelope.sealing .env-flap,
.envelope.sealed  .env-flap,
.envelope.sent    .env-flap {
  transform: translateY(calc(var(--env-h) * -0.449)) rotateX(-180deg);
  z-index: 6;
}

.wax-seal {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 72px;
  height: auto;
  transition: transform 420ms cubic-bezier(0.34, 1.42, 0.64, 1);
  z-index: 7;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.envelope.sealed .wax-seal,
.envelope.sent   .wax-seal {
  transform: translateX(-50%) scale(1);
}

/* ---- Contact form (on letter paper) ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-family: 'Playfair Display', serif;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-grey);
}
.form-field input,
.form-field textarea {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--espresso);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--stone);
  padding: 6px 0;
  outline: none;
  transition: border-color 200ms ease;
  resize: none;
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--espresso);
}
.form-field.has-error input,
.form-field.has-error textarea {
  border-bottom-color: #c0392b;
}
.form-field textarea { min-height: 58px; }

.form-submit {
  align-self: flex-start;
  margin-top: 6px;
  font-family: 'Playfair Display', serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--espresso);
  border: 1px solid var(--stone);
  padding: 10px 26px;
  background: transparent;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.form-submit:hover {
  background: var(--espresso);
  color: var(--cream);
  border-color: var(--espresso);
}
.form-submit:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.success-msg {
  display: block;
  width: 110px;
  height: auto;
  margin: -410px auto 0;
  margin-left: calc(50% + 65px);
  opacity: 0;
  transform: translateY(10px) rotate(8deg);
  transition: opacity 520ms var(--ease-lux), transform 520ms var(--ease-lux);
}
.success-msg.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(8deg);
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: var(--espresso);
  padding: 10px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-wordmark {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 16px;
  color: rgba(250,249,247,0.55);
  letter-spacing: 0.04em;
}
.footer-copy {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(250,249,247,0.55);
  letter-spacing: 0.05em;
}

/* ============================================================
   RESPONSIVE — 768px
============================================================ */
@media (max-width: 768px) {
  /* Prevent flip-nav overflow from creating a body-background bleed on the right */
  html { overflow-x: clip; }

  /* ── Nav ── */
  .site-nav        { padding: 6px 6px 0 12px; }
  .nav-avatar      { height: 36px; width: 36px; }
  .nav-wordmark    { font-size: 14px; gap: 4px; }
  /* Detach flip-nav from flex flow so wordmark can't push it off-screen.
     Anchored absolutely to the nav's right edge — same pattern as .mb-right. */
  .flip-nav        { position: absolute; right: 0; top: 5px; margin-top: -19px; transform: scale(0.75); transform-origin: top right; }

  /* ── Hero ── */
  .section-hero { padding: 70px 24px 80px; }
  .hero-headline { font-size: clamp(38px, 10vw, 60px); }
  .hero-body     { font-size: 15px; }
  #hero-sticky   { bottom: 32px; }
  .hero-subline  { font-size: 14px; }

  /* ── Walking section ── */
  .walk-inner { flex-direction: column; }
  .walk-col-left  { flex: 0 0 65vh; height: 65vh; }
  .walk-col-right { flex: 1; padding: 24px 24px 32px; }
  .walk-label { padding: 12px 0; gap: 10px; }
  .walk-label::before,
  .walk-label:last-child::after { width: 160px; }
  .wl-icon  { width: 36px; height: 36px; }
  .wl-title { font-size: 15px; }

  /* ── Desk intro ── */
  .section-desk-intro { padding: 70px 24px 60px; }
  .editorial-note     { margin-left: 0; max-width: 100%; }
  .editorial-note__copy { font-size: 14px; }

  /* ── Interactive desk ── */
  .section-desk { padding: 48px 12px; min-height: auto; }
  .desk-surface { width: 96vw; }
  .desk-obj     { zoom: 1; }
  #obj-camera   { left: calc(62% + 40px); }
  #obj-book     { left: calc(60% + 45px); }

  /* Info cards: JS moves them to .section-desk; position absolutely at bottom-centre */
  .section-desk { position: relative; }
  .section-desk > .info-card {
    position: absolute;
    bottom: -90px;
    left: 45%;
    top: auto;
    right: auto;
    transform: translateX(-50%) translateY(12px);
    width: 260px;
    height: 173px;
    padding: 38px 38px 12px;
    background: url('../assets/tooltip_card.png') center / cover no-repeat;
    background-color: transparent;
    border: none;
    box-shadow: none;
    white-space: normal;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
  }
  .section-desk > .info-card.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
  .section-desk > .info-card .ic-title { font-size: 14px; margin-bottom: 6px; }
  .section-desk > .info-card .ic-body  { font-size: 11px; margin-bottom: 8px; }
  .section-desk > .info-card .ic-cta   { font-size: 8px; }

  /* ── Focus / note cards ── */
  .section-focus    { padding: 90px 24px 80px; }
  .focus-grid       { grid-template-columns: 1fr; max-width: 380px; gap: 20px; }
  .note-card--1, .note-card--2, .note-card--3 { transform: none; }

  /* ── Contact section: stack columns ── */
  .section-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px 60px;
    gap: 40px;
    text-align: center;
  }
  .contact-header { padding-left: 0; order: 1; width: 100%; text-align: center; }
  .contact-body-text { margin: 0 auto; }
  .env-scene      { margin-top: 0; order: 2; width: 100%; grid-row: unset; align-self: center; display: flex; flex-direction: column; align-items: center; }
  .section-contact > .basket-wrap { order: 3; max-width: 340px; margin: 0 auto; width: 100%; }

  /* ── Envelope ── */
  .envelope         { width: min(580px, 94vw); --env-h: calc(min(580px, 94vw) * 1.5); }
  .env-letter       { padding: 14px 16px 12px; }
  .envelope.sealing .env-flap,
  .envelope.sealed  .env-flap,
  .envelope.sent    .env-flap { transform: translateY(calc(var(--env-h) * -0.48)) rotateX(-180deg); }
  @keyframes letter-send {
    0%   { transform: translateY(calc(var(--env-h) * -0.506)); }
    18%  { transform: translateY(calc(var(--env-h) * -0.552)); }
    100% { transform: translateY(calc(var(--env-h) * -0.265)); }
  }
  .wax-seal         { top: 51%; }
  .success-msg      { width: 88px; margin-top: -370px; margin-left: calc(50% + 48px); }
  .contact-form     { gap: 12px; }
  .form-field label { font-size: 8px; }
  .form-field input,
  .form-field textarea { font-size: 12px; }
  .form-field textarea  { min-height: 44px; }

  /* ── Footer ── */
  .site-footer { flex-direction: column; gap: 8px; text-align: center; padding: 24px; }
}

/* ── Tablet ── */
@media (min-width: 769px) and (max-width: 1239px) {
  .section-desk { min-height: auto; }
  .walk-col-left { height: min(600px, 70vh); }

  /* ── Contact section: stack columns ── */
  .section-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 60px;
    gap: 56px;
    text-align: center;
  }
  .contact-header { padding-left: 0; order: 1; width: 100%; text-align: center; max-width: 620px; }
  .contact-body-text { margin: 0 auto; }
  .env-scene      { margin-top: 0; order: 2; width: 100%; grid-row: unset; align-self: center; display: flex; flex-direction: column; align-items: center; min-height: calc(min(580px, 90vw) * 1.5); padding-bottom: 0; }
  .section-contact > .basket-wrap { order: 3; max-width: 480px; margin: -24px auto 0; }
}

/* ── Extra-small phones ── */
@media (max-width: 480px) {
  .hero-headline { font-size: clamp(32px, 11vw, 48px); }
  .section-desk { padding: 32px 8px; }
}


/* ============================================================
   REDUCED MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:      0.01ms !important;
  }
  .grain-overlay { display: none; }
  .scroll-line   { animation: none; }
}
