/* ==========================================================================
   Oscar Cibils — Web profesional
   ========================================================================== */

/* Fuentes: IBM Plex (SIL Open Font License 1.1, ver assets/fonts/OFL.txt) */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Medium-Latin1.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --paper: #F4F1EA;
  --ink: #172328;
  --teal: #155D63;
  --teal-dark: #10494F;
  --muted: #697679;
  --line: #D5D8D4;
  --white: #FFFFFF;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max-width: 73.75rem; /* 1180px */
  --gutter: clamp(1.375rem, 4vw, 2.5rem);
  --header-height: 4rem;
  --section-space: clamp(4.5rem, 3rem + 5vw, 7.5rem);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 0.5rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 64em) {
  body {
    font-size: 1.0625rem;
  }
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Etiquetas en mono: eyebrows, labels y numeración */
.eyebrow,
.section__label,
.area__num,
.step__num,
.hero__place {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--teal);
  border-radius: 2px;
  background: var(--teal);
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button--inverse {
  border-color: var(--white);
  background: var(--white);
  color: var(--teal-dark);
}

.button--inverse:hover {
  border-color: var(--paper);
  background: var(--paper);
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(244 241 234 / 0.96);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  text-decoration: none;
}

.brand__mark {
  flex: none;
  width: 2rem;
  height: 2rem;
}

.site-nav__list {
  list-style: none;
  padding: 0;
}

.site-nav__list a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav__list a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.nav-toggle {
  display: none;
}

@media (min-width: 48em) {
  .site-nav__list {
    display: flex;
    gap: clamp(1.25rem, 2.5vw, 2.25rem);
  }
}

/* Menú compacto en mobile */
@media (max-width: 47.99em) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    min-width: 2.75rem;
    margin-right: -0.75rem;
    padding: 0 0.75rem;
    border: 0;
    background: none;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .nav-toggle[aria-expanded="true"] {
    color: var(--teal);
  }

  .site-nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .site-nav__list.is-open {
    display: block;
  }

  .site-nav__list li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav__list a {
    min-height: 3rem;
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(2.75rem, 1.5rem + 3.5vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 1.5rem + 2.5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.hero__inner {
  display: grid;
  gap: 2.5rem;
}

.hero__title {
  margin-top: 1.25rem;
  font-size: clamp(2.5rem, 1.9rem + 2.92vw, 4.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 34em;
  margin-top: 1.75rem;
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.5rem;
}

.hero__place {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}

.hero__place::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--ink);
}

.hero__photo {
  position: relative;
  width: clamp(11.5rem, 10rem + 3vw, 12.5rem); /* 184px mobile → 200px desktop */
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%; /* retrato 4:5 igual al contenedor; ante un recorte, prioriza la cabeza */
}

@media (min-width: 52em) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
  }
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-space);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section--band {
  background: var(--white);
}

.section__grid {
  display: grid;
  gap: 1.25rem 2.5rem;
}

.section__title {
  max-width: 28ch;
  font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section__intro {
  max-width: 34em;
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

@media (min-width: 60em) {
  .section__grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  }

  .section__label {
    padding-top: 0.85rem;
  }
}

/* Servicios: versión más compacta que el resto de las secciones */
#servicios {
  padding-top: clamp(3.5rem, 2.5rem + 2.5vw, 4.5rem);
  padding-bottom: clamp(4rem, 3rem + 3vw, 5.5rem);
}

#servicios .section__title {
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem);
}

#servicios .section__intro {
  margin-top: 1rem;
}

.areas {
  list-style: none;
  margin-top: clamp(1.5rem, 1rem + 1.5vw, 2rem);
  padding: 0;
  border-top: 1px solid var(--ink);
}

.area {
  display: grid;
  gap: 0.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.area__title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.area__text {
  max-width: 34em;
  text-wrap: pretty;
}

@media (min-width: 48em) {
  .area {
    grid-template-columns: 3rem minmax(0, 4fr) minmax(0, 6fr);
    gap: 1.5rem;
    align-items: baseline;
    padding-block: 1.25rem;
  }
}

/* Cómo trabajo */
.steps {
  list-style: none;
  margin-top: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  padding: 0;
  border-left: 1px solid var(--ink);
}

.step {
  position: relative;
  padding: 0 0 2.25rem 1.75rem;
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: -4px;
  width: 7px;
  height: 7px;
  background: var(--teal);
}

.step__title {
  margin-top: 0.5rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.step__text {
  max-width: 30em;
  margin-top: 0.5rem;
  color: var(--muted); /* 4.70:1 sobre --white */
}

@media (min-width: 60em) {
  .steps {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 3.5rem;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .step {
    padding: 1.75rem 2.5rem 0 0;
  }

  .step::before {
    top: -4px;
    left: 0;
  }
}

/* Perfil */
.prose {
  max-width: 40rem;
  margin-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem);
}

.prose p + p {
  margin-top: 1.25rem;
}

.prose__lead {
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

/* Contacto */
.contact {
  padding-top: clamp(4.5rem, 3rem + 2.5vw, 5rem);
  padding-bottom: clamp(4.5rem, 4rem + 1vw, 5rem);
  background: var(--teal-dark);
  color: var(--white);
}

.section + .contact {
  border-top: 0;
}

.contact .section__label {
  color: var(--white);
}

.contact :focus-visible {
  outline-color: var(--white);
}

.contact__title {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  max-width: 18ch;
}

.contact__text {
  max-width: 34em;
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.5rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgb(255 255 255 / 0.28);
}

.contact__email {
  display: inline-block;
  padding-block: 0.4rem;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

@media (max-width: 29.99em) {
  .contact__actions .button {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: 2.25rem 2.5rem;
  font-size: 0.9375rem;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-footer__id strong {
  display: block;
  font-weight: 600;
}

.site-footer__legal {
  padding-top: 1.25rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
