/* ==========================================================================
   COMIDISTECH — Sistema de diseño 2026
   Marca: Naranja #F57921 (protagonista) · Verde #499C34 (acento) · Blanco
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  /* Marca */
  --orange:        #F57921;
  --orange-dark:   #d9641a;
  --orange-darker: #b9530f;
  --orange-soft:   #fff1e6;
  --orange-tint:   #fde4d1;

  --green:         #499C34;
  --green-dark:    #3a7d29;
  --green-soft:    #eaf4e6;

  --white:         #ffffff;

  /* Neutros (cálidos, para que el naranja mande) */
  --ink:           #1d2126;   /* texto principal */
  --ink-soft:      #4a525c;   /* texto secundario */
  --line:          #ececec;   /* bordes sutiles */
  --bg:            #ffffff;
  --bg-warm:       #fbf7f3;   /* secciones alternas */
  --bg-dark:       #14181d;   /* pie / contraste */

  /* Tipografía */
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Escala / ritmo */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(20,24,29,.06);
  --shadow:    0 12px 32px rgba(20,24,29,.10);
  --shadow-lg: 0 24px 60px rgba(20,24,29,.16);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

/* --- Tipografía ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 1.9vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-dark);
}
.eyebrow::before {
  content: "";
  width: 1.6rem; height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.lead { font-size: 1.125rem; color: var(--ink-soft); }

/* --- Layout -------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.section { padding-block: clamp(3.5rem, 6vw, 6rem); }
.section--warm { background: var(--bg-warm); }
.text-center { text-align: center; }
.section__head { max-width: 60ch; margin-bottom: 2.75rem; }
.section--warm .section__head, .section.text-center .section__head { margin-inline: auto; }

/* --- Botones ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head);
  font-weight: 600; font-size: 1rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s;
  will-change: transform;
}
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn--primary { background: var(--orange); color: var(--white); box-shadow: 0 8px 20px rgba(245,121,33,.32); }
.btn--primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(245,121,33,.4); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange-dark); transform: translateY(-2px); }
.btn--light { background: var(--white); color: var(--orange-dark); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* --- Header / navegación ------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand img { height: 38px; width: auto; }
.brand__name {
  font-family: var(--font-head); font-weight: 800; letter-spacing: -.01em;
  font-size: 1.05rem; color: var(--ink);
}
.brand__name b { color: var(--orange); font-weight: 800; }

.nav { display: flex; align-items: center; gap: .12rem; }
.nav > * { flex: 0 0 auto; white-space: nowrap; }
.nav a:not(.btn) {
  font-family: var(--font-head); font-weight: 500; font-size: .9rem;
  color: var(--ink-soft);
  padding: .5rem .5rem; border-radius: 8px;
  transition: color .2s, background-color .2s;
}
.nav a:not(.btn):hover { color: var(--orange-dark); background: var(--orange-soft); }
.nav a.is-active { color: var(--orange-dark); }
.nav a.is-active::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: var(--orange); margin-top: 3px;
}
.nav .btn { margin-left: .3rem; padding: .55rem 1rem; font-size: .9rem; }

.lang-switch {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-head); font-weight: 600; font-size: .8rem; letter-spacing: .04em;
  color: var(--ink-soft); border: 1.5px solid var(--line); border-radius: 999px;
  padding: .35rem .55rem; margin-left: .25rem; transition: color .2s, border-color .2s, background-color .2s;
}
.lang-switch::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: currentColor;
  -webkit-mask: var(--globe) center/contain no-repeat; mask: var(--globe) center/contain no-repeat;
}
.lang-switch:hover { color: var(--orange-dark); border-color: var(--orange); background: var(--orange-soft); }
:root { --globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 0 20 15.3 15.3 0 0 1 0-20'/%3E%3C/svg%3E"); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1px); }

@media (max-width: 1199px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1.1rem, 4vw, 2.5rem) 1.5rem;
    box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform .3s var(--ease);
    max-height: calc(100dvh - 76px); overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: .85rem .6rem; font-size: 1.05rem; }
  .nav a.is-active::after { display: none; }
  .nav .btn { margin: .5rem 0 0; }
  .nav .lang-switch { margin: .75rem 0 0; align-self: flex-start; padding: .45rem .85rem; font-size: .85rem; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(105deg, rgba(166,74,12,.95) 0%, rgba(201,92,20,.86) 40%, rgba(20,24,29,.5) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: clamp(4rem, 9vw, 7.5rem); color: var(--white); }
.hero__content { max-width: 38rem; }
.hero h1 { color: var(--white); }
.hero .eyebrow { color: #ffe2cc; }
.hero .eyebrow::before { background: var(--white); }
.hero__sub { margin-top: 1.1rem; font-size: 1.2rem; color: #fff; max-width: 34rem; }
.hero__slogan {
  margin-top: 1.4rem; font-family: var(--font-head); font-style: italic;
  font-weight: 600; font-size: 1.15rem; color: #fff;
}
.hero__cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .9rem; }

/* Hero interior (páginas de servicio): más compacto */
.hero--page .hero__inner { padding-block: clamp(3.5rem, 7vw, 5.5rem); }

/* Hero de marca (sin foto): naranja protagonista con destello verde */
.hero--brand { background: linear-gradient(115deg, #a64a0c 0%, #b9530f 55%, #e06d1c 115%); }
.hero--brand .hero__inner { padding-block: clamp(3.25rem, 6vw, 5rem); }
.hero--brand::after {
  background:
    radial-gradient(70% 120% at 88% -20%, rgba(73,156,52,.55), transparent 58%),
    radial-gradient(60% 100% at 0% 120%, rgba(20,24,29,.28), transparent 60%);
}
.hero--brand .hero__content { max-width: 44rem; }

/* --- Tarjetas de servicio ----------------------------------------------- */
.cards { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--orange-tint); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--orange-soft); color: var(--orange-dark);
}
.card__icon svg { width: 26px; height: 26px; }
.card--green .card__icon { background: var(--green-soft); color: var(--green-dark); }
.card h3 { margin-bottom: .6rem; }
.card ul { display: grid; gap: .55rem; margin-top: .2rem; }
.card li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); }
.card li::before {
  content: ""; position: absolute; left: 0; top: .6em; width: .55rem; height: .55rem;
  border-radius: 50%; background: var(--orange);
}
.card--green li::before { background: var(--green); }
.card__link {
  margin-top: auto; padding-top: 1.1rem;
  font-family: var(--font-head); font-weight: 600; color: var(--orange-dark);
  display: inline-flex; align-items: center; gap: .4rem;
}
.card__link svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.card:hover .card__link svg { transform: translateX(4px); }

/* --- Bloque "contenido + media" (páginas interiores) -------------------- */
.feature { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 860px) { .feature { grid-template-columns: 1.05fr .95fr; } .feature--rev > :first-child { order: 2; } }
.feature__body p { color: var(--ink-soft); margin-top: 1rem; }
.feature__list { display: grid; gap: .8rem; margin-top: 1.6rem; }
.feature__list li { position: relative; padding-left: 2rem; color: var(--ink); }
.feature__list li::before {
  content: ""; position: absolute; left: 0; top: .15em;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9641a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/0.85rem no-repeat;
}
.feature__media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  position: relative;
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.feature__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(245,121,33,.12), rgba(73,156,52,.12));
  pointer-events: none;
}

/* --- Testimonios --------------------------------------------------------- */
.quotes { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.quote {
  background: var(--white); border-radius: var(--radius); padding: 1.8rem;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--orange);
}
.quote:nth-child(2) { border-top-color: var(--green); }
.quote__mark { font-family: var(--font-head); font-size: 3rem; line-height: .6; color: var(--orange-tint); }
.quote p { margin: .4rem 0 1.2rem; color: var(--ink); }
.quote__author { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.quote__role { display: block; font-family: var(--font-body); font-weight: 400; font-size: .9rem; color: var(--ink-soft); }

/* --- Formulario de contacto --------------------------------------------- */
.contact { position: relative; overflow: hidden; background: var(--ink); color: var(--white); }
.contact::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 0% 0%, rgba(245,121,33,.45), transparent 55%),
              radial-gradient(110% 100% at 100% 100%, rgba(73,156,52,.35), transparent 55%);
}
.contact__grid { position: relative; display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 860px) { .contact__grid { grid-template-columns: 1fr 1.1fr; } }
.contact h2 { color: var(--white); }
.contact__intro { color: rgba(255,255,255,.85); margin-top: 1rem; }
.contact__intro a { color: #ffd9bd; font-weight: 600; }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: rgba(255,255,255,.9); }
.field input, .field textarea {
  font: inherit; color: var(--white);
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem; transition: border-color .2s, background-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.5); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); background: rgba(255,255,255,.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.form .btn { width: 100%; margin-top: .3rem; }
.form__note { font-size: .85rem; color: rgba(255,255,255,.6); }

/* --- Pie ----------------------------------------------------------------- */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,.7); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; justify-content: space-between;
  padding-block: 2.5rem;
}
.site-footer .brand__name { color: var(--white); }
.site-footer__slogan { font-family: var(--font-head); font-style: italic; color: rgba(255,255,255,.85); }
.site-footer__legal { font-size: .9rem; }
.site-footer__legal b { color: var(--orange); font-weight: 600; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-nav a { font-size: .9rem; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-nav a:hover { color: var(--orange); }

/* --- Página de gracias --------------------------------------------------- */
.thanks { min-height: 64vh; display: grid; place-items: center; text-align: center; }
.thanks__inner { max-width: 36rem; }
.thanks__badge {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 1.6rem;
  display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-dark);
  box-shadow: 0 0 0 10px rgba(73,156,52,.08);
}
.thanks__badge svg { width: 44px; height: 44px; }
.thanks p { color: var(--ink-soft); margin-top: 1rem; }
.thanks__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* --- Casilla de consentimiento (formulario) ------------------------------ */
.field-check { display: flex; gap: .6rem; align-items: flex-start; }
.field-check input { flex: none; width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--orange); cursor: pointer; }
.field-check label { font-family: var(--font-body); font-weight: 400; font-size: .88rem; color: rgba(255,255,255,.82); }
.field-check a { color: #ffd9bd; font-weight: 600; text-decoration: underline; }

/* --- Páginas legales (prosa) --------------------------------------------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.prose p { color: var(--ink-soft); margin-top: .85rem; }
.prose ul { padding-left: 1.3rem; list-style: disc; margin-top: .6rem; }
.prose li { color: var(--ink-soft); margin-top: .4rem; }
.prose a:not(.btn) { color: var(--orange-dark); font-weight: 600; }
.note-box { background: var(--orange-soft); border: 1px solid var(--orange-tint); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: 1.6rem; font-size: .92rem; color: var(--ink-soft); }

/* --- Animación de entrada al hacer scroll -------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
