/* Studio 2228 — Contenido centrado y proporcionado */

:root {
  --bg: #fafafa;
  --bg-pure: #fff;
  --text: #0a0a0a;
  --text-muted: #737373;
  --accent: #0f62fe;
  --muted-line: #e5e5e5;
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --pad: clamp(1.5rem, 4vw, 3rem);
  --content-narrow: 42rem;   /* texto largo: about, proyectos, contacto */
  --content-wide: 64rem;    /* grid servicios */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Header: full width con contenido centrado en ancho lógico */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-pure);
  border-bottom: 1px solid var(--muted-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  min-height: 6rem;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  transition: min-height 0.25s ease;
}

.header.header-scrolled .header-inner {
  min-height: 5rem; /* logo 4rem + padding 0.5rem arriba/abajo */
}

.logo {
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.logo-img {
  height: 6rem;
  width: auto;
  display: block;
  object-fit: contain;
  transition: height 0.25s ease;
}

/* Logo más pequeño cuando el header está en estado "scrolled" */
.header.header-scrolled .logo-img {
  height: 4rem;
}

.header.header-scrolled .logo {
  padding: 0.5rem 0;
}

.logo-accent { color: var(--accent); }

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--text);
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: var(--bg-pure);
    border-bottom: 1px solid var(--muted-line);
    flex-direction: column;
    padding: 1rem var(--pad);
    gap: 0.75rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
}

/* Hero — centrado, ancho contenido */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(5rem, 12vw, 10rem);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(10, 10, 10, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  text-align: center;
}

.hero-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin: 0 0 1.25rem;
}

.hero-title {
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw + 1rem, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  color: var(--text);
  max-width: none;
}

.hero-title .highlight { color: var(--accent); }

.hero-desc {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.625rem 0;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn svg, .btn i { flex-shrink: 0; }

.btn-primary { color: var(--accent); }
.btn-primary:hover { color: var(--text); }

.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }

/* Secciones: contenedor centrado con max-width */
.section { padding: clamp(3rem, 8vw, 6rem) 0; }

.section-inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section-title {
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  text-align: center;
}

/* About */
.section-about { background: var(--bg-pure); }

.about-content {
  max-width: 100%;
}

.about-lead {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.about-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Servicios: más ancho y centrado */
.section-services { background: var(--bg-pure); }

.section-services .section-inner {
  max-width: var(--content-wide);
}

.section-services .section-title {
  text-align: center;
}

.services-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.service-card {
  padding: 0;
  border: none;
  background: none;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.service-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.service-icon svg,
.service-icon i {
  width: 1.25rem;
  height: 1.25rem;
}

.service-card .service-text {
  min-width: 0;
}

.service-card h3 {
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.service-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* Proyectos */
.section-projects { background: var(--bg); }

.projects-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.project-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--muted-line);
}

.project-card:first-child { padding-top: 0; }

.project-info h3 {
  font-weight: 500;
  font-size: 0.9375rem;
  margin: 0 0 0.25rem;
}

.project-info h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.project-info h3 a:hover { color: var(--accent); }

.project-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
}

.project-link svg,
.project-link i {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.project-link:hover { text-decoration: underline; }

/* Página de detalle de proyecto (caso de estudio) */
.project-detail {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 10vw, 6rem);
}

.project-detail-inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.project-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.15s ease;
}

.project-detail-back:hover { color: var(--accent); }

.project-detail-back svg,
.project-detail-back i { width: 0.875rem; height: 0.875rem; flex-shrink: 0; }

.project-detail-title {
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--text);
}

.project-detail-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.project-detail-section {
  margin-bottom: 2rem;
}

.project-detail-section h2 {
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.project-detail-section p {
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0;
  line-height: 1.65;
}

.project-detail-cta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--muted-line);
}

.project-detail-cta .btn { padding: 0.5rem 0; }

.projects-more {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

/* Contacto — centrado */
.section-contact {
  background: var(--bg-pure);
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.contact-inner .section-title {
  text-align: center;
}

.contact-content {
  text-align: center;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.contact-email svg,
.contact-email i {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.contact-email:hover { text-decoration: underline; }

.contact-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.contact-form {
  max-width: 28rem;
  margin: 0 auto 1rem;
  text-align: left;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-recaptcha {
  margin-bottom: 1rem;
}

.contact-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.contact-input {
  width: 100%;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--muted-line);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s ease;
}

.contact-input::placeholder {
  color: var(--text-muted);
}

.contact-input:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-textarea {
  resize: vertical;
  min-height: 5rem;
}

.contact-submit {
  margin-top: 0.25rem;
}

.contact-form-status {
  font-size: 0.875rem;
  margin: 0 0 1rem;
  min-height: 1.5em;
}

.contact-form-status--success {
  color: var(--accent);
}

.contact-form-status--error {
  color: #b91c1c;
}

.contact-email-line {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Footer — centrado */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--muted-line);
  background-color: var(--bg-pure);
  background-image: radial-gradient(rgba(10, 10, 10, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer-brand {
  font-weight: 500;
  font-size: 0.875rem;
  margin: 0;
  color: var(--text);
}

.footer-logo {
  height: 3rem;
  width: auto;
  display: block;
  object-fit: contain;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 640px) {
  .hero { padding: 3rem 0 4rem; }
  .section { padding: 2.5rem 0; }
}
