/* ============================================
   THE GROUNDS COFFEE CO. — STYLESHEET
   Palette: Terracotta Studio
   Fonts: Cormorant Garamond + Cabinet Grotesk
   ============================================ */

/* --- TOKENS --- */
:root {
  --terracotta:   #B5563E;
  --clay:         #D4896A;
  --cream:        #F2E6D9;
  --espresso:     #3D2B1F;
  --parchment:    #FAF5EF;
  --warm-white:   #FFFCF8;
  --muted:        #8A7060;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Cabinet Grotesk', 'Helvetica Neue', sans-serif;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.45, 0, 0.55, 1);

  --nav-h: 72px;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--warm-white);
  color: var(--espresso);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- TYPOGRAPHY --- */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--espresso);
  margin-bottom: 1.5rem;
}
.section-title em {
  font-style: italic;
  color: var(--terracotta);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }

.btn--primary {
  background: var(--terracotta);
  color: var(--cream);
}
.btn--primary:hover {
  background: #9e4a34;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(181,86,62,0.35);
}
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(242,230,217,0.5);
}
.btn--ghost:hover {
  border-color: var(--cream);
  background: rgba(242,230,217,0.08);
}
.btn--outline {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
}
.btn--outline:hover {
  background: var(--terracotta);
  color: var(--cream);
  transform: translateY(-2px);
}

/* --- SECTION SPACING --- */
.section { padding: 7rem 6vw; }

/* --- REVEAL ANIMATION --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  transition: background 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(250,245,239,0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(61,43,31,0.08);
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cream);
  transition: color 0.4s;
}
.nav.scrolled .nav__logo { color: var(--espresso); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242,230,217,0.85);
  transition: color 0.3s;
}
.nav.scrolled .nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--terracotta) !important; }

.nav__cta {
  background: var(--terracotta) !important;
  color: var(--cream) !important;
  padding: 0.55rem 1.4rem;
  border-radius: 2px;
  font-weight: 700 !important;
}
.nav__cta:hover { background: #9e4a34 !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--cream);
  transition: all 0.3s;
}
.nav.scrolled .nav__toggle span { background: var(--espresso); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  background: var(--espresso);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: calc(var(--nav-h) + 4rem) 6vw 5rem;
  gap: 4rem;
  position: relative;
  overflow: hidden;
}
.hero__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 1.0;
  color: var(--cream);
  margin-bottom: 1.8rem;
}
.hero__title em {
  font-style: italic;
  color: var(--clay);
}
.hero__sub {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(242,230,217,0.65);
  margin-bottom: 2.5rem;
  max-width: 38ch;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__image-wrap {
  position: relative;
  z-index: 2;
  height: 580px;
  border-radius: 4px;
  overflow: visible;
}
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  filter: brightness(0.88) saturate(1.1);
}
.hero__badge {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  width: 110px;
  height: 110px;
  background: var(--terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: spin-slow 20s linear infinite;
}
.hero__badge-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.3;
  font-style: italic;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 6vw;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2;
}
.hero__scroll-hint span {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242,230,217,0.4);
}
.hero__scroll-line {
  width: 60px;
  height: 1px;
  background: rgba(242,230,217,0.25);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--clay);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee {
  background: var(--terracotta);
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  gap: 0;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 0 2rem;
  opacity: 0.9;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  background: var(--parchment);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.about__text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1.2rem;
  max-width: 48ch;
}
.about__text .btn { margin-top: 1rem; }

.about__visual {
  position: relative;
  height: 520px;
}
.about__img {
  border-radius: 3px;
  position: absolute;
}
.about__img--main {
  width: 78%;
  height: 90%;
  top: 0; right: 0;
  object-fit: cover;
  filter: saturate(0.9);
}
.about__img--accent {
  width: 42%;
  height: 46%;
  bottom: 0; left: 0;
  object-fit: cover;
  border: 4px solid var(--parchment);
  box-shadow: 0 12px 40px rgba(61,43,31,0.15);
}
.about__stat {
  position: absolute;
  top: 2rem;
  left: 0;
  background: var(--terracotta);
  color: var(--cream);
  padding: 1.2rem 1.5rem;
  border-radius: 3px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(181,86,62,0.3);
}
.about__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
}
.about__stat span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  padding: 0 6vw;
  background: var(--parchment);
}
.divider svg {
  width: 100%;
  height: 60px;
}

/* ============================================
   MENU
   ============================================ */
.menu {
  background: var(--warm-white);
}
.menu__header {
  text-align: center;
  margin-bottom: 3rem;
}
.menu__tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid rgba(61,43,31,0.1);
}
.menu__tab {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.8rem 2rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.3s;
}
.menu__tab:hover { color: var(--terracotta); }
.menu__tab.active {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}
.menu__panel { display: none; }
.menu__panel.active { display: block; }

.menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5px;
  background: rgba(61,43,31,0.06);
  border: 1.5px solid rgba(61,43,31,0.06);
}
.menu__item {
  background: var(--warm-white);
  padding: 2rem;
  transition: background 0.3s;
}
.menu__item:hover { background: var(--parchment); }
.menu__item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
.menu__item h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--espresso);
}
.menu__price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--terracotta);
  letter-spacing: 0.04em;
}
.menu__item p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery {
  background: var(--espresso);
  text-align: center;
}
.gallery .section-label { color: var(--clay); }
.gallery .section-title { color: var(--cream); margin-bottom: 3rem; }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 260px 260px;
  gap: 8px;
}
.gallery__item {
  overflow: hidden;
  border-radius: 3px;
}
.gallery__item img {
  transition: transform 0.7s var(--ease-out), filter 0.5s;
  filter: brightness(0.85) saturate(0.9);
}
.gallery__item:hover img {
  transform: scale(1.06);
  filter: brightness(0.95) saturate(1.1);
}
.gallery__item--tall {
  grid-row: span 2;
}
.gallery__item--wide {
  grid-column: span 2;
}

/* ============================================
   VISIT
   ============================================ */
.visit {
  background: var(--parchment);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.visit__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0;
}
.visit__block h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}
.visit__block p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}
.visit__map {
  position: relative;
  height: 420px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(61,43,31,0.15);
}
.visit__map img {
  filter: sepia(0.3) saturate(0.8);
}
.visit__map-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  animation: pin-bounce 2s ease-in-out infinite;
}
@keyframes pin-bounce {
  0%, 100% { transform: translate(-50%, -50%); }
  50%       { transform: translate(-50%, calc(-50% - 8px)); }
}

/* ============================================
   CTA / CONTACT
   ============================================ */
.cta {
  background: var(--espresso);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
}
.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}
.cta .section-label { color: var(--clay); }
.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1.2rem;
}
.cta__title em {
  font-style: italic;
  color: var(--clay);
}
.cta p {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(242,230,217,0.6);
  margin-bottom: 2.5rem;
}
.cta__form {
  display: flex;
  gap: 0;
  max-width: 440px;
  margin: 0 auto 2.5rem;
  border: 1.5px solid rgba(242,230,217,0.2);
  border-radius: 2px;
  overflow: hidden;
}
.cta__form input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  background: rgba(242,230,217,0.06);
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--cream);
}
.cta__form input::placeholder { color: rgba(242,230,217,0.35); }
.cta__form .btn {
  border-radius: 0;
  padding: 0.9rem 1.5rem;
}
.cta__social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.cta__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(242,230,217,0.45);
  border: 1px solid rgba(242,230,217,0.15);
  border-radius: 50%;
  transition: all 0.3s;
}
.cta__social a svg { width: 16px; height: 16px; }
.cta__social a:hover {
  color: var(--clay);
  border-color: var(--clay);
  transform: translateY(-3px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #2A1A10;
  padding: 3rem 6vw 1.5rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(242,230,217,0.08);
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__logo {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.6rem;
}
.footer__brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(242,230,217,0.4);
}
.footer__nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer__nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242,230,217,0.4);
  transition: color 0.3s;
}
.footer__nav a:hover { color: var(--clay); }
.footer__bottom {
  padding-top: 1.5rem;
  text-align: center;
}
.footer__bottom p {
  font-size: 0.75rem;
  color: rgba(242,230,217,0.25);
  letter-spacing: 0.05em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-h) + 3rem);
  }
  .hero__content { order: 1; }
  .hero__image-wrap {
    order: 0;
    height: 380px;
    max-width: 500px;
    margin: 0 auto;
  }
  .hero__sub { margin: 0 auto 2.5rem; }
  .hero__actions { justify-content: center; }
  .hero__scroll-hint { display: none; }

  .about, .visit {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about__visual { height: 380px; }
  .visit__details { grid-template-columns: 1fr 1fr; }
  .visit__map { height: 300px; }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery__item--tall { grid-row: span 1; }
  .gallery__item--wide { grid-column: span 2; }
}

@media (max-width: 768px) {
  .section { padding: 5rem 5vw; }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--parchment);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-110%);
    transition: transform 0.4s var(--ease-out);
    box-shadow: 0 8px 32px rgba(61,43,31,0.12);
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { color: var(--espresso) !important; font-size: 1rem; }
  .nav__toggle { display: flex; }

  .hero__title { font-size: clamp(2.8rem, 10vw, 4rem); }
  .hero__image-wrap { height: 280px; }

  .about__visual { height: 300px; }
  .about__img--accent { display: none; }

  .gallery__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gallery__item--wide { grid-column: span 1; }
  .gallery__item { height: 220px; }

  .visit__details { grid-template-columns: 1fr; gap: 1.5rem; }

  .cta__form { flex-direction: column; border: none; gap: 0.8rem; }
  .cta__form input {
    border: 1.5px solid rgba(242,230,217,0.2);
    border-radius: 2px;
  }
  .cta__form .btn { border-radius: 2px; }

  .menu__tabs { gap: 0; overflow-x: auto; justify-content: flex-start; }
  .menu__tab { padding: 0.8rem 1.2rem; white-space: nowrap; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .footer__inner { flex-direction: column; }
  .footer__nav { gap: 1rem; }
}