:root {
  --verde-formula: #1f4b3a;
  --verde-formula-dark: #14342a;
  --azul-sello: #2b4a73;
  --rojo-botiquin: #a43b2e;
  --ambar-frasco: #c68a3d;
  --blanco-ficha: #f7f7f4;
  --negro-tinta: #171a18;
  --borde: rgba(23, 26, 24, 0.12);
  --borde-fuerte: rgba(23, 26, 24, 0.22);
  --max-width: 1120px;

  --font-display: "Newsreader", Georgia, serif;
  --font-text: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--negro-tinta);
  background: var(--blanco-ficha);
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--azul-sello); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 0.5em;
  color: var(--negro-tinta);
}

:focus-visible {
  outline: 2px solid var(--azul-sello);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--verde-formula);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--borde);
  background: var(--blanco-ficha);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--negro-tinta);
}
.logo:hover { text-decoration: none; }

.logo-mark {
  color: var(--verde-formula);
  font-size: 1.1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a:not(.btn) {
  color: var(--negro-tinta);
  font-weight: 500;
  font-size: 0.92rem;
}
.nav a:not(.btn):hover { color: var(--azul-sello); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--negro-tinta);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-whatsapp {
  background: var(--verde-formula);
  color: #fff;
}
.btn-whatsapp:hover { background: var(--verde-formula-dark); color: #fff; text-decoration: none; }

.btn-outline {
  border-color: var(--borde-fuerte);
  color: var(--negro-tinta);
}
.btn-outline:hover { border-color: var(--azul-sello); color: var(--azul-sello); text-decoration: none; }

.btn-lg {
  padding: 13px 22px;
  font-size: 1rem;
}

/* Hero */
.hero { padding: 56px 0 48px; }

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.hero-text { flex: 1 1 460px; }

.hero-text h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  max-width: 15ch;
}

.hero-text > p {
  color: var(--negro-tinta);
  opacity: 0.78;
  font-size: 1.05rem;
  max-width: 48ch;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--negro-tinta);
  opacity: 0.65;
  margin: 0;
}

.hero-visual {
  flex: 0 0 300px;
}

/* Ticket */
.ticket {
  background: #fff;
  border: 1px solid var(--borde-fuerte);
  border-bottom: none;
  padding: 20px 22px 34px;
  clip-path: polygon(
    0 0, 100% 0, 100% 94%,
    96% 100%, 92% 94%, 88% 100%, 84% 94%, 80% 100%,
    76% 94%, 72% 100%, 68% 94%, 64% 100%, 60% 94%,
    56% 100%, 52% 94%, 48% 100%, 44% 94%, 40% 100%,
    36% 94%, 32% 100%, 28% 94%, 24% 100%, 20% 94%,
    16% 100%, 12% 94%, 8% 100%, 4% 94%, 0 100%
  );
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--borde-fuerte);
  margin-bottom: 16px;
}

.ticket-no {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  opacity: 0.65;
}

.ticket-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-steps li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ticket-step-n {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--verde-formula);
  min-width: 1ch;
}

/* Sello en vivo */
.stamp-section { padding: 40px 0; }

.stamp-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.stamp {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  min-height: 148px;
  padding: 12px 16px;
  border: 3px double var(--verde-formula);
  border-radius: 8px;
  transform: rotate(-6deg);
  color: var(--verde-formula);
  text-align: center;
  animation: stamp-in 0.4s ease-out;
}
.stamp.is-closed {
  border-color: var(--rojo-botiquin);
  color: var(--rojo-botiquin);
}

@keyframes stamp-in {
  from { transform: rotate(-6deg) scale(1.18); opacity: 0; }
  to { transform: rotate(-6deg) scale(1); opacity: 1; }
}

.stamp-status {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stamp-detail {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 6px;
}

.stamp-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  opacity: 0.6;
  margin: 0 0 4px;
}

.stamp-copy p:not(.stamp-label) {
  margin: 0;
  max-width: 42ch;
  opacity: 0.8;
}

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: #efefe9; }

.section h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.section-lead {
  opacity: 0.78;
  margin: 0 0 28px;
  max-width: 60ch;
}

/* Servicios */
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--borde);
}

.service-list li {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--borde);
}

.tag {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--azul-sello);
  border: 1px solid var(--borde-fuerte);
  border-radius: 3px;
  padding: 3px 7px;
  height: fit-content;
  min-width: 2.6em;
  text-align: center;
}

.service-list h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.service-list p { margin: 0; opacity: 0.78; font-size: 0.95rem; }

/* Sobre Farmagen */
.about-inner { max-width: 68ch; }
.about-inner p { margin: 0 0 16px; }
.about-signature {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 24px !important;
}

/* Horarios / Ubicacion */
.horarios-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.horarios-inner > div { flex: 1 1 320px; }

.hours-table {
  width: 100%;
  max-width: 420px;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.hours-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--borde);
}
.hours-table td:first-child { opacity: 0.7; }
.hours-table td:last-child { text-align: right; font-weight: 500; }

.map-placeholder {
  min-height: 200px;
  background: #efefe9;
  border: 1px dashed var(--borde-fuerte);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--negro-tinta);
  opacity: 0.55;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin: 16px 0;
}

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  font-weight: 600;
}

.contact-item a,
.contact-item span:last-child {
  font-size: 1rem;
  font-weight: 500;
  color: var(--negro-tinta);
}
.contact-item a:hover { color: var(--azul-sello); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--borde);
  padding: 22px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  opacity: 0.65;
  font-size: 0.78rem;
}

/* Floating WhatsApp button */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--verde-formula);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(23, 26, 24, 0.25);
  z-index: 200;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }

/* Responsive */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--blanco-ficha);
    border-bottom: 1px solid var(--borde);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 10px 0; width: 100%; }
  .nav .btn { margin-top: 10px; }

  .hero-inner { flex-direction: column; }
  .hero-visual { width: 100%; }
}

@media (max-width: 480px) {
  .stamp-inner { flex-direction: column; align-items: flex-start; }
}
