/* ===========================================================
   Cuatrohojas — hoja de estilos
   Todos los colores/tipografías vienen de css/theme.css
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--color-ink);
  line-height: 1.02;
  margin: 0;
}
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
p  { margin: 0 0 1em; }
a  { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container {
  width: min(100% - 2 * clamp(20px, 5vw, 96px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-ink); color: #fff; padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

:where(a, button, input, textarea):focus-visible {
  outline: 3px solid var(--color-coral);
  outline-offset: 3px;
}

/* ------------------------- NAV ------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-nav);
  color: var(--color-on-dark);
}
.nav__inner {
  width: min(100% - 2 * clamp(20px, 5vw, 96px), var(--container));
  margin-inline: auto;
  min-height: 74px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { height: 30px; width: auto; fill: var(--logo-color); flex: none; }
.brand__text {
  display: grid;
  font-family: var(--font-heading);
  font-weight: 700; font-size: 11px; letter-spacing: .24em; line-height: 1.3;
}
.nav__links { display: flex; align-items: center; gap: clamp(20px, 3vw, 54px); }
.nav__links a {
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  color: rgba(255, 255, 255, .72);
  padding: 6px 0; position: relative; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--color-coral); transition: right .25s;
}
.nav__links a:hover, .nav__links a.is-active { color: #fff; font-weight: 700; }
.nav__links a:hover::after, .nav__links a.is-active::after { right: 0; }

.nav__burger {
  display: none; width: 44px; height: 44px; border: 0; background: none;
  padding: 10px; cursor: pointer;
}
.nav__burger span {
  display: block; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav__burger span + span { margin-top: 5px; }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------ HERO ------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--gradient-hero);
  padding-block: clamp(64px, 9vw, 120px) clamp(72px, 10vw, 150px);
  min-height: min(86vh, 860px);
  display: flex; align-items: center;
}
.hero__art { position: absolute; inset: 0; z-index: -1; }
.hero__coral {
  position: absolute; top: 0; right: 0; bottom: -10%; left: 48%;
  background: var(--color-coral);
  border-top-left-radius: var(--radius-hero);
}
.hero__plum {
  position: absolute; top: 0; right: 0; width: 26%; height: 54%;
  background: linear-gradient(160deg, var(--color-purple), color-mix(in srgb, var(--color-magenta) 70%, var(--color-purple)));
  border-bottom-left-radius: calc(var(--radius-hero) * .45);
}
.hero__wedge {
  position: absolute; right: -4%; bottom: -12%; width: 34%; height: 46%;
  background: linear-gradient(135deg, var(--color-coral) 46%, transparent 46.5%);
  border-top-left-radius: calc(var(--radius-hero) * .35);
}
.hero__star {
  position: absolute; top: 46%; right: 21%; width: clamp(80px, 9vw, 150px);
  transform: translateY(-50%); color: var(--color-ink);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .74fr);
  gap: clamp(28px, 5vw, 80px); align-items: end; width: min(100% - 2 * clamp(20px, 5vw, 96px), var(--container));
}
.hero__copy { min-width: 0; }
.hero h1 { margin-bottom: 26px; }
.hero__lead {
  font-size: var(--size-lead); font-weight: 500; max-width: 46ch;
  color: var(--color-body-soft); margin: 0;
}
.hero__claim {
  justify-self: end; align-self: end; text-align: right;
  max-width: 17ch; margin: 0;
  color: var(--color-on-dark);
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(1.05rem, 1.5vw, 1.5rem); line-height: 1.25;
}

/* --------------------- PÍLDORA TÍTULO ------------------ */
.pill {
  display: inline-flex; gap: .5em; align-items: center;
  background: var(--pill-bg); color: var(--pill-ink);
  border-radius: var(--radius-pill);
  padding: 11px 24px; margin-bottom: 26px;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
}
.pill b { color: var(--color-coral); letter-spacing: 0; }
.pill--light { background: var(--pill-bg); }

/* ---------------------- NOSOTROS ----------------------- */
.about {
  background: var(--gradient-about);
  padding-block: var(--section-padding);
}
.about__lead {
  max-width: 72ch; margin-top: 26px;
  font-size: var(--size-lead); font-weight: 500; color: var(--color-body-soft);
}
.values {
  list-style: none; margin: clamp(48px, 7vw, 96px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px);
  text-align: center;
}
.value { display: grid; justify-items: center; gap: 22px; }
.value__icon { width: 62px; height: 62px; color: var(--color-coral); }
.value p {
  margin: 0; max-width: 24ch;
  font-family: var(--font-heading); font-weight: 700; font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.32; color: var(--color-ink);
}

/* ---------------------- SERVICIOS ---------------------- */
.services {
  background: var(--color-lavender);
  padding-block: var(--section-padding);
}
.services__lead {
  margin-top: 22px; font-size: var(--size-lead); font-weight: 500;
  color: var(--color-body-soft);
}
.cards {
  margin-top: clamp(48px, 6vw, 88px);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px);
}
.card {
  position: relative;
  border: 1.5px solid var(--color-hairline);
  border-radius: var(--radius-card);
  padding: clamp(46px, 5vw, 66px) clamp(26px, 3.4vw, 54px) clamp(36px, 4vw, 52px);
  text-align: center;
}
.card__check {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--color-coral); color: #fff;
  display: grid; place-items: center;
}
.card__check svg { width: 30px; height: 30px; }
.card h3 { font-size: clamp(1.1rem, 1.5vw, 1.4rem); margin-bottom: 22px; }
.card__body p { font-size: 15px; color: var(--color-body-soft); margin-bottom: 1.15em; }
.card__body p:last-child { margin-bottom: 0; }

/* --------------------- PORTAFOLIO ---------------------- */
.work {
  background: var(--color-lavender);
  padding-block: 0 var(--section-padding);
}
.work__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
.work h2 { margin-bottom: 26px; }
.work__kicker { font-weight: 700; color: var(--color-ink); margin-bottom: .4em; }
.work p { max-width: 48ch; font-size: 15.5px; color: var(--color-body-soft); }
.work__art { color: var(--color-coral); justify-self: center; width: min(100%, 320px); }

/* ---------------------- CONTACTO ----------------------- */
.contact {
  position: relative; overflow: hidden;
  background: var(--gradient-contact);
  color: var(--color-on-dark);
  padding-block: var(--section-padding) 36px;
}
.contact::after {
  content: ""; position: absolute; right: -14%; top: -18%;
  width: 62%; aspect-ratio: 1;
  border: 1.5px solid rgba(255, 255, 255, .28);
  border-radius: 46% 46% 46% 0;
  pointer-events: none;
}
.contact__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(36px, 6vw, 96px); align-items: start;
}
.contact h2 { color: var(--color-on-dark); margin-bottom: 34px; }
.contact__copy p { font-size: 14.5px; color: rgba(255, 255, 255, .88); max-width: 46ch; }
.contact__label { font-weight: 700; color: #fff; margin-bottom: .25em; }

/* ------------------------ FORM ------------------------- */
.form { display: grid; gap: 6px; }
.form label {
  font-size: 13px; font-weight: 600; color: #fff; margin-top: 14px;
}
.form input, .form textarea {
  font: inherit; font-size: 15px; color: var(--color-body);
  background: var(--color-surface);
  border: 0; border-radius: var(--radius-field);
  padding: 14px 16px; width: 100%;
}
.form textarea { resize: vertical; min-height: 130px; }
.btn {
  justify-self: start; margin-top: 22px;
  background: var(--color-coral); color: #fff;
  font-family: var(--font-heading); font-weight: 600; font-size: 14px;
  border: 0; border-radius: var(--radius-field);
  padding: 13px 38px; cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--color-coral-dark); transform: translateY(-1px); }
.form__status { margin: 12px 0 0; font-size: 14px; min-height: 1.2em; font-weight: 600; }

.footer {
  position: relative; z-index: 1;
  text-align: center; margin: clamp(48px, 7vw, 96px) 0 0;
  font-size: 13px; color: rgba(255, 255, 255, .78);
}

/* --------------------- RESPONSIVE ---------------------- */
@media (max-width: 1040px) {
  .values { grid-template-columns: 1fr; justify-items: center; }
  .cards, .work__grid, .contact__grid { grid-template-columns: 1fr; }
  .work__art { grid-row: 1; width: min(100%, 220px); }
  .card { margin-top: 30px; }
}

@media (max-width: 860px) {
  .nav__burger { display: block; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--color-nav);
    padding: 0 clamp(20px, 5vw, 96px);
    max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s;
  }
  .nav.is-open .nav__links { max-height: 60vh; padding-block: 8px 22px; }
  .nav__links a { padding: 12px 0; font-size: 15px; }

  .hero { min-height: auto; }
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero__coral { left: 62%; bottom: 0; opacity: .9; }
  .hero__star { right: 6%; top: auto; bottom: 6%; width: clamp(64px, 20vw, 96px); transform: none; }
  .hero__claim { justify-self: start; text-align: left; max-width: 24ch; margin-top: 34px; }
  .hero__lead { color: var(--color-body-soft); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
