/* ============================================================
   Coffee & Vending Panamá — estilos base
   Paleta oficial (Manual de Identidad Visual v1.0)
   ============================================================ */

@font-face {
  font-family: "Franie SemiBold";
  src: url("../fonts/Franie-SemiBold.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Veloxity";
  src: url("../fonts/Veloxity-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --espresso: #3b2415;
  --caramelo: #d49a5a;
  --verde: #9bb85e;
  --moka: #7a4a2f;
  --crema: #f3e8d5;
  --turquesa: #0f6b7a;
  --canela: #e0603a;

  --bg: #fffaf3;
  --text: var(--espresso);
  --text-soft: #6b5a4d;
  --border: #e7d9c4;

  --font-display: "Franie SemiBold", "Poppins", "Segoe UI", sans-serif;
  --font-hero: "Veloxity", "Poppins", "Segoe UI", sans-serif;
  --font-body: "Mulish", "Segoe UI", sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(59, 36, 21, 0.1);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--espresso);
}

h1 { font-family: var(--font-hero); font-size: clamp(2.4rem, 4.4vw, 3.7rem); font-weight: 400; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--text-soft); }

ul { margin: 0; padding: 0; list-style: none; }

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

.section {
  padding: 88px 0;
}

.section--tight { padding: 56px 0; }

.section--crema { background: var(--crema); }
.section--espresso { background: var(--espresso); color: #fff; }
.section--espresso p { color: #d9c9b8; }
.section--espresso h2, .section--espresso h3 { color: #fff; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--turquesa);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--canela);
  border-radius: 2px;
}

.section--espresso .eyebrow { color: var(--caramelo); }

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--canela);
  color: #fff;
  box-shadow: 0 8px 20px rgba(224, 96, 58, 0.35);
}
.btn--primary:hover { background: #c94f2a; }

.btn--outline {
  background: transparent;
  border-color: var(--espresso);
  color: var(--espresso);
}
.btn--outline:hover { background: var(--espresso); color: #fff; }

.btn--light {
  background: #fff;
  color: var(--espresso);
}
.btn--light:hover { background: var(--crema); }

.btn--whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}
.btn--whatsapp:hover { background: #1eb958; }

.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 54px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--espresso);
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--turquesa);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  background: var(--canela);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--espresso);
  border-radius: 2px;
}

/* ---------- Pattern strip ----------
   Brand signature from the identity manual, dialled down for web: a thin
   accent line rather than a full-width band competing with the content. */
.pattern-strip {
  height: 4px;
  width: 100%;
  opacity: 0.75;
  background: repeating-linear-gradient(
    90deg,
    var(--canela) 0 40px,
    var(--verde) 40px 80px,
    var(--turquesa) 80px 120px,
    var(--caramelo) 120px 160px,
    var(--moka) 160px 200px
  );
}

/* ---------- Hero (full-bleed photograph + warm scrim) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 84vh;
  padding: 120px 0 104px;
  overflow: hidden;
  background: var(--espresso);
}

/* Taller than .hero and negatively inset so the JS-driven parallax
   translateY (see animations.js) never exposes an edge. */
.hero-media {
  position: absolute;
  inset: -15% 0;
  z-index: -2;
  will-change: transform;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1);
  animation: ken-burns 22s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.09) translate3d(-1.5%, -1%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none; }
}

/* Warm scrim keeps the headline legible over the photograph */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(38, 23, 13, 0.95) 0%,
    rgba(38, 23, 13, 0.86) 34%,
    rgba(38, 23, 13, 0.58) 62%,
    rgba(38, 23, 13, 0.32) 100%
  );
}

.hero .container {
  display: block;
}

.hero-copy {
  max-width: 660px;
}

.hero h1 {
  color: #fff;
}

.hero .eyebrow {
  color: var(--caramelo);
}

.hero .eyebrow::before {
  background: var(--caramelo);
}

.hero-copy .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-copy p.lead {
  font-size: 1.18rem;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

/* Pills read better than bare text against the photograph */
.hero-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.84rem;
  color: #fff;
  padding: 9px 18px 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--caramelo);
}

/* Reusable soft blurred accent used in place of flat decorative shapes */
.shape--glow {
  filter: blur(60px);
  border-radius: 50%;
  pointer-events: none;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Photo-led service card */
.card--photo {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card--photo:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--crema);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.card--photo:hover .card-media img {
  transform: scale(1.05);
}

.card-body {
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.94rem;
  margin-bottom: 16px;
}

.card-body .card-link {
  margin-top: auto;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card .icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #fff;
}

/* Icon chips are deliberately monochrome — using five brand colours at once
   fought the restraint the rest of the page is going for. Canela stays the
   single accent, reserved for CTAs. */
.icon--verde,
.icon--turquesa,
.icon--canela,
.icon--caramelo,
.icon--moka { background: var(--espresso); }

.card ul.feature-list {
  margin-top: 14px;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--verde);
  font-weight: 800;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--turquesa);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 22px 22px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
  background: var(--turquesa);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-hero);
  font-size: 2.6rem;
  color: var(--canela);
}

.stat span {
  font-size: 0.88rem;
  color: var(--text-soft);
  font-weight: 600;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--turquesa), #0a4d57);
  color: #fff;
  border-radius: 28px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cta-banner::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  right: -100px; top: -140px;
}

.cta-banner h2, .cta-banner p { color: #fff; margin: 0; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-top: 8px; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 30px;
}

.testimonial p {
  font-style: italic;
  color: var(--espresso);
}

.testimonial .who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--caramelo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
}

.who strong { display: block; font-size: 0.9rem; font-family: var(--font-display); }
.who span { font-size: 0.8rem; color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--espresso);
  color: #e7d9c4;
  padding: 70px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-grid img { height: 48px; margin-bottom: 16px; }

.footer-grid h4 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.footer-grid li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--caramelo); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #a08c78;
}

.social-row {
  display: flex;
  gap: 12px;
}

.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e7d9c4;
  transition: background 0.2s ease, color 0.2s ease;
}
.social-row a:hover { background: var(--caramelo); color: var(--espresso); }
.social-row a svg { width: 17px; height: 17px; }

/* Contact list with inline icons instead of emoji */
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  line-height: 1.5;
}

.footer-contact svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  opacity: 0.6;
}

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--espresso);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--turquesa);
}

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

.form-note {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 10px;
}

.form-success {
  display: none;
  background: #eef7e6;
  border: 1px solid var(--verde);
  color: #4c6329;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 600;
}

.form-success.show { display: block; }

/* ---------- Info blocks (contact page) ---------- */
.info-block {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.info-block .icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 12px;
}

.info-block h4 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.info-block p { margin: 0; font-size: 0.92rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 64px 0 56px;
  background: var(--crema);
  text-align: center;
}

.page-hero .eyebrow { justify-content: center; }
.page-hero p { max-width: 620px; margin-left: auto; margin-right: auto; }

/* ---------- Values ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-item {
  text-align: center;
  padding: 20px;
}

.value-item .icon {
  margin: 0 auto 16px;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tag {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--crema);
  color: var(--espresso);
}

.image-frame {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, var(--verde), var(--turquesa));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { min-height: 0; padding: 92px 0 80px; }
  .hero-copy { max-width: 100%; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  /* Narrow screens need a vertical scrim — the left-weighted one stops covering the copy */
  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(38, 23, 13, 0.78) 0%,
      rgba(38, 23, 13, 0.88) 45%,
      rgba(38, 23, 13, 0.94) 100%
    );
  }
  .hero-badges { gap: 10px; }
  .hero-badge { font-size: 0.78rem; padding: 8px 14px 8px 12px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }

  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    position: absolute;
    top: 78px;
    left: 0; right: 0;
    background: var(--bg);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cta-banner { padding: 36px 26px; flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .values-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

/* ---------- Scroll-reveal animation hooks (see assets/js/animations.js) ----------
   Elements only start hidden once we know JS is running (html.js), so content
   stays visible if JS fails to load. prefers-reduced-motion users never get the
   hidden starting state at all — Motion also short-circuits for them in JS. */
html.js .reveal {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
  }
}

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

@media (max-width: 720px) {
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
  .whatsapp-float svg { width: 25px; height: 25px; }
}
