/*
Theme Name: Guardianas de las Historias
Theme URI: https://guardianasdelashistorias.com
Author: Guardianas de las Historias
Author URI: https://guardianasdelashistorias.com
Description: Tema de bloques (FSE) que replica la identidad visual "Guardianas de las Historias": estudio de diseño e ilustración editorial, estilo místico-editorial cálido y artesanal.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.6
Text Domain: guardianas-historias
*/

:root {
  --paper: #f3e9d8;
  --white: #ffffff;
  --ink: #1a1a1a;
  --teal: #1a1a1a;
  --teal-soft: #e8dcc3;
  --coral: #c0392e;
  --coral-soft: #f0dad3;
  --gold: #c0392e;
  --lavender: #8b2a20;
  --line: #ddd1bc;
  --muted: #6b6258;
  --shadow: 0 24px 70px rgba(26, 26, 26, 0.12);
}

body {
  color: var(--ink);
  background: var(--white);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(221, 209, 188, 0.78);
  backdrop-filter: blur(18px);
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--teal);
}

.brand span {
  white-space: nowrap;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.mark-book {
  fill: var(--teal-soft);
  stroke: var(--teal);
  stroke-width: 2.8;
  stroke-linejoin: round;
}

.mark-page {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.mark-star {
  fill: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 30px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

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

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 82px);
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 72px) 56px;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(243, 233, 216, 0.98) 0%, rgba(243, 233, 216, 0.84) 44%, rgba(243, 233, 216, 0.64) 100%),
    var(--paper);
}

.hero-art {
  position: absolute !important;
  right: max(-120px, -7vw);
  bottom: -120px;
  width: min(820px, 72vw);
  max-width: none;
  opacity: 0.34;
  filter: saturate(1.05);
  pointer-events: none;
  margin: 0;
}

.hero-content {
  position: relative;
  width: min(980px, 100%);
  padding-top: min(4vh, 48px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
blockquote {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.96;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  color: var(--teal);
  font-size: clamp(3.6rem, 9.5vw, 7.4rem);
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 34px;
  color: #3a342c;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Buttons ---------- */

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
  transform: translateY(-2px);
}

.button.primary,
.wp-block-button__link.has-teal-background-color {
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 14px 28px rgba(26, 26, 26, 0.22);
}

.button.secondary,
.wp-block-button__link.has-white-background-color {
  color: var(--teal);
  background: var(--white);
  border-color: var(--line);
}

/* ---------- Sections (shared) ---------- */

section,
.guardianas-section {
  padding: clamp(70px, 9vw, 120px) clamp(20px, 5vw, 72px);
}

.intro-section {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: start;
}

.intro-grid h2,
.section-heading h2,
.contact-section h2 {
  margin-bottom: 0;
  color: var(--teal);
  font-size: clamp(2.45rem, 6vw, 5rem);
}

.intro-grid p,
.contact-section p {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto clamp(32px, 5vw, 56px);
}

.section-heading h2 {
  max-width: 780px;
}

.service-grid,
.portfolio-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.service-card {
  min-height: 290px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(26, 26, 26, 0.07);
}

.service-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  place-items: center;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 50%;
  font-size: 1.15rem;
}

.service-card h3,
.timeline h3,
.portfolio-item h3 {
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 1.35rem;
  line-height: 1.2;
}

.service-card p,
.timeline p {
  margin-bottom: 0;
  color: var(--muted);
}

.process-section {
  background: linear-gradient(180deg, rgba(232, 220, 195, 0.5), rgba(243, 233, 216, 0.9));
}

.timeline {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1180px;
  margin: 0 auto;
  border-top: 1px solid rgba(26, 26, 26, 0.22);
}

.timeline-step {
  position: relative;
  padding: 34px 28px 0 0;
}

.timeline-step::before {
  position: absolute;
  top: -7px;
  left: 0;
  width: 13px;
  height: 13px;
  content: "";
  background: var(--gold);
  border: 3px solid var(--paper);
  border-radius: 50%;
}

.timeline-step span {
  display: block;
  margin-bottom: 18px;
  color: var(--coral);
  font-weight: 900;
}

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

.portfolio-item {
  display: flex;
  min-height: 360px;
  padding: 28px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--teal-soft);
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.portfolio-item span {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portfolio-item h3 {
  max-width: 310px;
  margin: 0;
  color: var(--white);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.portfolio-item.cover {
  background:
    linear-gradient(180deg, rgba(26, 26, 26, 0.1), rgba(26, 26, 26, 0.86)),
    radial-gradient(circle at 25% 22%, rgba(192, 57, 46, 0.68), transparent 28%),
    linear-gradient(135deg, #1a1a1a, #3a342c);
}

.portfolio-item.brand-system {
  background:
    linear-gradient(180deg, rgba(139, 42, 32, 0.06), rgba(26, 26, 26, 0.88)),
    radial-gradient(circle at 70% 30%, rgba(192, 57, 46, 0.72), transparent 28%),
    linear-gradient(135deg, #8b2a20, #1a1a1a);
}

.portfolio-item.campaign {
  background:
    linear-gradient(180deg, rgba(192, 57, 46, 0.08), rgba(26, 26, 26, 0.86)),
    radial-gradient(circle at 35% 25%, rgba(243, 233, 216, 0.68), transparent 30%),
    linear-gradient(135deg, #c0392e, #1a1a1a);
}

.quote-section {
  display: grid;
  min-height: 360px;
  place-items: center;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

blockquote,
.quote-section .wp-block-quote {
  max-width: 980px;
  margin: 0;
  color: var(--teal);
  font-size: clamp(2.5rem, 7vw, 6.4rem);
  text-align: center;
}

.quote-section .wp-block-quote p {
  margin: 0;
}

.contact-section {
  display: grid !important;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--teal);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(192, 57, 46, 0.22);
  border-color: var(--coral);
}

.contact-form .form-notice {
  margin: 0 0 -6px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.contact-form .form-notice.success {
  color: var(--teal);
  background: var(--teal-soft);
}

.contact-form .form-notice.error {
  color: #7f3d36;
  background: var(--coral-soft);
}

.contact-form .form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--teal);
  font-weight: 800;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 760px;
    place-items: start;
  }

  .hero-art {
    right: -160px;
    bottom: -80px;
    width: 760px;
    opacity: 0.28;
  }

  .intro-grid,
  .contact-section,
  .service-grid,
  .portfolio-grid,
  .timeline {
    grid-template-columns: 1fr !important;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline {
    gap: 28px;
    border-top: 0;
  }

  .timeline-step {
    padding: 0 0 0 32px;
    border-left: 1px solid rgba(26, 26, 26, 0.22);
  }

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

@media (max-width: 560px) {
  .brand {
    align-items: flex-start;
  }

  .brand span {
    white-space: normal;
    line-height: 1;
  }

  .hero {
    min-height: 720px;
    padding-top: 46px;
  }

  .hero-content {
    padding-top: 0;
  }

  h1 {
    font-size: clamp(3.25rem, 20vw, 5.2rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .portfolio-item {
    min-height: 290px;
  }

  .site-footer {
    flex-direction: column;
  }
}
