/* ============================================================
   NUR CLINIC — Design system
   Medical aesthetics. Editorial, premium, warm.
   ------------------------------------------------------------
   HOW TO MODIFY:
   1. Change colors / fonts / spacing in the tokens below.
   2. Each section of the page has its own labelled block.
   3. `.reveal` elements fade in on scroll (js/main.js).
   ============================================================ */

/* ============================================================
   Fuentes autoalojadas (sin petición a fonts.googleapis.com)
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-400.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-400-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --brand: #ff8a26;
  --brand-deep: #f0650f;
  --brand-soft: #ffe9d6;

  /* Surfaces */
  --ink: #211a13;
  --ink-strong: #211a13;
  --cream: #faf5ee;
  --cream-deep: #f1e9dd;
  --card: #fffdf8;
  --line: rgba(33, 26, 19, 0.12);
  --line-soft: rgba(33, 26, 19, 0.07);

  /* Text */
  --text: #3d352c;
  --muted: #7c7166;
  --on-dark: #f6efe6;
  --on-dark-muted: rgba(246, 239, 230, 0.66);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape & depth */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 12px rgba(33, 26, 19, 0.06);
  --shadow-md: 0 20px 50px rgba(33, 26, 19, 0.12);
  --shadow-brand: 0 14px 34px rgba(255, 138, 38, 0.35);

  /* Layout */
  --container: 1200px;
  --gutter: 24px;
  --section: clamp(72px, 9vw, 130px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.35s;
}

/* ---------- Dark mode ---------- */

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #0f0c08;
  --ink-strong: #f2e8d6;
  --cream: #1a1610;
  --cream-deep: #1f1912;
  --card: #251e16;
  --text: #e7dcc8;
  --muted: #ab9c85;
  --brand-soft: rgba(255, 138, 38, 0.16);
  --line: rgba(238, 219, 189, 0.13);
  --line-soft: rgba(238, 219, 189, 0.07);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-brand: 0 14px 34px rgba(255, 138, 38, 0.22);
}

/* ---------- Reset ---------- */

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

/* Utilidad de accesibilidad: texto solo para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: page-in 0.5s var(--ease) both;
}

body.is-leaving {
  animation: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  body.is-leaving {
    transition: none;
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink-strong);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.45em;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* ---------- Layout ---------- */

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section--tint {
  background: var(--cream-deep);
}

.section--dark {
  background: var(--ink);
  color: var(--on-dark-muted);
}

.section--dark h2 {
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brand);
}

.section--dark .eyebrow {
  color: var(--brand);
}

.title {
  max-width: 20ch;
  margin-bottom: 22px;
}

.lead {
  max-width: 58ch;
  font-size: 1.12rem;
  color: var(--muted);
}

.center {
  text-align: center;
}

.center .title,
.center .lead {
  margin-inline: auto;
}

.center .eyebrow {
  justify-content: center;
}

.center .eyebrow::before,
.center .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brand);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
    background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:disabled,
.btn--primary:disabled {
  background: var(--line);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform var(--speed) var(--ease);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn--primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
  box-shadow: 0 20px 40px rgba(255, 138, 38, 0.45);
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: #2e251b;
}

.btn--ghost {
  background: transparent;
  color: var(--ink-strong);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--ink-strong);
}

.btn--light {
  background: #fff;
  color: var(--ink-strong);
}

.btn--light:hover {
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.btn--ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--ghost-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--speed), border-color var(--speed), box-shadow var(--speed);
}

.site-header.is-scrolled {
  background: rgba(250, 245, 238, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: rgba(33, 26, 19, 0.08);
  box-shadow: 0 10px 30px rgba(33, 26, 19, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 16px;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--speed);
}

.nav__logo:hover {
  transform: scale(1.03);
}

.nav__logo img {
  height: 40px;
  width: auto;
}

.nav__links {
  display: flex;
  margin-inline: auto;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(33, 26, 19, 0.06);
  border-radius: var(--radius-pill);
  padding: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-strong);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background var(--speed), color var(--speed), transform var(--speed);
}

.nav__links a svg {
  color: var(--brand);
  opacity: 0.85;
  transition: transform var(--speed), opacity var(--speed);
  flex-shrink: 0;
}

.nav__links a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.nav__links a:hover svg {
  transform: translateY(-1px);
  opacity: 1;
}

.nav__links a.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 138, 38, 0.35);
}

.nav__links a.is-active svg {
  color: #fff;
  opacity: 1;
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav__cta-btn {
  padding: 12px 22px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.nav__cta-btn svg {
  transition: none;
}

.nav__cta-btn:hover svg {
  transform: none;
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform var(--speed), opacity var(--speed);
}

@media (max-width: 1240px) {
  .nav {
    gap: 12px;
  }

  .nav__links {
    gap: 0;
    padding: 4px;
  }

  .nav__links a {
    padding: 8px 9px;
    font-size: 0.8rem;
    gap: 5px;
  }

  .nav__cta {
    gap: 8px;
  }
}

@media (max-width: 1040px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    gap: 4px;
    background: rgba(250, 245, 238, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--shadow-md);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: 14px 16px;
    font-size: 1rem;
  }

  body.nav-open .nav__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-open .nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

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

.hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 110px);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__eyebrow {
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 1.03;
  margin-bottom: 24px;
}

.hero__title em {
  font-style: italic;
  color: var(--brand-deep);
}

.hero__lead {
  font-size: 1.18rem;
  max-width: 46ch;
  margin-bottom: 32px;
}

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

/* Layered media composition (natural image ratios, no cropping) */

.hero__media {
  position: relative;
  padding-top: clamp(48px, 6vw, 76px);
}

.hero__blob {
  position: absolute;
  z-index: 0;
  left: -8%;
  bottom: -6%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 38, 0.32), transparent 65%);
  filter: blur(24px);
}

.hero__frame--back {
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transform: rotate(-2.5deg);
  z-index: 1;
  opacity: 0.95;
}

.hero__frame--main {
  position: relative;
  z-index: 2;
  width: 92%;
  margin: clamp(36px, 5vw, 60px) 0 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero__frame img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__frame--main img {
  aspect-ratio: 1200 / 540;
  object-fit: cover;
}

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

  .hero__text {
    text-align: center;
  }

  .hero__lead {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__media {
    padding-top: 0;
  }

  .hero__frame--main {
    width: 100%;
    margin: 0;
  }

  .hero__frame--main img {
    aspect-ratio: 936 / 780;
  }

  .hero__frame--back {
    display: none;
  }

  .hero__blob {
    left: -10%;
    width: 55%;
  }
}

/* ---------- Team ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
  text-align: center;
}

.member__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(45deg, var(--cream-deep) 0 12px, #efe5d4 12px 24px);
  border: 2px dashed rgba(33, 26, 19, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  overflow: hidden;
  margin-bottom: 18px;
}

.member__photo svg {
  width: 46px;
  height: 46px;
  opacity: 0.6;
}

.member__photo span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.member__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member__name {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.member__role {
  margin: 0;
  font-size: 0.92rem;
  color: var(--brand-deep);
  font-weight: 600;
}

/* ---------- Marquee ---------- */

.marquee {
  background: var(--ink);
  overflow: hidden;
  padding-block: 20px;
  position: relative;
  z-index: 2;
}

.marquee__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: #f8f1e6;
  white-space: nowrap;
  padding-right: 2.2rem;
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
}

.marquee__track span::after {
  content: "✦";
  color: var(--brand);
  font-size: 0.8em;
  font-style: normal;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.stat {
  padding: 10px 8px;
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--ink-strong);
}

.stat__num sup {
  font-size: 0.45em;
  color: var(--brand-deep);
  margin-left: 2px;
}

.stat__label {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 22ch;
}

.treatments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.tcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--speed) var(--ease), border-color var(--speed), box-shadow var(--speed);
}

.tcard:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 138, 38, 0.5);
  box-shadow: var(--shadow-md);
}

.tcard__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-deep);
}

.tcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.tcard:hover .tcard__media img {
  transform: scale(1.06);
}

.tcard__num {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(250, 245, 238, 0.92);
  backdrop-filter: blur(4px);
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}

.tcard__body {
  padding: 16px 18px 20px;
}

.tcard__body h3 {
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.tcard__body p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Home: service cards with inline carousel ---------- */

.svc-list {
  display: grid;
  gap: 28px;
}

.svc {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 48px);
  transition: border-color var(--speed), box-shadow var(--speed), transform var(--speed) var(--ease);
}

.svc:hover {
  border-color: rgba(255, 138, 38, 0.45);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.svc__num {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.svc__title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 12px;
}

.svc__desc {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 42ch;
}

.svc__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--brand-deep);
}

.svc__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--speed) var(--ease);
}

.svc__link:hover svg {
  transform: translateX(4px);
}

.svc-carousel {
  position: relative;
  min-width: 0;
}

.svc-carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.svc-carousel__track::-webkit-scrollbar {
  display: none;
}

.svc-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  height: clamp(190px, 22vw, 300px);
}

.svc-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}

.svc-slide:hover img {
  transform: scale(1.05);
}

.svc-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--ink-strong);
  transition: color var(--speed), border-color var(--speed), background var(--speed);
}

.svc-carousel__btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.svc-carousel__btn svg {
  width: 17px;
  height: 17px;
}

.svc-carousel__btn--prev {
  left: 12px;
}

.svc-carousel__btn--next {
  right: 12px;
}

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

/* ---------- Feature split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__list {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

.split__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.split__item .dot {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
}

.split__item .dot svg {
  width: 13px;
  height: 13px;
  stroke: var(--brand-deep);
}

.split__item h3 {
  font-size: 1.05rem;
  margin-bottom: 3px;
}

.split__item p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
}

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

  .split__media {
    order: -1;
  }
}

/* ---------- CTA band ---------- */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(72px, 10vw, 120px);
}

.cta .glow {
  position: absolute;
  inset: -30% -10% auto 50%;
  transform: translateX(-50%);
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 138, 38, 0.5), transparent 60%);
  filter: blur(60px);
  border-radius: 50%;
  pointer-events: none;
}

.cta h2 {
  max-width: 18ch;
  margin-inline: auto;
  position: relative;
}

.cta p {
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 34px;
  position: relative;
}

.cta .hero__actions {
  justify-content: center;
  position: relative;
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  padding-block: clamp(56px, 8vw, 100px) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf8, var(--cream));
}

.page-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  max-width: 18ch;
  margin-bottom: 18px;
}

.page-hero .lead {
  font-size: 1.08rem;
}

html[data-theme="dark"] .page-hero {
  background: linear-gradient(180deg, var(--card), var(--cream));
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 14px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) var(--ease), border-color var(--speed), box-shadow var(--speed);
}

.contact-row:hover {
  transform: translateX(6px);
  border-color: rgba(255, 138, 38, 0.45);
  box-shadow: var(--shadow-md);
}

.contact-row__icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
}

.contact-row__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--brand-deep);
}

.contact-row h3 {
  font-size: 1.12rem;
  margin-bottom: 4px;
}

.contact-row p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
}

.contact-row a {
  font-weight: 700;
}

.contact-row a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-row--link {
  color: var(--ink-strong);
  text-decoration: none;
}

.contact-row--link:hover {
  color: var(--ink-strong);
  text-decoration: none;
}

.contact-row--link p {
  color: var(--text);
  font-weight: 500;
  margin-top: 3px;
}

.contact-row__arrow {
  margin-left: auto;
  flex: none;
  width: 22px;
  height: 22px;
  stroke: var(--brand-deep);
  opacity: 0.55;
  transition: opacity var(--speed), transform var(--speed);
}

.contact-row--link:hover .contact-row__arrow {
  opacity: 1;
  transform: translateX(3px);
}

.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 6px;
}

.form label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-strong);
  margin-top: 10px;
}

.form input,
.form textarea {
  font: inherit;
  color: var(--ink-strong);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color var(--speed), background var(--speed), box-shadow var(--speed);
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.form .btn {
  justify-self: start;
  margin-top: 18px;
}

.form-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--brand-deep);
  font-weight: 700;
}

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

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

.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding-top: 70px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 44px;
  padding-bottom: 52px;
}

.footer-grid h3 {
  font-family: var(--font-body);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-grid a {
  color: var(--on-dark-muted);
  display: block;
  padding: 4px 0;
  transition: color var(--speed), padding var(--speed);
}

.footer-grid a:hover {
  color: var(--brand);
  padding-left: 4px;
}

.footer-brand img {
  height: 38px;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 30ch;
}

.footer-contact li {
  display: flex;
  gap: 10px;
  padding: 3px 0;
}

.footer-contact a {
  display: inline;
}

.footer-bottom {
  border-top: 1px solid rgba(246, 239, 230, 0.12);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--on-dark-muted);
}

.footer-bottom a:hover {
  color: var(--brand);
}

.footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(246, 239, 230, 0.22);
  border-radius: 50%;
  color: var(--on-dark-muted);
  transition: color var(--speed), border-color var(--speed), background var(--speed);
}

.footer-social__link:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: rgba(246, 239, 230, 0.06);
}

.footer-social--light .footer-social__link {
  color: var(--text-muted);
  border-color: var(--line);
}

.footer-social--light .footer-social__link:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.social-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-align: left;
  transition: transform var(--speed) var(--ease), border-color var(--speed), box-shadow var(--speed);
}

.social-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 138, 38, 0.45);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.social-card__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  color: var(--brand-deep);
}

.social-card__icon svg {
  width: 24px;
  height: 24px;
}

.social-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-card__body strong {
  font-size: 1.05rem;
}

.social-card__body small {
  color: var(--text-muted);
}

.social-card__arrow {
  margin-left: auto;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--speed) var(--ease), color var(--speed);
}

.social-card:hover .social-card__arrow {
  transform: translateX(4px);
  color: var(--brand);
}

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

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

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
}

/* ---------- Legal ---------- */

.legal {
  max-width: 780px;
}

.legal h2 {
  font-size: 1.35rem;
  margin-top: 1.6em;
}

.legal p,
.legal li {
  font-size: 0.95rem;
}

.legal ul {
  list-style: disc;
  padding-left: 1.2em;
  margin-bottom: 1em;
}

/* ---------- Reveal animation ---------- */

/* El hero (portada y páginas interiores) se muestra al instante,
   sin esperar a JS ni a la animación (mejora FCP/LCP). */
html.js .hero .reveal,
html.js .page-hero .reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee__track {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
  }
}

/* ---------- Utilities ---------- */

.mt-1 {
  margin-top: 18px;
}

.mt-2 {
  margin-top: 40px;
}

.mt-3 {
  margin-top: 60px;
}

/* ---------- Dark mode: ajustes puntuales ---------- */

html[data-theme="dark"] .btn--light {
  color: var(--ink);
}

html[data-theme="dark"] .nav__toggle span {
  background: var(--ink-strong);
}

html[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(26, 22, 16, 0.78);
  border-bottom-color: rgba(238, 219, 189, 0.1);
}

html[data-theme="dark"] .nav__links {
  background: rgba(238, 219, 189, 0.07);
  border-color: rgba(238, 219, 189, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .nav__links a:hover {
  background: rgba(238, 219, 189, 0.1);
  color: var(--brand);
}

html[data-theme="dark"] .nav__links.is-open {
  background: rgba(26, 22, 16, 0.96);
  border-color: var(--line);
}

html[data-theme="dark"] .tcard__num {
  background: rgba(26, 22, 16, 0.9);
}

html[data-theme="dark"] .svc-carousel__btn {
  background: var(--card);
}

html[data-theme="dark"] .form input:focus,
html[data-theme="dark"] .form textarea:focus {
  background: var(--card);
}

html[data-theme="dark"] .member__photo {
  background: repeating-linear-gradient(45deg, var(--cream-deep) 0 12px, #2b231a 12px 24px);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- Theme switch ---------- */

.theme-switch {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream-deep);
  box-shadow: inset 0 1px 3px rgba(33, 26, 19, 0.08);
  cursor: pointer;
  padding: 0;
  transition: border-color var(--speed), background var(--speed), box-shadow var(--speed);
}

.theme-switch:hover {
  border-color: var(--brand);
}

.theme-switch__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  color: var(--brand);
  z-index: 1;
}

.theme-switch__icon--sun {
  left: 35px;
}

.theme-switch__icon--moon {
  left: 7px;
  color: var(--muted);
}

html[data-theme="dark"] .theme-switch__icon--moon {
  color: var(--brand);
}

html[data-theme="dark"] .theme-switch__icon--sun {
  color: var(--muted);
}

.theme-switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(33, 26, 19, 0.22);
  transition: transform var(--speed) var(--ease), background var(--speed), box-shadow var(--speed);
  z-index: 2;
}

html[data-theme="dark"] .theme-switch__knob {
  transform: translateX(28px);
  background: var(--brand);
  box-shadow: 0 2px 8px rgba(255, 138, 38, 0.4);
}

html[data-theme="dark"] .theme-switch {
  background: rgba(238, 219, 189, 0.07);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}