/* Chris Torres, portafolio de redacción */

:root {
  --bg: #FAF9F6;
  --ink: #252525;
  --body: #444444;
  --muted: #666666;
  --accent: #71364B;
  --accent-dark: #5A2A3D;
  --accent-soft: #EADCE1;
  --sand: #F1ECE4;
  --white: #FFFFFF;
  --line: #D8D4CC;
  --line-strong: #C9C3B8;
  --on-dark-accent: #EBC8D6;
  --on-dark-text: #E4E0D8;
  --on-dark-muted: #D0CBC1;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

em { font-style: italic; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--bg); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Botones */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-align: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--accent-dark); color: var(--bg); }
.btn--outline { border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--bg); }

/* Cabecera */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 32px;
  padding: 22px 0;
}
.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 10px 0;
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
  list-style: none;
  padding: 0;
  font-size: 14px;
}
.nav-list a {
  display: inline-block;
  padding: 12px 0;
  text-decoration: none;
}
.nav-list a:hover { text-decoration: underline; }
.header-cta { font-size: 14px; padding: 11px 22px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .js .nav-toggle { display: inline-flex; }
  .js .header-cta { display: none; }
  .js .site-nav { display: none; flex-basis: 100%; }
  .js .site-nav.is-open { display: block; }
  .js .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 17px;
    border-top: 1px solid var(--line);
  }
  .js .nav-list a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Etiquetas y títulos de sección */
.eyebrow {
  margin-bottom: 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--section { margin-bottom: 14px; }
.eyebrow--light { margin-bottom: 18px; color: var(--on-dark-accent); }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.section-title em, .hero__title em { color: var(--accent); }
.section-title--spaced { margin-bottom: 48px; }

.label {
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--spaced { margin: 64px 0 6px; }
.label--inline { margin: 0; }
.label-note { margin-bottom: 20px; color: var(--muted); font-size: 15px; }

/* Hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 64px;
  padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 7vw, 88px);
}
.hero__text { flex: 1 1 440px; min-width: 0; }
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero__lead { margin-top: 28px; max-width: 520px; font-size: 19px; line-height: 1.55; }
.hero__sub { margin-top: 10px; max-width: 520px; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__media {
  flex: 0 1 400px;
  min-width: 260px;
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.blob { position: absolute; }
.blob--back {
  top: 5%; right: -6%; bottom: -6%; left: 12%;
  background: var(--accent-soft);
  border-radius: 58% 42% 46% 54% / 46% 56% 44% 54%;
}
.blob--dot {
  left: -7%; bottom: 8%;
  width: 24%;
  aspect-ratio: 1 / 1;
  background: var(--accent);
  border-radius: 52% 48% 44% 56% / 50% 54% 46% 50%;
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 48% 52% 50% 50% / 54% 46% 54% 46%;
}

/* Franja */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px var(--gutter);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 28px);
  line-height: 1.5;
}
.strip span { color: var(--accent); }

/* Secciones */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--works { padding-bottom: clamp(32px, 5vw, 56px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
  margin-bottom: 48px;
}
.section-head__intro { flex: 0 1 400px; color: var(--muted); }

/* Tarjetas de trabajos */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3vw, 36px);
}
.card--outline { border: 1px solid var(--line); background: var(--white); }
.card--sand { background: var(--sand); }
.card--r1 { border-radius: 32px 32px 32px 10px; }
.card--r2 { border-radius: 32px 32px 10px 32px; }
.card--r3 { border-radius: 10px 32px 32px 32px; }
.card--r4 { border-radius: 32px 10px 32px 32px; }

.card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.card__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
}
.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.tag--light { background: var(--bg); }
.card__meta {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
}
.card__desc { color: var(--body); }
.card__link {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 500;
  font-size: 15px;
  align-self: flex-start;
}

/* Archivo */
.archive { margin-top: 40px; max-width: 720px; }
.archive__title {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
}
.archive__list { list-style: none; padding: 0; border-bottom: 1px solid var(--line); }
.archive__list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.archive__list span { color: var(--muted); font-size: 14px; }
.archive__note { margin-top: 16px; font-size: 14px; font-style: italic; color: var(--muted); }

/* Servicios */
.services {
  background: var(--sand);
  padding: clamp(64px, 9vw, 112px) 0;
}
.service-list { list-style: none; padding: 0; border-bottom: 1px solid var(--line-strong); }
.service {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line-strong);
}
.service__num {
  flex: 0 0 56px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1.1;
  color: var(--accent);
}
.service__title {
  flex: 1 1 280px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
}
.service__desc { flex: 1.2 1 300px; color: var(--body); }
.services__also {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 40px;
  align-items: baseline;
}
.services__also p { flex: 1 1 280px; }
.services__note { margin-top: 16px; color: var(--muted); font-size: 15px; }

/* Sobre mí */
.about { display: flex; flex-wrap: wrap; gap: 56px 72px; }
.about__text { flex: 1 1 380px; min-width: 0; }
.about__text p { margin-bottom: 24px; color: var(--body); }
.about__text p:last-child { margin-bottom: 0; }
.about__text .about__lead {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.5;
}
.about__aside { flex: 1 1 340px; min-width: 0; }
.about__aside .label { margin-bottom: 12px; }

.rule-list {
  list-style: none;
  padding: 0;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.rule-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.rule-list--small li { padding: 10px 0; font-size: 15px; }
.rule-list strong { font-weight: 600; }
.rule-list--timeline strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
}
.rule-list--timeline span { display: block; color: var(--body); font-size: 15px; }

.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-size: 14px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

/* Contacto */
.contact-wrap { padding: 0 clamp(12px, 3vw, 32px); }
.contact {
  position: relative;
  overflow: hidden;
  max-width: 1184px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(24px, 6vw, 80px);
  background: var(--ink);
  color: var(--bg);
  border-radius: clamp(28px, 5vw, 64px);
}
.blob--contact-a {
  right: -90px; top: -110px;
  width: 360px; height: 360px;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 58% 42% 46% 54% / 46% 56% 44% 54%;
}
.blob--contact-b {
  right: 90px; bottom: -120px;
  width: 220px; height: 220px;
  background: var(--accent-soft);
  opacity: 0.12;
  border-radius: 52% 48% 44% 56% / 50% 54% 46% 50%;
}
.contact__inner { position: relative; max-width: 720px; }
.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.contact__title em { color: var(--on-dark-accent); }
.contact__lead { margin-top: 24px; max-width: 560px; font-size: 17px; color: var(--on-dark-text); }
.contact .btn { font-size: 17px; padding: 16px 32px; }
.btn--light { background: var(--bg); color: var(--ink); overflow-wrap: anywhere; }
.btn--light:hover { background: var(--accent-soft); color: var(--ink); }
.btn--ghost-light { border-color: var(--bg); color: var(--bg); }
.btn--ghost-light:hover { background: var(--bg); color: var(--ink); }
.contact :focus-visible { outline-color: var(--bg); }
.contact__place { margin-top: 20px; font-size: 14px; color: var(--on-dark-muted); }

/* Pie */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 40px;
  padding-bottom: 48px;
  font-size: 14px;
  color: var(--muted);
}

/* Pantallas pequeñas */
@media (max-width: 480px) {
  .hero__media { min-width: 0; flex-basis: 100%; max-width: 340px; }
  .hero__lead { font-size: 18px; }
  .actions .btn { flex: 1 1 auto; }
  .card__title, .service__title { font-size: 22px; }
  .service { gap: 8px 16px; }
  .service__num { flex-basis: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media (forced-colors: active) {
  .btn, .nav-toggle, .tag, .chips li { border: 1px solid; }
  .blob { display: none; }
}

@media print {
  .skip-link, .site-nav, .nav-toggle, .header-cta, .blob { display: none !important; }
  body { background: #fff; }
  .contact { background: #fff; color: var(--ink); border: 1px solid var(--line); }
  .contact__lead, .contact__place { color: var(--body); }
  .card { break-inside: avoid; }
}
