/* ============ Tiago Coffee — warm & creamy ============ */
:root {
  --cream: #f3ead9;
  --cream-2: #ecdfc8;
  --latte: #d9c3a5;
  --caramel: #b0854f;
  --coffee: #6f4e37;
  --espresso: #3a2a1e;
  --ink: #2b1d12;
  --copper: #c07d3f;
  --serif: "Fraunces", serif;
  --sans: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
li { list-style: none; }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--espresso);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s ease, visibility .8s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; color: var(--cream); }
.loader-word {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3rem, 8vw, 6rem); letter-spacing: .35em; margin-right: -.35em;
  display: block;
}
.loader-bar {
  width: 180px; height: 2px; margin: 24px auto 12px;
  background: rgba(243, 234, 217, .2); border-radius: 2px; overflow: hidden;
}
.loader-fill { width: 0%; height: 100%; background: var(--copper); }
.loader-sub { font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; opacity: .6; }

/* ---------- Cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 99; pointer-events: none;
  border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--coffee); }
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid rgba(111, 78, 55, .55);
  transition: width .25s, height .25s, background .25s;
}
.cursor-ring.hover { width: 56px; height: 56px; background: rgba(192, 125, 63, .12); }
@media (hover: none) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Scroll-driven video background ---------- */
.bg-video {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
}
.bg-video video {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%) scale(1.04);
  object-fit: cover;
  will-change: transform;
}
.bg-tint {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(243, 234, 217, .55) 0%, rgba(243, 234, 217, .12) 45%, rgba(243, 234, 217, 0) 70%),
    radial-gradient(120% 120% at 50% 50%, rgba(243, 234, 217, 0) 55%, rgba(243, 234, 217, .5) 100%);
}
.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--coffee), var(--copper));
  transform: scaleX(0); transform-origin: left;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  transition: background .45s ease, box-shadow .45s ease, padding .45s ease, backdrop-filter .45s ease;
}
.nav.scrolled {
  padding-top: 13px; padding-bottom: 13px;
  background: rgba(243, 234, 217, .72);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(58, 42, 30, .1), 0 10px 30px rgba(58, 42, 30, .07);
}
.nav-logo {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .12em;
  display: flex; flex-direction: column; line-height: 1;
}
.nav-logo span {
  font-family: var(--sans); font-size: .55rem; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; opacity: .6; margin-top: 4px;
}
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: .8rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--coffee); transition: width .35s ease;
}
.nav-links a:hover::after { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 30px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: transform .3s ease, background .3s, color .3s, box-shadow .3s;
  will-change: transform;
}
.btn-solid {
  background: var(--espresso); color: var(--cream);
  box-shadow: 0 10px 30px rgba(58, 42, 30, .25);
}
.btn-solid:hover { background: var(--coffee); box-shadow: 0 14px 38px rgba(58, 42, 30, .35); }
.btn-ghost { border: 1px solid rgba(58, 42, 30, .35); }
.btn-ghost:hover { background: rgba(58, 42, 30, .07); }

/* ---------- Sections shared ---------- */
main { position: relative; z-index: 3; }
.section { position: relative; padding: 0 clamp(20px, 5vw, 72px); }
.section-tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  color: var(--copper); margin-bottom: 18px;
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: 1.05;
  letter-spacing: -.01em;
}
.char { display: inline-block; will-change: transform; }
main { will-change: transform; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
}
.hero-content { max-width: 620px; padding-top: 60px; }
.hero-eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  color: var(--copper); margin-bottom: 26px;
}
.hero-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3rem, 8vw, 6.6rem); line-height: 1.02; letter-spacing: -.02em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word { display: inline-block; }
.hero-title .em { font-weight: 500; font-style: italic; color: var(--coffee); }
.hero-sub {
  margin-top: 30px; max-width: 440px;
  font-size: 1.02rem; font-weight: 300; line-height: 1.75; color: rgba(43, 29, 18, .75);
}
.hero-cta { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-rating {
  margin-top: 44px; display: flex; align-items: center; gap: 14px;
  font-size: .82rem; color: rgba(43, 29, 18, .65);
}
.stars { color: var(--copper); letter-spacing: 3px; font-size: 1rem; }
.stars .half { opacity: .4; }

.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  text-align: center; opacity: .55;
}
.scroll-hint span {
  display: block; width: 1px; height: 52px; margin: 0 auto 10px;
  background: var(--ink); transform-origin: top;
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.scroll-hint p { font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; }

/* ---------- Marquee ---------- */
.marquee {
  position: relative; z-index: 3; overflow: hidden; white-space: nowrap;
  padding: 26px 0; border-top: 1px solid rgba(58, 42, 30, .14);
  border-bottom: 1px solid rgba(58, 42, 30, .14);
  background: rgba(243, 234, 217, .55); backdrop-filter: blur(6px);
}
.marquee-track { display: inline-block; animation: marquee 32s linear infinite; }
.marquee-track span {
  font-family: var(--serif); font-size: 1.35rem; font-style: italic;
  color: rgba(58, 42, 30, .55); letter-spacing: .04em;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Story ---------- */
.story { min-height: 110vh; display: flex; align-items: center; }
.story-content { max-width: 520px; margin-left: auto; padding: 120px 0; }
.story-quote {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-style: italic;
  line-height: 1.5; color: var(--coffee); margin: 30px 0;
  padding-left: 22px; border-left: 2px solid var(--copper);
}
.story-quote cite { display: block; margin-top: 12px; font-family: var(--sans); font-size: .78rem; font-style: normal; opacity: .6; }
.story-text { font-weight: 300; line-height: 1.85; color: rgba(43, 29, 18, .78); }
.story-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.story-badges li {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid rgba(58, 42, 30, .25); background: rgba(243, 234, 217, .6);
}

/* ---------- Photos ---------- */
.photos { padding-top: 60px; padding-bottom: 110px; text-align: center; }
.photo-strip {
  display: flex; justify-content: center; gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap; margin-top: 34px;
}
.photo-card { width: min(220px, 42vw); opacity: 0; }
.photo-card:nth-child(1) { transform: rotate(-2.5deg); }
.photo-card:nth-child(2) { transform: rotate(1.5deg) translateY(14px); }
.photo-card:nth-child(3) { transform: rotate(3deg); }
.photo-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden;
  background: var(--cream-2);
  box-shadow: 0 18px 44px rgba(58, 42, 30, .22);
  border: 8px solid #fbf6ec;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card:nth-child(1) .photo-frame img { object-position: 48% 62%; } /* the pour: cup + pitcher */
.photo-card:nth-child(2) .photo-frame img { object-position: 72% 55%; } /* the patio: front table */
.photo-card:nth-child(3) .photo-frame img { object-position: 46% 55%; } /* the plate: sandwich */
.photo-frame .ph-label { display: none; }
.photo-frame.empty {
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(176, 133, 79, .08) 10px 20px),
    var(--cream-2);
  outline: 1.5px dashed rgba(111, 78, 55, .4); outline-offset: -10px;
}
.photo-frame.empty .ph-label {
  display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(111, 78, 55, .75); line-height: 1.9;
}
.photo-frame.empty .ph-label em { font-style: normal; opacity: .6; letter-spacing: .1em; text-transform: none; }
.photo-card figcaption {
  margin-top: 14px; font-family: var(--serif); font-style: italic;
  font-size: .95rem; color: rgba(58, 42, 30, .65);
}

/* ---------- Menu ---------- */
.menu { padding-top: 110px; padding-bottom: 130px; }
.menu::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(236, 223, 200, 0) 0%, rgba(236, 223, 200, .82) 12%, rgba(236, 223, 200, .82) 88%, rgba(236, 223, 200, 0) 100%);
}
.menu-head { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.menu-note { margin-top: 18px; font-size: .85rem; color: rgba(43, 29, 18, .6); }
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px; max-width: 1160px; margin: 0 auto;
}
.menu-card {
  position: relative; padding: 34px 28px 30px; border-radius: 18px;
  background: rgba(251, 246, 236, .88);
  border: 1px solid rgba(58, 42, 30, .1);
  box-shadow: 0 8px 26px rgba(58, 42, 30, .08);
  transition: box-shadow .35s ease;
  transform-style: preserve-3d; will-change: transform;
}
.menu-card:hover { box-shadow: 0 22px 48px rgba(58, 42, 30, .18); }
.menu-pop {
  position: absolute; top: 18px; right: 18px;
  font-size: .6rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--copper); border: 1px solid rgba(192, 125, 63, .45);
  padding: 5px 11px; border-radius: 999px;
}
.menu-card h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.35rem; letter-spacing: -.01em;
  margin-bottom: 12px; max-width: 80%;
}
.menu-card p { font-size: .86rem; font-weight: 300; line-height: 1.7; color: rgba(43, 29, 18, .7); }
.menu-price {
  display: inline-block; margin-top: 18px;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--coffee);
}

/* ---------- Visit ---------- */
.visit { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.visit-content { max-width: 720px; margin: 0 auto; text-align: center; padding: 140px 0 90px; }
.visit-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 34px; margin: 52px 0 46px;
}
.visit-grid h4 {
  font-size: .7rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
  color: var(--copper); margin-bottom: 12px;
}
.visit-grid p { font-weight: 300; line-height: 1.8; color: rgba(43, 29, 18, .8); }
.visit-grid a:hover { color: var(--coffee); text-decoration: underline; }

.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 26px 0; border-top: 1px solid rgba(58, 42, 30, .14);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .55;
}

/* ---------- Reveal (JS-driven) ---------- */
.reveal { opacity: 0; transform: translateY(36px); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .story-content { margin-left: 0; }
  .hero-content { padding-top: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .scroll-hint span, .grain { animation: none; }
}
