/* ========================================
   Panadería Somolinos — Stylesheet
   Palette: Terracotta + Sand
   Fonts: Cormorant Garamond + Karla
======================================== */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --terracotta: #A0522D;
  --terracotta-deep: #7D3F1F;
  --terracotta-light: #C4784F;
  --sand: #F5F0E8;
  --sand-dark: #E8DFD0;
  --sand-warm: #EDE4D5;
  --cream: #FAF7F2;
  --brown: #4A3728;
  --brown-light: #6B5344;
  --text: #2C1F15;
  --text-light: #6B5344;
  --text-muted: #9A8578;
  --white: #FFFFFF;
  --gold: #C9A84C;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Karla', 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--sand);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Typography ── */
.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2.5rem;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1px;
  background: var(--terracotta);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.section-lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-light);
  max-width: 560px;
}

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.35s var(--ease-out);
}
.btn--primary {
  background: var(--terracotta);
  color: var(--white);
  border: 1.5px solid var(--terracotta);
}
.btn--primary:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(160, 82, 45, 0.25);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--sand-dark);
}
.btn--ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  transform: translateY(-2px);
}
.btn--full { width: 100%; }

/* ── Side Navigation ── */
.side-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 220px;
  height: 100vh;
  background: var(--brown);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 1.75rem;
  z-index: 1000;
  overflow-y: auto;
}

.side-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  color: var(--sand);
}
.side-nav__logo-icon {
  width: 36px;
  height: 36px;
  color: var(--gold);
  flex-shrink: 0;
}
.side-nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.side-nav__logo-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.side-nav__logo-sub {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.side-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.side-nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
  position: relative;
}
.side-nav__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--terracotta);
  transform: scaleY(0);
  transition: transform 0.3s var(--ease-out);
}
.side-nav__link:hover,
.side-nav__link.active {
  color: var(--sand);
}
.side-nav__link:hover::before,
.side-nav__link.active::before {
  transform: scaleY(1);
}
.side-nav__link-num {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  color: var(--terracotta-light);
  opacity: 0.6;
  min-width: 1.5rem;
}
.side-nav__link.active .side-nav__link-num {
  opacity: 1;
  color: var(--gold);
}

.side-nav__footer {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.side-nav__phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.3s;
}
.side-nav__phone:hover { color: var(--sand); }
.side-nav__phone svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brown);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.menu-toggle__line {
  width: 20px;
  height: 1.5px;
  background: var(--sand);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Main Layout ── */
main {
  margin-left: 220px;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 4rem 4rem 4.5rem;
  position: relative;
  overflow: hidden;
  background: var(--sand);
}
.hero__bg-pattern {
  position: absolute;
  inset: 0;
  color: var(--terracotta);
  pointer-events: none;
}
.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.hero__eyebrow-line {
  width: 2.5rem;
  height: 1px;
  background: var(--terracotta);
  flex-shrink: 0;
}
.hero__title {
  font-family: var(--font-serif);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.hero__title-pre {
  display: block;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.hero__title-main {
  display: block;
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  max-width: 440px;
  margin-bottom: 2.5rem;
}
.hero__cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 1rem;
  height: 100%;
  min-height: 500px;
}
.hero__image-card {
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.hero__image-card--tall {
  grid-row: 1 / 3;
  height: 100%;
}
.hero__image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.hero__image-card:hover img {
  transform: scale(1.04);
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 4.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: scrollBounce 2s ease-in-out infinite;
}
.hero__scroll svg { width: 16px; height: 16px; }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Sections ── */
.section {
  padding: 7rem 4rem;
}
.section--nosotros { background: var(--cream); }
.section--productos { background: var(--sand); }
.section--cafe { background: var(--brown); color: var(--sand); }
.section--cafe .section-label { color: var(--gold); }
.section--cafe .section-label::before { background: var(--gold); }
.section--cafe .section-title { color: var(--sand); }
.section--cafe .section-lead { color: var(--text-muted); }
.section--horario { background: var(--cream); }
.section--contacto { background: var(--sand); }

/* ── Nosotros ── */
.nosotros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.nosotros__image-col {
  position: relative;
}
.nosotros__image-col img {
  border-radius: 4px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nosotros__image-accent {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  width: 60%;
  height: 40%;
  border: 2px solid var(--terracotta-light);
  border-radius: 4px;
  z-index: -1;
  opacity: 0.4;
}
.nosotros__content { max-width: 480px; }
.nosotros__features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
}

/* ── Feature Cards ── */
.feature-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.feature-card__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sand-dark);
  border-radius: 50%;
  color: var(--terracotta);
}
.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.feature-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-light);
}

/* ── Productos Grid ── */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.producto-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(44, 31, 21, 0.06);
  transition: all 0.4s var(--ease-out);
}
.producto-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(44, 31, 21, 0.12);
}
.producto-card__img {
  overflow: hidden;
  height: 260px;
}
.producto-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.producto-card:hover .producto-card__img img {
  transform: scale(1.06);
}
.producto-card__body {
  padding: 2rem;
}
.producto-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.producto-card p {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--text-light);
}

/* ── Cafetería ── */
.cafe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.cafe__content { max-width: 480px; }
.cafe__menu-list {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2.5rem;
}
.cafe__menu-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cafe__menu-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--sand);
}
.cafe__menu-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.cafe__note {
  margin-top: 2rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
}
.cafe__image-col { position: relative; }
.cafe__image-stack {
  position: relative;
  height: 650px;
}
.cafe__image-stack img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.cafe__image-float {
  position: absolute;
  bottom: -2rem;
  left: -3rem;
  width: 55%;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border: 4px solid var(--brown);
}
.cafe__image-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Horario ── */
.horario {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  position: relative;
}
.horario__inner { max-width: 480px; }
.horario__table {
  margin-top: 2.5rem;
  border-top: 1px solid var(--sand-dark);
}
.horario__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--sand-dark);
  transition: background 0.2s;
}
.horario__row:hover { background: var(--sand-warm); padding-left: 0.75rem; border-radius: 2px; }
.horario__day {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
}
.horario__time {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}
.horario__row--closed .horario__time {
  color: var(--terracotta);
  font-weight: 600;
}
.horario__note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
.horario__decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
  opacity: 0.3;
}
.horario__decoration svg { width: 100%; max-width: 300px; }

/* ── Contacto ── */
.contacto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contacto__details {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contacto__detail {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.contacto__detail-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sand-dark);
  border-radius: 50%;
  color: var(--terracotta);
}
.contacto__detail-icon svg { width: 20px; height: 20px; }
.contacto__detail strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.contacto__detail p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}
.contacto__detail a {
  color: var(--terracotta);
  transition: color 0.2s;
}
.contacto__detail a:hover { color: var(--terracotta-deep); }

.contacto__form-wrapper {
  background: var(--white);
  border-radius: 4px;
  padding: 3rem;
  box-shadow: 0 4px 24px rgba(44, 31, 21, 0.07);
}
.contacto__form-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--sand);
  border: 1.5px solid transparent;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--terracotta);
  background: var(--white);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-success {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  border-radius: 2px;
  font-size: 0.9rem;
  color: #2E7D32;
  text-align: center;
}

/* ── Footer ── */
.footer {
  background: var(--brown);
  color: var(--text-muted);
  padding: 3rem 4rem;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sand);
}
.footer__copy {
  font-size: 0.8rem;
}
.footer__address {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Animations ── */
.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);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .hero { padding: 3rem 2.5rem 3rem 260px; }
  .hero__image-grid { min-height: 400px; }
  .section { padding: 5rem 2.5rem; }
}

@media (max-width: 1024px) {
  .side-nav { width: 180px; padding: 2rem 1.25rem; }
  main { margin-left: 180px; }
  .hero { padding: 3rem 2.5rem 3rem 220px; }
  .hero__content { gap: 2.5rem; }
  .nosotros,
  .cafe,
  .horario,
  .contacto { gap: 3rem; }
}

@media (max-width: 900px) {
  .side-nav {
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease-out);
  }
  .side-nav.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  main { margin-left: 0; }
  .hero { padding: 5rem 2rem 3rem; }
  .hero__content { grid-template-columns: 1fr; }
  .hero__image-grid { display: none; }
  .section { padding: 4rem 1.5rem; }
  .nosotros,
  .cafe,
  .horario,
  .contacto { grid-template-columns: 1fr; }
  .nosotros__image-col { order: -1; max-height: 400px; }
  .cafe__image-stack { height: 400px; }
  .cafe__image-float { left: 0; }
  .productos-grid { grid-template-columns: 1fr; }
  .cafe__menu-list { grid-template-columns: 1fr; }
  .footer { padding: 2.5rem 1.5rem; }
  .hero__scroll { left: 2rem; }
}

@media (max-width: 480px) {
  .hero__title-main { font-size: 2.75rem; }
  .hero__cta-group { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .contacto__form-wrapper { padding: 2rem 1.5rem; }
}
