/* =============================================================================
   styles.css — Jorge Conde Gisbert
   Paleta y decisiones visuales según CLAUDE.md §6.
   Mobile-first (§30). Sin dependencias externas más allá de Google Fonts.
   ============================================================================= */

:root {
  --background: #F6F7F9;
  --surface: #FFFFFF;
  --surface-alt: #F1F4F9;
  --text-primary: #101828;
  --text-secondary: #667085;
  --border: #E4E7EC;
  --brand-blue: #175CD3;
  --brand-blue-dark: #1849A9;
  --brand-blue-light: #EAF2FF;
  --dark: #0B1220;
  --success: #067647;
  --danger: #B42318;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 4px 20px -6px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .18);

  --container: 1160px;
  --container-narrow: 780px;

  --font: "Manrope", "Inter", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-blue-dark); }

:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; top: -60px; left: 12px;
  background: var(--dark); color: white; padding: 10px 14px; border-radius: 8px;
  z-index: 100; transition: top .2s;
}
.skip-link:focus { top: 12px; color: white; }

/* Layout ------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding: 72px 0;
}
.section--alt { background: var(--surface-alt); }

.section__title {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  font-weight: 700;
}
.section__title--center { text-align: center; }

.section__lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0 0 32px;
  max-width: 62ch;
}
.section__lead--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  color: var(--brand-blue);
  background: var(--brand-blue-light);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 0 0 16px;
}
.eyebrow--center {
  display: block;
  width: max-content;
  margin: 0 auto 14px;
}

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand-blue);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--brand-blue-dark); color: white; }

.btn--ghost {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

.btn--disabled {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
  cursor: not-allowed;
}

.btn--lg { padding: 14px 24px; font-size: 1rem; }

/* Navbar ------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; gap: 24px;
  height: 68px;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-primary); font-weight: 700;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--dark); color: white;
  font-size: .78rem; letter-spacing: .04em;
}
.brand-name__soft { color: var(--text-secondary); font-weight: 500; }

.nav__menu {
  display: none;
  margin-left: auto;
  gap: 28px;
}
.nav__menu a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: .95rem;
}
.nav__menu a:hover { color: var(--brand-blue); }

.nav__cta { display: none; }

.nav__toggle {
  margin-left: auto;
  background: transparent; border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; gap: 4px;
  cursor: pointer;
}
.nav__toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
}

.mobile-menu {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.mobile-menu a {
  padding: 12px 6px; color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; margin-top: 8px; }

@media (min-width: 900px) {
  .nav__menu { display: inline-flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* Hero --------------------------------------------------------------------- */
.hero {
  padding: 56px 0 24px;
  background:
    radial-gradient(1200px 500px at 90% -10%, var(--brand-blue-light), transparent 60%),
    linear-gradient(180deg, var(--background), var(--background));
}
.hero__inner {
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
  align-items: center;
}
.hero__copy h1 {
  font-size: clamp(2rem, 1.2rem + 4.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 8px 0 16px;
  font-weight: 800;
}
.lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 60ch;
  margin: 0 0 28px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero__bullets {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  color: var(--text-secondary);
  font-size: .95rem;
}
.hero__bullets li::before {
  content: ""; display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-blue); margin-right: 10px; vertical-align: middle;
}

.hero__portrait { margin: 0; }

.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(160deg, var(--brand-blue-light) 0%, #DFE7F3 100%);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%;
  display: block;
}
.portrait__placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
  color: var(--text-secondary);
  padding: 24px;
}
.portrait__placeholder span {
  display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 6px;
}
.portrait__placeholder small { font-size: .78rem; opacity: .8; }

/* Contacto alternativo (chips debajo del lead del formulario) --------- */
.contact-alt {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 0 0 28px;
}
.contact-alt a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
  font-size: .92rem;
  color: var(--text-primary);
  transition: border-color .15s ease, color .15s ease;
}
.contact-alt a:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

@media (min-width: 900px) {
  .hero { padding: 96px 0 64px; }
  .hero__inner {
    grid-template-columns: 1.15fr .85fr;
    gap: 64px;
  }
  .hero__bullets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Strip -------------------------------------------------------------------- */
.strip { padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.strip__grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.strip__item strong { display: block; font-size: .95rem; }
.strip__item span { color: var(--text-secondary); font-size: .9rem; }

@media (min-width: 640px) { .strip__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .strip__grid { grid-template-columns: repeat(4, 1fr); } }

/* Problema ----------------------------------------------------------------- */
.problem__list {
  display: grid; gap: 12px; padding: 0; list-style: none;
  grid-template-columns: 1fr;
}
.problem__list li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  color: var(--text-primary); box-shadow: var(--shadow-sm);
}
.problem__list li::before {
  content: "→"; color: var(--brand-blue); font-weight: 700; margin-right: 10px;
}
@media (min-width: 700px) { .problem__list { grid-template-columns: 1fr 1fr; } }

/* Cards (servicios) -------------------------------------------------------- */
.cards {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #D0D5DD; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { color: var(--text-secondary); margin: 0 0 14px; }
.card ul { margin: 0; padding-left: 18px; color: var(--text-primary); }
.card ul li { padding: 3px 0; }

@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }

/* Portfolio ---------------------------------------------------------------- */
.portfolio {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.project:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.project__media { aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.project__gradient { position: absolute; inset: 0; }
.project__gradient--1 { background: linear-gradient(135deg, #175CD3 0%, #0B1220 100%); }
.project__gradient--2 { background: linear-gradient(135deg, #B9C8E6 0%, #175CD3 100%); }
.project__gradient--3 { background: linear-gradient(135deg, #E4E7EC 0%, #A9B3C1 100%); }
.project__body { padding: 20px 22px 24px; }
.project__body h3 { margin: 8px 0 4px; }
.project__cat { color: var(--text-secondary); font-size: .9rem; margin: 0 0 10px; }

.tag {
  display: inline-block;
  background: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  font-size: .75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}
.tag--muted { background: #EEF0F3; color: var(--text-secondary); }

@media (min-width: 800px) { .portfolio { grid-template-columns: repeat(3, 1fr); } }

/* Steps -------------------------------------------------------------------- */
.steps {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
  padding: 0; list-style: none;
  counter-reset: none;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.steps__num {
  display: inline-block;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { color: var(--text-secondary); margin: 0; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Pricing ------------------------------------------------------------------ */
.pricing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.pricing__price {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 6px 16px; border-radius: 999px; background: var(--brand-blue-light); color: var(--brand-blue-dark);
  margin-bottom: 20px;
}
.pricing__label { font-weight: 600; font-size: .95rem; }
.pricing__amount { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.pricing__amount span[data-site="pricing.currency"] { margin-left: 4px; }
.pricing__list {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: inline-block; text-align: left;
  color: var(--text-primary);
}
.pricing__list li { padding: 5px 0; padding-left: 24px; position: relative; }
.pricing__list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--brand-blue); font-weight: 700;
}
.pricing__note { color: var(--text-secondary); font-size: .92rem; max-width: 52ch; margin: 0 auto 24px; }

/* About -------------------------------------------------------------------- */
.about {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
.about__portrait .portrait { aspect-ratio: 1 / 1; max-width: 420px; margin: 0 auto; }
@media (min-width: 900px) {
  .about { grid-template-columns: .8fr 1.2fr; gap: 56px; }
}

/* FAQ ---------------------------------------------------------------------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 18px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--brand-blue);
  font-size: 1.4rem; line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; color: var(--text-secondary); }

/* Contacto / formulario ---------------------------------------------------- */
.form {
  display: grid; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.form__row {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; font-size: .95rem; }
.field > span { font-weight: 600; color: var(--text-primary); }
.field em { color: var(--brand-blue); font-style: normal; }
.field input, .field textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(23, 92, 211, .12);
}
.field textarea { resize: vertical; min-height: 120px; }

.field--inline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  font-size: .92rem;
  color: var(--text-secondary);
}
.field--inline input { width: auto; margin-top: 3px; }
.field--inline span { color: inherit; font-weight: 400; }

.hp { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }

.form__status { margin: 4px 0 0; font-size: .95rem; min-height: 1.4em; }
.form__status.is-ok { color: var(--success); }
.form__status.is-error { color: var(--danger); }

.form button[disabled] { opacity: .7; cursor: progress; }

/* Footer ------------------------------------------------------------------- */
.footer {
  background: var(--dark);
  color: #E4E7EC;
  padding: 48px 0 32px;
}
.footer__inner {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
  align-items: start;
}
.footer__brand { font-weight: 700; color: white; margin: 0 0 4px; }
.footer__tag { color: #98A2B3; margin: 0; font-size: .95rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer nav a { color: #E4E7EC; font-size: .95rem; }
.footer nav a:hover { color: white; }
.footer__copy { margin: 0; color: #98A2B3; font-size: .85rem; }
.footer__copy a { color: #E4E7EC; }
@media (min-width: 800px) {
  .footer__inner { grid-template-columns: 1.2fr 1.4fr 1fr; align-items: center; }
  .footer__copy { text-align: right; }
}

/* prefers-reduced-motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
