:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #f4f0e8;

  --text: #2f2b27;
  --muted: #6f675f;

  --line: #ddd5cc;

  --accent: #765f52;
  --accent-dark: #4f4038;
  --accent-soft: #ebe2da;

  --sage: #8f9f8b;
  --sage-dark: #657461;
  --sage-soft: #eef2ec;
  --sage-line: #cbd5c8;

  --focus: #657461;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow:
    0 14px 34px rgba(47, 43, 39, 0.07);

  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 1rem;
  line-height: 1.7;

  color: var(--text);

  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(143, 159, 139, 0.13),
      transparent 30rem
    ),
    radial-gradient(
      circle at 0% 15%,
      rgba(118, 95, 82, 0.08),
      transparent 26rem
    ),
    var(--bg);
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--sage-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;

  padding: 10px 14px;

  border-radius: var(--radius-sm);

  background: var(--text);
  color: #ffffff;

  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;

  border-bottom: 1px solid rgba(221, 213, 204, 0.85);
  background: rgba(251, 250, 247, 0.94);

  backdrop-filter: blur(14px);
}

.nav {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
  min-height: 72px;
}

.brand {
  flex: 0 0 auto;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 1.15rem;
  font-weight: 700;

  color: var(--text);

  text-decoration: none;
}

nav {
  min-width: 0;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 4px;

  margin: 0;
  padding: 0;

  list-style: none;
}

nav a {
  display: inline-flex;
  align-items: center;

  min-height: 40px;
  padding: 7px 9px;

  border-radius: 999px;

  color: var(--muted);

  font-size: 0.9rem;
  font-weight: 650;

  text-decoration: none;
  white-space: nowrap;
}

nav a:hover {
  background: var(--sage-soft);
  color: var(--sage-dark);
}

nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

main {
  width: min(calc(100% - 40px), 900px);
  margin: 0 auto;

  padding: 54px 0 80px;
}

section {
  margin-top: 72px;
}

section:first-child {
  margin-top: 0;
}

.hero {
  padding: clamp(28px, 4vw, 52px);

  border: 1px solid var(--sage-line);
  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      145deg,
      var(--surface),
      var(--sage-soft)
    );

  box-shadow: var(--shadow);
}

.hero-with-image {
  width: min(calc(100vw - 40px), var(--content));

  margin-left:
    calc(
      (
        min(
          calc(100vw - 40px),
          var(--content)
        ) - 900px
      ) / -2
    );

  display: grid;

  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(0, 0.92fr);

  gap: clamp(30px, 4vw, 54px);

  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-copy h1 {
  max-width: 11ch;

  font-size: clamp(3rem, 4.6vw, 4rem);
  line-height: 1.04;
}

.hero-media {
  min-width: 0;

  aspect-ratio: 4 / 3;

  border-radius: 18px;

  overflow: hidden;

  background: var(--sage-soft);
}

.hero-media img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: 68% center;

  border-radius: inherit;
}

/* SOBRE MÍ */
body:has(a[href="/sobre-elena.html"][aria-current="page"]) .hero-media {
  aspect-ratio: 4 / 5;
}

body:has(a[href="/sobre-elena.html"][aria-current="page"]) .hero-media img {
  object-fit: cover;
  object-position: center top;
}

/* CONTACTO */
body:has(a[href="/contacto.html"][aria-current="page"]) .hero-media {
  aspect-ratio: 4 / 5;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding: 12px;

  background:
    linear-gradient(
      180deg,
      var(--surface),
      var(--sage-soft)
    );
}

body:has(a[href="/contacto.html"][aria-current="page"]) .hero-media img {
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center bottom;

  border-radius: 14px;
}

/* ARTÍCULOS */
body:has(a[href="/articulos.html"][aria-current="page"]) .hero-media {
  aspect-ratio: 4 / 5;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px;

  background:
    linear-gradient(
      180deg,
      var(--surface),
      var(--sage-soft)
    );
}

body:has(a[href="/articulos.html"][aria-current="page"]) .hero-media img {
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;

  border-radius: 14px;
}

.eyebrow {
  margin: 0 0 12px;

  color: var(--sage-dark);

  font-size: 0.78rem;
  font-weight: 800;

  letter-spacing: 0.12em;

  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color: var(--text);

  text-wrap: balance;
}

h1 {
  margin: 0 0 22px;

  max-width: 15ch;

  font-size: clamp(2.4rem, 7vw, 4.8rem);

  font-weight: 600;
  line-height: 1.08;

  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 20px;

  max-width: 22ch;

  font-size: clamp(1.8rem, 4vw, 2.8rem);

  font-weight: 600;
  line-height: 1.2;

  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 10px;

  font-size: 1.25rem;
  line-height: 1.3;
}

p {
  max-width: 68ch;
}

.lead {
  max-width: 56ch;

  margin-bottom: 20px;

  font-size: clamp(1.08rem, 1.6vw, 1.24rem);

  line-height: 1.6;

  color: var(--muted);
}

.small {
  font-size: 0.92rem;
  color: var(--muted);
}

ul,
ol {
  max-width: 68ch;

  padding-left: 1.35rem;
}

li + li {
  margin-top: 9px;
}

.note {
  margin-top: 18px;

  padding: 24px;

  border: 1px solid var(--sage-line);
  border-radius: var(--radius-md);

  background:
    linear-gradient(
      180deg,
      var(--sage-soft),
      var(--surface)
    );

  box-shadow:
    0 8px 22px
    rgba(47, 43, 39, 0.04);
}

.note:nth-of-type(even) {
  border-color: var(--line);

  background:
    linear-gradient(
      180deg,
      var(--accent-soft),
      var(--surface)
    );
}

/* TARJETAS DE ARTÍCULOS */
body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 20px;

  align-items: stretch;
}

/* TARJETAS DE RECURSOS */
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 18px;

  align-items: stretch;
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .eyebrow,
body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > h2,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > .eyebrow,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > h2 {
  grid-column: 1 / -1;
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > h2,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > h2 {
  margin-bottom: 8px;
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > .note {
  position: relative;

  display: flex;
  flex-direction: column;

  min-width: 0;
  height: 100%;

  margin-top: 0;
  padding: 24px;

  overflow: hidden;

  border-radius: 20px;

  box-shadow:
    0 10px 28px
    rgba(47, 43, 39, 0.055);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note::before,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > .note::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 4px;

  background: var(--sage);
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note:nth-of-type(even)::before,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > .note:nth-of-type(even)::before {
  background: var(--accent);
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note:hover,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > .note:hover {
  transform: translateY(-3px);

  border-color: var(--sage);

  box-shadow:
    0 16px 36px
    rgba(47, 43, 39, 0.09);
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note h3,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > .note h3 {
  margin-bottom: 12px;

  font-size: clamp(1.22rem, 2vw, 1.48rem);
  line-height: 1.25;
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note > .eyebrow {
  margin-bottom: 10px;
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note > p:not(.eyebrow),
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > p {
  color: var(--muted);
}

body:has(a[href="/articulos.html"][aria-current="page"])
section:has(> #articulos-title):has(> .note) > .note > p:last-child,
body:has(a[href="/recursos.html"][aria-current="page"])
section:has(> #recursos-title):has(> .note) > .note > p:last-child {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 11px 20px;

  border: 2px solid var(--accent-dark);
  border-radius: 999px;

  background: var(--accent-dark);
  color: #ffffff;

  font-weight: 750;

  text-decoration: none;

  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);

  border-color: var(--sage-dark);

  background: var(--sage-dark);

  color: #ffffff;
}

.button.secondary {
  border-color: var(--sage-dark);

  background: var(--sage-soft);

  color: var(--sage-dark);
}

.button.secondary:hover {
  border-color: var(--sage-dark);

  background: var(--sage);

  color: #ffffff;
}

/* REDES SOCIALES */
.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;

  margin-top: 18px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 54px;
  height: 54px;

  padding: 0;

  border: 1px solid var(--sage-line);
  border-radius: 999px;

  background: var(--surface);
  color: var(--accent-dark);

  text-decoration: none;

  box-shadow:
    0 8px 22px
    rgba(47, 43, 39, 0.07);

  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.social-icon:hover {
  transform: translateY(-2px);

  border-color: var(--sage-dark);

  background: var(--sage-soft);
  color: var(--sage-dark);

  box-shadow:
    0 12px 26px
    rgba(47, 43, 39, 0.11);
}

.social-icon svg {
  width: 25px;
  height: 25px;

  pointer-events: none;
}

.social-cta {
  margin-top: 72px;

  padding: clamp(26px, 4vw, 38px);

  border: 1px solid var(--sage-line);
  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      145deg,
      var(--sage-soft),
      var(--surface)
    );

  box-shadow: var(--shadow);
}

.social-cta .social-links {
  margin-top: 20px;
}

.social-floating {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 90;

  display: flex;
  flex-direction: column;
  gap: 10px;

  transform: translateY(-50%);

  padding: 10px;

  border: 1px solid var(--sage-line);
  border-radius: 999px;

  background:
    rgba(251, 250, 247, 0.94);

  box-shadow:
    0 12px 32px
    rgba(47, 43, 39, 0.12);

  backdrop-filter: blur(12px);
}

.social-floating .social-icon {
  width: 48px;
  height: 48px;

  box-shadow: none;
}

.social-floating .social-icon svg {
  width: 23px;
  height: 23px;
}

input,
select,
textarea {
  width: 100%;

  min-height: 46px;

  padding: 10px 12px;

  border: 1px solid var(--line);
  border-radius: var(--radius-sm);

  background: var(--surface);

  color: var(--text);
}

textarea {
  min-height: 130px;

  resize: vertical;
}

label {
  color: var(--text);

  font-weight: 650;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);

  outline-offset: 4px;
}

footer {
  margin-top: 40px;

  border-top: 1px solid var(--sage-line);

  background:
    linear-gradient(
      180deg,
      rgba(238, 242, 236, 0.45),
      var(--surface-soft)
    );
}

.footer {
  width: min(calc(100% - 40px), var(--content));

  margin: 0 auto;

  padding: 38px 0 46px;
}

.footer p {
  margin: 7px 0;
}

.footer a {
  color: var(--accent-dark);
}

.footer a:hover {
  color: var(--sage-dark);
}

.footer .social-links {
  margin-top: 16px;
}

.footer .social-icon {
  width: 46px;
  height: 46px;

  box-shadow: none;
}

.footer .social-icon svg {
  width: 21px;
  height: 21px;
}

::selection {
  background: var(--sage);

  color: #ffffff;
}

@media(max-width:980px) {
  .hero-with-image {
    width: 100%;
    margin-left: 0;

    grid-template-columns: 1fr;

    gap: 30px;
  }

  .hero-copy h1 {
    max-width: 13ch;

    font-size:
      clamp(
        2.8rem,
        7vw,
        4rem
      );
  }

  .hero-media {
    aspect-ratio: 16 / 7;
  }

  .hero-media img {
    object-position: center;
  }

  body:has(a[href="/sobre-elena.html"][aria-current="page"]) .hero-media,
  body:has(a[href="/contacto.html"][aria-current="page"]) .hero-media,
  body:has(a[href="/articulos.html"][aria-current="page"]) .hero-media {
    aspect-ratio: 4 / 5;

    max-width: 520px;

    margin: 0 auto;
  }

  body:has(a[href="/sobre-elena.html"][aria-current="page"]) .hero-media img {
    object-position: center top;
  }

  body:has(a[href="/contacto.html"][aria-current="page"]) .hero-media img {
    object-fit: contain;

    object-position: center bottom;
  }

  body:has(a[href="/articulos.html"][aria-current="page"]) .hero-media img {
    object-fit: contain;

    object-position: center;
  }

  body:has(a[href="/recursos.html"][aria-current="page"])
  section:has(> #recursos-title):has(> .note) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media(max-width:820px) {
  .nav {
    align-items: flex-start;

    flex-direction: column;

    gap: 8px;

    padding: 14px 0;
  }

  nav {
    width: 100%;

    overflow-x: auto;

    scrollbar-width: thin;
  }

  nav ul {
    width: max-content;
  }

  main {
    padding-top: 36px;
    padding-bottom: 112px;
  }

  section {
    margin-top: 54px;
  }

  .hero-with-image {
    gap: 28px;
  }

  body:has(a[href="/articulos.html"][aria-current="page"])
  section:has(> #articulos-title):has(> .note),
  body:has(a[href="/recursos.html"][aria-current="page"])
  section:has(> #recursos-title):has(> .note) {
    grid-template-columns: 1fr;
  }

  .social-floating {
    top: auto;
    right: 50%;
    bottom: 14px;

    flex-direction: row;

    transform: translateX(50%);

    padding: 8px 10px;
  }

  .social-floating .social-icon {
    width: 46px;
    height: 46px;
  }
}

@media(max-width:560px) {
  body {
    font-size: 0.98rem;
  }

  .nav,
  main,
  .footer {
    width:
      min(
        calc(100% - 28px),
        var(--content)
      );
  }

  .hero {
    padding: 26px 22px;

    border-radius: 18px;
  }

  .hero-with-image {
    padding:
      26px
      22px
      22px;
  }

  .hero-copy h1 {
    max-width: 12ch;

    font-size:
      clamp(
        2.15rem,
        11vw,
        3.2rem
      );
  }

  .hero-media {
    aspect-ratio: 4 / 3;

    border-radius: 14px;
  }

  .hero-media img {
    object-position: center;
  }

  body:has(a[href="/sobre-elena.html"][aria-current="page"]) .hero-media,
  body:has(a[href="/contacto.html"][aria-current="page"]) .hero-media,
  body:has(a[href="/articulos.html"][aria-current="page"]) .hero-media {
    aspect-ratio: 4 / 5;

    max-width: 100%;
  }

  body:has(a[href="/sobre-elena.html"][aria-current="page"]) .hero-media img {
    object-position: center top;
  }

  body:has(a[href="/contacto.html"][aria-current="page"]) .hero-media {
    padding: 10px;
  }

  body:has(a[href="/contacto.html"][aria-current="page"]) .hero-media img {
    object-fit: contain;

    object-position: center bottom;
  }

  body:has(a[href="/articulos.html"][aria-current="page"]) .hero-media {
    padding: 10px;
  }

  body:has(a[href="/articulos.html"][aria-current="page"]) .hero-media img {
    object-fit: contain;

    object-position: center;
  }

  h1 {
    font-size:
      clamp(
        2.15rem,
        12vw,
        3.4rem
      );
  }

  h2 {
    font-size:
      clamp(
        1.65rem,
        8vw,
        2.35rem
      );
  }

  .note {
    padding: 20px;
  }

  body:has(a[href="/articulos.html"][aria-current="page"])
  section:has(> #articulos-title):has(> .note) > .note,
  body:has(a[href="/recursos.html"][aria-current="page"])
  section:has(> #recursos-title):has(> .note) > .note {
    padding: 20px;
  }

  .button {
    width: 100%;
  }

  .social-cta {
    margin-top: 54px;
    padding: 22px;
  }

  .social-links {
    gap: 10px;
  }

  .social-icon {
    width: 50px;
    height: 50px;
  }

  .social-floating {
    bottom: 10px;
  }

  .social-floating .social-icon {
    width: 44px;
    height: 44px;
  }
}

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

    transition-duration:
      0.01ms !important;

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;
  }
}