/* ================================================
   Altura Coffee - ARCHETYPE 8: Corporate / Institutional
   Philosophy: Trust, stability, authority.
   Conservative grid, professional blue, clean hierarchy.
   Fonts: DM Sans (display) + Inter (body)
   OKLCH color system for perceptual uniformity
   ================================================ */

/* --- CSS Variables (OKLCH) --- */
:root {
  /* Surfaces */
  --surface-primary: oklch(1 0 0);               /* #ffffff */
  --surface-secondary: oklch(0.97 0.005 250);    /* ~#f5f7fa */
  --surface-dark: oklch(0.25 0.05 255);          /* ~#1b2a4a navy */
  --surface-elevated: oklch(1 0 0);

  /* Text */
  --text-primary: oklch(0.25 0.05 255);          /* navy */
  --text-secondary: oklch(0.50 0.03 250);        /* ~#5a6a7e */

  /* Accent - Professional Blue */
  --accent: oklch(0.55 0.22 264);                /* ~#2563eb */
  --accent-hover: oklch(0.48 0.22 264);          /* ~#1d4ed8 */
  --accent-light: oklch(0.95 0.03 264);          /* ~#eff4ff */
  --accent-muted: oklch(0.55 0.22 264 / 0.08);

  /* Utility */
  --success: oklch(0.55 0.16 160);               /* ~#059669 */
  --border: oklch(0.91 0.01 250);                /* ~#e2e8f0 */
  --border-hover: oklch(0.55 0.22 264 / 0.3);

  /* Typography */
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-size-base: 1rem;
  --font-size-display: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  --font-size-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --line-height-body: 1.65;
  --line-height-display: 1.2;
  --letter-spacing-display: -0.01em;

  /* Spacing */
  --space-unit: 1rem;
  --section-padding: 5rem 0;
  --container-max: 1200px;

  /* Shapes */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.08);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.1);

  /* Touch */
  --touch-target: 2.75rem;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: var(--line-height-body);
  font-size: var(--font-size-base);
  background: var(--surface-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: var(--letter-spacing-display);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }
address { font-style: normal; }

/* --- Utility --- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -3rem; left: 0; background: var(--accent);
  color: #fff; padding: 0.75rem 1.25rem; z-index: 10000;
  font-weight: 500; font-size: 0.875rem; transition: top 0.3s;
}
.skip-link:focus { top: 0; color: #fff; }

/* --- Focus --- */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--touch-target); padding: 0.75rem 1.75rem;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  border: none; cursor: pointer; border-radius: var(--radius);
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none; line-height: 1;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px oklch(0.55 0.22 264 / 0.3);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px oklch(0.55 0.22 264 / 0.25);
}
.btn-secondary {
  background: var(--surface-primary); color: var(--accent);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent); background: var(--accent-light);
}

/* ================================================
   HEADER / NAVIGATION
   Clean white header. Shadow deepens on scroll.
   ================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--surface-primary);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.header.scrolled {
  box-shadow: var(--shadow-md);
}
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 0; min-height: 3.5rem;
}
.logo {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  color: var(--text-primary); display: inline-flex; align-items: center;
  min-height: var(--touch-target); gap: 0.3rem;
}
.logo span { color: var(--accent); }

/* Desktop nav links */
.nav-links { display: none; gap: 0.25rem; align-items: center; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  padding: 0.5rem 0.75rem; border-radius: var(--radius);
  min-height: var(--touch-target); display: inline-flex; align-items: center;
  position: relative; transition: color 0.2s ease;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0.25rem; left: 0.75rem; right: 0.75rem;
  height: 2px; background: var(--accent); transform: scaleX(0);
  transition: transform 0.25s ease; border-radius: 1px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  display: none;
}

.nav-phone {
  color: var(--accent); font-weight: 600; font-size: 0.85rem;
  min-height: var(--touch-target); display: inline-flex; align-items: center;
  gap: 0.4rem; padding: 0.5rem;
}
.nav-phone i { font-size: 0.8rem; }

/* Mobile hamburger */
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; padding: 0.5rem;
  background: none; border: none; cursor: pointer;
  min-width: var(--touch-target); min-height: var(--touch-target);
  align-items: center; justify-content: center;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px; display: block;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed; top: 3.5rem; right: 0; width: 280px; height: calc(100vh - 3.5rem);
  background: var(--surface-primary); box-shadow: -4px 0 20px oklch(0 0 0 / 0.1);
  transform: translateX(100%); transition: transform 0.3s ease;
  z-index: 999; padding: 1.5rem; overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  display: flex; align-items: center; padding: 1rem 0.5rem;
  color: var(--text-primary); font-size: 1rem; font-weight: 500;
  border-bottom: 1px solid var(--border); min-height: var(--touch-target);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--accent); }

.nav-overlay {
  display: none; position: fixed; inset: 0; background: oklch(0 0 0 / 0.3);
  z-index: 998;
}
.nav-overlay.visible { display: block; }

/* ================================================
   HERO - Professional split layout
   Light bg, left text, right image. NOT fullscreen dark overlay.
   ================================================ */
.hero {
  padding: 7rem 0 4rem;
  background: var(--surface-secondary);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-muted) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center;
  position: relative; z-index: 1;
}
.hero-text { max-width: 540px; }
.hero-tagline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.hero-tagline i { font-size: 0.7rem; }
.hero h1 {
  font-size: var(--font-size-display); line-height: var(--line-height-display);
  color: var(--text-primary); margin-bottom: 1.25rem; font-weight: 700;
}
.hero h1 em {
  font-style: normal; color: var(--accent);
  background: var(--accent-light); padding: 0 0.2em;
  border-radius: 4px;
}
.hero-desc {
  font-size: 1.05rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 2rem; max-width: 480px;
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-image {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-image img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3;
}

/* ================================================
   TRUST BAR - Logo/badges strip
   ================================================ */
.trust-bar {
  padding: 2.5rem 0; border-bottom: 1px solid var(--border);
  background: var(--surface-primary);
}
.trust-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 2rem;
}
.trust-item {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 500;
}
.trust-item i {
  color: var(--accent); font-size: 1rem;
}

/* ================================================
   SECTIONS - Alternating white / light gray
   ================================================ */
.section { padding: 4rem 0; }
.section--alt { background: var(--surface-secondary); }

/* Section headers: LEFT-ALIGNED with accent bar (breaks AP-2) */
.section-head { margin-bottom: 2.5rem; }
.section-head h2 {
  font-size: var(--font-size-lg);
  color: var(--text-primary); font-weight: 700;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  line-height: 1.3;
}
.section-head p {
  color: var(--text-secondary); font-size: 0.95rem;
  margin-top: 0.5rem; padding-left: 1rem;
}

/* ================================================
   FEATURES / SERVICES - Horizontal icon cards
   (breaks AP-7: NOT icon+title+desc+price with translateY)
   ================================================ */
.features-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
}
.feature-card {
  background: var(--surface-primary); padding: 1.5rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex; gap: 1rem; align-items: flex-start;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--accent);
}
.feature-icon {
  width: 2.75rem; height: 2.75rem; min-width: 2.75rem;
  background: var(--accent-light); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon i { font-size: 1.1rem; color: var(--accent); }
.feature-body h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem;
  color: var(--text-primary);
}
.feature-body p {
  color: var(--text-secondary); font-size: 0.875rem; line-height: 1.5;
}

/* ================================================
   ABOUT - Split layout
   ================================================ */
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center;
}
.about-image { position: relative; }
.about-image img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.about-badge {
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--accent); color: #fff;
  padding: 1rem 1.5rem; border-radius: var(--radius);
  margin-top: 1rem;
}
.about-badge p { font-size: 0.75rem; opacity: 0.85; }
.about-badge strong { font-size: 1.5rem; font-weight: 700; }
.about-text h2 {
  font-size: var(--font-size-lg);
  color: var(--text-primary); margin-bottom: 1.25rem; font-weight: 700;
}
.about-text p {
  color: var(--text-secondary); margin-bottom: 1rem;
  font-size: var(--font-size-base); line-height: var(--line-height-body);
}
.about-text .btn { margin-top: 0.5rem; }

/* ================================================
   MENU - Clean card grid with header bands
   (breaks AP-7: no icon+title+desc+price with translateY)
   ================================================ */
.menu-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
.menu-card {
  background: var(--surface-primary); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.menu-card-header {
  padding: 1rem 1.5rem;
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.5rem;
}
.menu-card-header h3 {
  font-size: 1rem; font-weight: 600; color: var(--accent);
}
.menu-card-header i { color: var(--accent); font-size: 0.9rem; }
.menu-card-body { padding: 0.5rem 1.5rem; }
.menu-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.875rem 0; border-bottom: 1px solid var(--border);
  min-height: var(--touch-target);
}
.menu-item:last-child { border-bottom: none; }
.menu-item-info h4 {
  font-family: var(--font-display); font-size: 0.9rem;
  font-weight: 600; margin-bottom: 0.125rem; color: var(--text-primary);
}
.menu-item-info p {
  color: var(--text-secondary); font-size: 0.8rem;
}
.menu-price {
  font-family: var(--font-display); font-size: 1rem;
  color: var(--accent); font-weight: 700; white-space: nowrap;
  padding-left: 1rem;
}

/* ================================================
   GALLERY - 3-col grid, shadow hover, NOT 4-col scale(1.1)
   (breaks AP-6)
   ================================================ */
.gallery-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
.gallery-item {
  overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 1; border: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.gallery-item:hover {
  box-shadow: var(--shadow-md);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ================================================
   CTA BANNER
   ================================================ */
.cta-banner {
  background: var(--surface-dark); color: #fff; padding: 3.5rem 0;
}
.cta-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 1.25rem;
}
.cta-inner h2 {
  font-size: clamp(1.25rem, 1rem + 1.5vw, 2rem); font-weight: 700;
  line-height: 1.3;
}
.cta-inner p {
  color: oklch(1 0 0 / 0.75); font-size: 0.95rem; max-width: 500px;
}
.cta-inner .btn {
  background: var(--accent); color: #fff;
}
.cta-inner .btn:hover {
  background: var(--accent-hover);
}

/* ================================================
   CONTACT
   ================================================ */
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
.contact-info h3 {
  font-size: 1.25rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 1.75rem;
}
.contact-item {
  display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start;
}
.contact-icon {
  width: 2.5rem; height: 2.5rem; min-width: 2.5rem;
  background: var(--accent-light); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon i { font-size: 0.9rem; color: var(--accent); }
.contact-detail h4 {
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 0.2rem; font-family: var(--font-display);
}
.contact-detail p {
  color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6;
}
.contact-detail a {
  min-height: var(--touch-target); display: inline-flex; align-items: center;
}

/* WhatsApp - Corporate styled button in contact (AP-9: NOT default float) */
.whatsapp-contact {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #fff;
  padding: 0.875rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; margin-top: 1.5rem;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}
.whatsapp-contact i { font-size: 1.1rem; }
.whatsapp-contact:hover {
  background: var(--accent-hover); color: #fff;
  box-shadow: 0 4px 12px oklch(0.55 0.22 264 / 0.25);
}

/* Floating WhatsApp - rounded rectangle with text (AP-9) */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 900;
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: background 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}
.whatsapp-float i { font-size: 1.1rem; }
.whatsapp-float:hover {
  background: var(--accent-hover); color: #fff;
  box-shadow: 0 8px 24px oklch(0.55 0.22 264 / 0.3);
}

.map-container {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.map-container iframe {
  width: 100%; height: 18rem; border: none; display: block;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: var(--surface-dark); color: #fff; padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-about .logo { color: #fff; margin-bottom: 0.75rem; display: inline-flex; }
.footer-about .logo span { color: oklch(0.75 0.12 264); }
.footer-about p { color: oklch(1 0 0 / 0.8); font-size: 0.875rem; line-height: 1.6; }
.footer h4 {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1rem; color: oklch(1 0 0 / 0.9);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a, .footer-links li {
  color: oklch(1 0 0 / 0.8); font-size: 0.85rem;
  min-height: var(--touch-target); display: inline-flex; align-items: center;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid oklch(1 0 0 / 0.1);
  padding-top: 1.5rem; text-align: center;
  color: oklch(1 0 0 / 0.4); font-size: 0.8rem;
}

/* ================================================
   SCROLL REVEAL (CSS Scroll-Driven Animations)
   ================================================ */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */

/* Tablet 768px+ */
@media (min-width: 48rem) {
  .section { padding: 5rem 0; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .map-container iframe { height: 22rem; }
  .hero { padding: 8rem 0 5rem; }
}

/* Desktop 992px+ */
@media (min-width: 62rem) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-cta { display: inline-flex; }
  .hero-inner { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .hero-text { max-width: 100%; }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .about-badge {
    position: absolute; bottom: -1rem; right: -1rem; margin-top: 0;
  }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .cta-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* Large Desktop 1200px+ */
@media (min-width: 75rem) {
  .section { padding: 6rem 0; }
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .section-head { margin-bottom: 3rem; }
}

/* ================================================
   REDUCED MOTION (mandatory)
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
