/* ---------- Tokens ---------- */
:root {
  --bg: #FAF5EE;
  --bg-warm: #F0E6D3;
  --burgundy: #6B0F1A;
  --burgundy-hi: #8B1A28;
  --ink: #2A1008;
  --muted: #7A5C4E;
  --rule: rgba(107, 15, 26, 0.15);
  --rule-strong: rgba(107, 15, 26, 0.28);
  --tile-a: #E8D9C8;
  --tile-b: #D4C4B0;

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max: 1380px;
  --gutter: clamp(28px, 5vw, 88px);
}

body.dark-theme {
  --bg: #1A1008;
  --bg-warm: #26160d;
  --ink: #FAF5EE;
  --muted: #B39E92;
  --rule: rgba(250, 245, 238, 0.15);
  --rule-strong: rgba(250, 245, 238, 0.28);
  --tile-a: #26160d;
  --tile-b: #301b10;
  --burgundy: #D4C4B0;
  --burgundy-hi: #E8D9C8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.9;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  background-image:
    radial-gradient(circle at 1px 1px, rgba(107, 15, 26, 0.045) 1px, transparent 0);
  background-size: 22px 22px;
  background-attachment: fixed;
}

::selection {
  background: var(--burgundy);
  color: var(--bg);
}

/* ---------- Layout primitives ---------- */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

.rule-strong {
  height: 1px;
  background: var(--rule-strong);
  width: 100%;
}

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 238, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: background .3s ease;
}

body.dark-theme .nav {
  background: rgba(26, 16, 8, 0.85);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.45em;
  color: var(--burgundy);
  text-transform: uppercase;
}

.wordmark .apos,
.foot-mark .apos {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-left: -0.3em;
  margin-right: 0.15em;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.nav-links a:hover {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

.nav-aside {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-aside .dot {
  color: var(--burgundy);
  margin: 0 8px;
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--burgundy);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--burgundy);
  opacity: 0.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}

.btn-solid {
  background: var(--burgundy);
  color: var(--bg);
  border: 1px solid var(--burgundy);
}

.btn-solid:hover {
  background: var(--burgundy-hi);
  border-color: var(--burgundy-hi);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

.btn-ghost:hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

.btn .arrow {
  transition: transform .25s ease;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Theme Switch ---------- */
.theme-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 30px;
  background: var(--rule-strong);
  border-radius: 15px;
  border: 1px solid var(--rule);
  cursor: pointer;
  padding: 0 7px;
  transition: background 0.3s ease;
}

.theme-switch svg {
  width: 14px;
  height: 14px;
  z-index: 1;
  transition: color 0.3s ease;
}

.theme-switch .switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 24px;
  background: var(--bg);
  border-radius: 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background 0.3s ease;
  z-index: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Light mode (default) */
.theme-switch .switch-knob {
  transform: translateX(28px);
  background: var(--bg);
}

.theme-switch .sun-icon {
  color: var(--ink);
}

.theme-switch .moon-icon {
  color: var(--muted);
}

/* Dark mode */
body.dark-theme .theme-switch {
  background: rgba(250, 245, 238, 0.1);
  border-color: rgba(250, 245, 238, 0.15);
}

body.dark-theme .theme-switch .switch-knob {
  transform: translateX(0);
  background: #2A1008;
}

body.dark-theme .theme-switch .moon-icon {
  color: var(--burgundy);
}

body.dark-theme .theme-switch .sun-icon {
  color: var(--muted);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding-top: clamp(30px, 4vw, 50px);
  padding-bottom: clamp(60px, 8vw, 100px);
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
}

.hero-row {
  width: 100%;
}

.hero-eyebrow {
  margin-bottom: clamp(28px, 4vw, 44px);
  opacity: 0;
  animation: fadeUp .9s .1s ease forwards;
}

.hero-headline {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--ink);
  font-size: clamp(56px, 7.6vw, 116px);
  line-height: 0.92;
  letter-spacing: -0.005em;
  margin: 0 0 clamp(28px, 3.6vw, 44px);
}

.hero-headline .l {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .9s ease forwards;
}

.hero-headline .l:nth-child(1) {
  animation-delay: .18s;
}

.hero-headline .l:nth-child(2) {
  animation-delay: .30s;
}

.hero-headline .l:nth-child(3) {
  animation-delay: .42s;
}

.hero-headline .it {
  font-style: italic;
  font-weight: 400;
  color: var(--burgundy);
}

.hero-headline .amp {
  font-style: italic;
  font-weight: 300;
  color: var(--burgundy);
  margin-right: 6px;
}

.hero-sub {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  max-width: 440px;
  margin: 0 0 clamp(32px, 4vw, 48px);
  opacity: 0;
  animation: fadeUp .9s .55s ease forwards;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .9s .68s ease forwards;
}

.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  max-width: var(--max);
  margin: 0 auto;
  bottom: clamp(32px, 4vw, 56px);
  display: flex;
  align-items: center;
  gap: 28px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  opacity: 0;
  animation: fadeUp .9s .8s ease forwards;
}

.hero-foot .hours {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-foot .hours b {
  color: var(--ink);
  font-weight: 400;
}

.hero-foot .vline {
  width: 1px;
  height: 18px;
  background: var(--rule-strong);
}

.hero-foot .scroll {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--burgundy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-foot .scroll .bar {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--burgundy);
  animation: pulseBar 2.4s ease-in-out infinite;
}

/* Right / left column reserved for the floating cup */
.hero-stage,
.visit-stage {
  position: relative;
  height: 520px;
}

.stage-label {
  position: absolute;
  bottom: 0;
  right: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.8;
}

.stage-label b {
  color: var(--burgundy);
  font-weight: 400;
}

/* ---------- STORY SECTION ---------- */
.story {
  position: relative;
  padding-top: clamp(120px, 14vw, 180px);
  padding-bottom: clamp(120px, 14vw, 180px);
}

.story .rule-top {
  margin-bottom: clamp(80px, 10vw, 120px);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 280px) 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.story-spacer {
  position: relative;
  min-height: 520px;
}

.pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--burgundy);
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin: 28px 0 44px;
}

.pull-quote .mark {
  color: var(--burgundy);
  opacity: 0.55;
}

.body-copy p {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.95;
  margin: 0 0 18px;
  max-width: 440px;
}

.body-copy p:last-of-type {
  margin-bottom: 0;
}

.signature {
  margin-top: 36px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: 0.01em;
}

.signature .dash {
  color: var(--burgundy);
  margin-right: 8px;
}

/* Instagram */
.ig-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}

.ig-handle {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--burgundy);
  font-size: 22px;
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ig-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--rule);
  cursor: pointer;
  background: var(--tile-a);
  
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ig-cell.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Add a slight stagger effect based on even/odd children */
.ig-cell:nth-child(even) {
  transition-delay: 0.1s;
}

.ig-cell:nth-child(odd) {
  background: var(--tile-b);
}

.ig-cell .placeholder {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(107, 15, 26, 0.04) 0 12px,
      transparent 12px 24px);
}

.ig-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ig-cap {
  display: none;
}

.ig-cell .overlay {
  position: absolute;
  inset: 0;
  background: var(--burgundy);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .3s ease;
}

.ig-cell .overlay svg {
  width: 28px;
  height: 28px;
  color: var(--bg);
}

.ig-cell:hover .overlay {
  opacity: 0.92;
}

.ig-cell:hover .ig-cap {
  opacity: 0;
}

.ig-follow {
  margin-top: 28px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--burgundy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  transition: border-color .25s ease, color .25s ease;
}

.ig-follow:hover {
  color: var(--burgundy-hi);
  border-bottom-color: var(--burgundy);
}

/* ---------- VISIT SECTION ---------- */
.visit {
  position: relative;
  padding-top: clamp(120px, 14vw, 180px);
  padding-bottom: clamp(120px, 14vw, 180px);
}

.visit .rule-top {
  margin-bottom: clamp(80px, 10vw, 120px);
}

.visit-row {
  width: 100%;
}

.visit-lead {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.22;
  margin: 24px 0 56px;
  max-width: 520px;
}

.visit-lead .it {
  font-style: italic;
  color: var(--burgundy);
}

.info-rows {
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 2;
}

.info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.info-row .label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-row .value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.3;
}

.info-row .value a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color .2s ease, border-color .2s ease;
}

.info-row .value a:hover {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

/* Map iframe wrapper */
.map-card {
  margin-top: 48px;
  position: relative;
  height: 240px;
  border: 1px solid var(--rule);
  overflow: hidden;
  clip-path: inset(0);
  display: block;
  transition: border-color .25s ease;
  background: var(--tile-a);
}

body.dark-theme .map-card {
  background: var(--tile-a);
}

.map-card:hover {
  border-color: var(--burgundy);
}

.map-card iframe {
  width: calc(100% + 120px);
  height: calc(100% + 190px);
  margin-top: -140px;
  margin-left: -60px;
  border: none;
  display: block;
  filter: grayscale(40%) sepia(20%);
  transition: filter 0.3s ease;
}

body.dark-theme .map-card iframe {
  filter: grayscale(40%) sepia(30%) invert(90%) hue-rotate(180deg);
}

.social-row {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0 56px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.foot-left,
.foot-right {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot-right {
  text-align: right;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
}

.foot-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.45em;
  color: var(--burgundy);
  text-transform: uppercase;
  text-align: center;
}

/* ---------- THE CUP (fixed, travels horizontally on scroll) ---------- */
#cup-anchor {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translate3d(58vw, -50%, 0);
  width: 500px;
  height: 500px;
  z-index: 10;
  pointer-events: auto;
  cursor: grab;
  will-change: transform;
}

#cup-anchor:active {
  cursor: grabbing;
}

#cup-canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0px 20px 40px rgba(107, 15, 26, 0.25)) drop-shadow(0px 10px 15px rgba(107, 15, 26, 0.15));
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseBar {

  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
    transform-origin: left;
  }

  50% {
    transform: scaleX(1.6);
    opacity: 0.6;
    transform-origin: left;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.mobile-rule {
  display: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {

  .nav-inner {
    padding-top: 14px;
    padding-bottom: 14px;
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav-aside > span {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
    padding-bottom: 40px;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-foot {
    position: relative;
    bottom: auto;
    margin-top: 40px;
    width: 100%;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    flex-wrap: wrap;
  }

  .row,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-spacer {
    display: none;
  }

  .mobile-rule {
    display: block;
    margin: 60px 0;
    width: 100%;
  }

  .hero-stage,
  .visit-stage {
    display: none;
  }

  #cup-anchor {
    display: block;
    position: fixed;
    top: auto;
    bottom: 20px;
    left: auto;
    right: 20px;
    transform: none;
    width: 160px;
    height: 160px;
    z-index: 50;
    touch-action: none; /* Prevents page scroll when interacting with cup */
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .foot-right {
    text-align: center;
  }
}

/* ---------- LOADER ---------- */
html.first-visit .nav .wordmark {
  opacity: 0;
}
html.first-visit body {
  overflow: hidden;
}

#loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#loader-logo {
  font-size: clamp(40px, 8vw, 80px);
  margin-bottom: 24px;
  transform-origin: center center;
}

.loader-sub {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.loader-progress-track {
  width: 200px;
  height: 2px;
  background: var(--rule-strong);
  position: relative;
  overflow: hidden;
}

#loader-progress-bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--burgundy);
}