/* ============================================
   Michoacana Ice Cream Shop — Styles
   Palette: Emerald green (#064e3b) + Cream (#faf8f5)
   Typography: Cormorant Garamond + Inter
   ============================================ */

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

:root {
  --emerald-950: #042f23;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --cream-50:  #faf8f5;
  --cream-100: #f5f0e8;
  --cream-200: #ebe4d6;
  --cream-300: #d4c9b4;
  --text-dark:  #1a1a1a;
  --text-mid:   #3a3a3a;
  --text-light: #6b6b6b;
  --white:      #ffffff;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', -apple-system, sans-serif;
  --max-width:  1200px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text-dark);
  background: var(--cream-50);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- Eyebrow / Section Titles ---- */
.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald-700);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--emerald-900);
  margin-bottom: 1.5rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  line-height: 1.8;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.25rem;
  border: 1px solid transparent;
  border-radius: 0;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--emerald-900);
  color: var(--cream-50);
  border-color: var(--emerald-900);
}

.btn-primary:hover {
  background: var(--emerald-800);
  border-color: var(--emerald-800);
}

.btn-ghost {
  background: transparent;
  color: var(--cream-50);
  border-color: rgba(250, 248, 245, 0.4);
}

.btn-ghost:hover {
  border-color: var(--cream-50);
  background: rgba(250, 248, 245, 0.08);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(250, 248, 245, 0.97);
  box-shadow: 0 1px 0 var(--cream-200);
}

.nav.scrolled .nav-logo,
.nav.scrolled .nav-links a {
  color: var(--emerald-900);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--cream-50);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-logo-icon {
  color: var(--cream-50);
  transition: color var(--transition);
}

.nav.scrolled .nav-logo-icon {
  color: var(--emerald-900);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-50);
  transition: opacity var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  opacity: 0.8;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cream-50);
  transition: all var(--transition);
}

.nav.scrolled .nav-toggle span {
  background: var(--emerald-900);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(4, 47, 35, 0.88) 0%,
    rgba(6, 78, 59, 0.75) 50%,
    rgba(6, 78, 59, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  padding-top: 5rem;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.65);
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--cream-50);
  margin-bottom: 1.5rem;
  max-width: 680px;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(250, 248, 245, 0.78);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(250, 248, 245, 0.5);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(250,248,245,0.5), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ---- About ---- */
.about {
  padding: 8rem 0;
  background: var(--cream-50);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.about-image::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -16px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--emerald-700);
  opacity: 0.2;
  z-index: -1;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 1.25rem;
}

.about-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--cream-200);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--emerald-900);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--cream-300);
}

/* ---- Flavors ---- */
.flavors {
  padding: 8rem 0;
  background: var(--cream-100);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header .section-desc {
  margin: 0 auto;
}

.flavors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.flavor-card {
  background: var(--cream-50);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.flavor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(6, 78, 59, 0.08);
}

.flavor-card-img {
  overflow: hidden;
  height: 260px;
}

.flavor-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.flavor-card:hover .flavor-card-img img {
  transform: scale(1.04);
}

.flavor-card-body {
  padding: 2rem;
}

.flavor-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--emerald-700);
  margin-bottom: 0.75rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--emerald-200, #a7f3d0);
}

.flavor-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--emerald-900);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.flavor-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.8;
}

.flavors-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

/* ---- Visit ---- */
.visit {
  padding: 8rem 0;
  background: var(--cream-50);
}

.visit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.visit-details {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.visit-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--cream-200);
}

.visit-item dt {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
}

.visit-item dd {
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.8;
}

.visit-item dd a {
  color: var(--emerald-800);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.visit-item dd a:hover {
  border-color: var(--emerald-800);
}

.hours-note {
  display: block;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  font-style: italic;
}

.btn-directions {
  margin-top: 0.5rem;
}

.visit-map {
  position: relative;
}

.visit-map img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald-800);
  transition: gap var(--transition);
}

.map-link:hover {
  gap: 0.7rem;
}

/* ---- Contact ---- */
.contact {
  padding: 8rem 0;
  background: var(--emerald-900);
}

.contact .section-eyebrow {
  color: rgba(250, 248, 245, 0.55);
}

.contact .section-title {
  color: var(--cream-50);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-text p {
  font-size: 1rem;
  color: rgba(250, 248, 245, 0.7);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--cream-50);
  border-bottom: 1px solid rgba(250, 248, 245, 0.25);
  padding-bottom: 0.25rem;
  transition: border-color var(--transition);
}

.contact-phone:hover {
  border-color: var(--cream-50);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.55);
}

.form-group input,
.form-group textarea {
  background: rgba(250, 248, 245, 0.06);
  border: 1px solid rgba(250, 248, 245, 0.15);
  color: var(--cream-50);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 1rem 1.25rem;
  outline: none;
  transition: border-color var(--transition);
  border-radius: 0;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(250, 248, 245, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(250, 248, 245, 0.45);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  background: rgba(250, 248, 245, 0.08);
  border: 1px solid rgba(250, 248, 245, 0.15);
  color: var(--cream-50);
  font-size: 0.9rem;
}

.form-success.visible {
  display: inline-flex;
}

/* ---- Footer ---- */
.footer {
  background: var(--emerald-950);
  padding: 4rem 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(250, 248, 245, 0.08);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--cream-50);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(250, 248, 245, 0.45);
  line-height: 1.7;
  max-width: 260px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-self: center;
}

.footer-links a {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.5);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--cream-50);
}

.footer-address {
  text-align: right;
  font-size: 0.88rem;
  color: rgba(250, 248, 245, 0.45);
  line-height: 1.8;
}

.footer-address a {
  color: rgba(250, 248, 245, 0.6);
  border-bottom: 1px solid rgba(250, 248, 245, 0.15);
  transition: border-color var(--transition);
}

.footer-address a:hover {
  border-color: rgba(250, 248, 245, 0.5);
}

.footer-bottom {
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(250, 248, 245, 0.25);
  letter-spacing: 0.05em;
}

/* ---- Scroll Animations (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .about-grid,
  .visit-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image {
    order: -1;
  }

  .about-image img {
    height: 360px;
  }

  .flavors-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-address {
    text-align: center;
  }

  .footer-links {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--emerald-900);
    flex-direction: column;
    padding: 5rem 2.5rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 999;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    color: var(--cream-50) !important;
    font-size: 0.85rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-content {
    padding-top: 4rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .about-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .stat-divider {
    display: none;
  }

  .visit-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .nav-inner {
    padding: 1rem 1.25rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  .about,
  .flavors,
  .visit,
  .contact {
    padding: 5rem 0;
  }
}

/* Mobile menu backdrop */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.nav-backdrop.active {
  display: block;
}
