/* ===================================================================
   Sastrería IA — Landing MVP
   Paleta: azul marino, dorado suave, marfil
   =================================================================== */

:root {
  --navy:        #0f1d3a;
  --navy-700:    #16294f;
  --navy-soft:   #1d3361;
  --gold:        #c9a86a;
  --gold-soft:   #e0c790;
  --gold-text:   #97742e; /* dorado oscuro: contraste legible sobre fondos claros */
  --ivory:       #f8f5ef;
  --ivory-dark:  #efe9df;
  --ink:         #20242c;
  --ink-soft:    #555b66;
  --white:       #ffffff;
  --line:        #e4ddd0;

  --maxw: 1120px;
  --radius: 14px;
  --header-h: 69px;                       /* alto del menú fijo */
  --sec-pad: clamp(3.5rem, 8vw, 6rem);    /* padding vertical de las secciones */
  --shadow-sm: 0 1px 3px rgba(15, 29, 58, .08);
  --shadow-md: 0 12px 32px rgba(15, 29, 58, .12);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 4vw, 2.5rem);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--navy); }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); letter-spacing: -0.01em; line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

em { font-style: italic; color: var(--gold-text); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gold-text);
  margin-bottom: 0.9rem;
}
/* Sobre fondo navy el dorado claro sí tiene contraste de sobra */
.section-alt .eyebrow { color: var(--gold); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  text-align: center;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: rgba(15, 29, 58, .25);
}
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 239, .85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 9px;
  font-family: var(--serif);
  font-size: 1.1rem;
}
.brand-accent { color: var(--gold); }

.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color .2s ease;
}
.nav a:hover { color: var(--navy); }
.nav-cta {
  background: var(--navy);
  color: var(--ivory) !important;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--navy-700); }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201,168,106,.18), transparent 60%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-dark) 100%);
  padding: clamp(1rem, 2vw, 1.6rem) 0 clamp(2rem, 4vw, 3rem);
}
.hero-inner { max-width: 820px; }
.hero h1 { margin-bottom: 0.7rem; }
.hero-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 700px;
  margin-bottom: 0.4rem;
}
.hero-sub:last-of-type { margin-bottom: 0.7rem; }
.hero-promise {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: var(--ink);
  max-width: 700px;
  margin-bottom: 0.9rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--gold);
}
.hero-promise strong { color: var(--gold-text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 0.7rem; }
.hero-note { font-size: 0.9rem; color: var(--ink-soft); }

/* ===== Sections ===== */
.section { padding: var(--sec-pad) 0; }
/* Al saltar por ancla, el padding superior de la sección se cancela con el
   offset del menú: el título queda siempre a ~20px bajo el menú, en cualquier pantalla. */
section[id] { scroll-margin-top: calc(var(--header-h) + 1.25rem - var(--sec-pad)); }
.section-alt { background: var(--navy); color: var(--ivory); }
.section-alt h2, .section-alt h3 { color: var(--ivory); }
.section-head { max-width: 720px; margin-bottom: 2.8rem; }

/* ===== Cards (problema) ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.3rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  font-size: 1.6rem;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--ivory);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.96rem; }

/* ===== Steps (proceso) ===== */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.6rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}
.step-num {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.6rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: rgba(248,245,239,.78); font-size: 0.96rem; }

/* ===== Sectores ===== */
.sectors {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.sectors li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.sectors-note { color: var(--ink-soft); max-width: 640px; }

/* Bloque "quién está detrás" */
.founder {
  display: flex;
  align-items: flex-start;
  gap: 1.3rem;
  margin-top: 2.2rem;
  padding: 1.5rem 1.7rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-width: 680px;
}
.founder-photo {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  object-fit: cover;
  font-family: var(--serif);
  font-size: 1.8rem;
}
.founder-text { font-size: 0.95rem; color: var(--ink-soft); }
.founder-text p + p { margin-top: 0.7rem; }
.founder-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.1rem;
}
.founder-role { color: var(--gold-text); font-weight: 600; margin-bottom: 0.6rem; }

/* ===== Contacto ===== */
.section-contact {
  background:
    radial-gradient(900px 400px at 15% 110%, rgba(201,168,106,.16), transparent 60%),
    var(--ivory-dark);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-copy { padding-top: 0.5rem; }
.contact-copy h2 { margin-bottom: 1rem; }
.contact-copy p { color: var(--ink-soft); margin-bottom: 1.4rem; }
.contact-points { list-style: none; display: grid; gap: 0.6rem; }
.contact-points li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink);
  font-weight: 500;
}
.contact-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold-text);
  font-weight: 700;
}
.contact-direct {
  margin-top: 1.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.contact-direct a { color: var(--navy); font-weight: 600; text-decoration: none; }
.contact-direct a:hover { text-decoration: underline; }

/* ===== Form ===== */
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--ivory);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,168,106,.22);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input.invalid,
.field textarea.invalid { border-color: #c0492f; background: #fdf3f1; }

.error {
  display: block;
  color: #c0492f;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  min-height: 1em;
}

/* Consentimiento RGPD */
.consent { margin-top: 0.4rem; }
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent-label input { width: auto; margin-top: 0.15rem; flex: 0 0 auto; accent-color: var(--navy); }
.consent-label a { color: var(--navy); font-weight: 600; }

/* Honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}
.form-status.ok { color: #1d7a4d; }
.form-status.ko { color: #c0492f; }
.form-legal {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy);
  color: var(--ivory);
  padding: 3rem 0 2.4rem;
}
.footer-inner { display: grid; gap: 0.8rem; justify-items: center; text-align: center; }
.site-footer .brand { color: var(--ivory); }
.footer-tag { color: rgba(248,245,239,.7); max-width: 440px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; }
.footer-links a {
  color: var(--gold-soft);
  font-size: 0.9rem;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-copy { color: rgba(248,245,239,.5); font-size: 0.85rem; }

/* ===== Página legal ===== */
.legal { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.legal-inner { max-width: 760px; }
.legal-inner h1 { margin-bottom: 1.5rem; }
.legal-inner h2 { font-size: 1.2rem; margin: 1.8rem 0 0.5rem; }
.legal-inner p { color: var(--ink-soft); margin-bottom: 0.6rem; }
.legal-inner a:not(.btn) { color: var(--navy); }
.legal-links { font-size: 0.92rem; margin-top: 2rem; }
.legal-update { font-size: 0.85rem; margin: 0.6rem 0 1.2rem; color: var(--ink-soft); }

/* ===== Botón flotante de WhatsApp ===== */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(15, 29, 58, .28);
  z-index: 60;
  transition: transform .15s ease, box-shadow .15s ease;
}
.wa-float:hover { transform: scale(1.07); box-shadow: 0 10px 24px rgba(15, 29, 58, .34); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav { gap: 0.9rem; }
  .nav a:not(.nav-cta) { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}

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