/* ST Club landing site styles.
   Source of truth for tokens: docs/design/visual-design-system.md §1/§2/§3.
   Page structure/copy source: docs/design/st-club-landing.md.
   This file is a self-hosted, standalone copy (site/ has no shared build with frontend/) —
   values below are copied verbatim from the design system, never re-invented. */

/* ---- Fonts (self-hosted, latin subset — covers Spanish diacritics) ---- */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens (copied verbatim from visual-design-system.md §1/§2) ---- */
:root {
  color-scheme: light;

  /* Brand accent (teal ramp) */
  --accent-50: #eaf7f3;
  --accent-100: #cfede6;
  --accent-200: #a3ddd1;
  --accent-500: #17a78e;
  --accent-600: #0d8069;
  --accent-700: #0a6152;

  /* Neutral surfaces */
  --surface-0: #fafaf8;
  --surface-1: #ffffff;
  --border: #e2e1dc;

  /* Text */
  --text-strong: #26282b;
  --text-body: #3c4043;
  --text-muted: #5f6368;
  --text-on-accent: #ffffff;

  /* New pair this page introduces — flagged (see design spec §3): first dark-surface usage,
     not yet promoted into visual-design-system.md §1. */
  --footer-bg: var(--text-strong);
  --footer-text: #ffffff;
  --footer-text-muted: #c9cbce;

  /* Focus */
  --focus-ring: var(--accent-500);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Typography */
  --font-heading: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-display: 2.25rem;
  --lh-display: 1.1;
  --text-h1: 1.5rem;
  --lh-h1: 1.25;
  --text-h2: 1.25rem;
  --lh-h2: 1.3;
  --text-h3: 1.05rem;
  --lh-h3: 1.35;
  --text-base: 1rem;
  --lh-base: 1.5;
  --text-sm: 0.875rem;
  --lh-sm: 1.45;
  --text-xs: 0.75rem;
  --lh-xs: 1;

  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --dur-fast: 120ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--surface-0);
  font-size: var(--text-base);
  line-height: var(--lh-base);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--text-strong);
  margin: 0;
}

p {
  margin: 0;
}

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

/* ---- <picture> wrapper: unwrap so layout/sizing rules that target the img (flex/grid
   fill, object-fit) pass through the wrapper. display:contents is deliberately avoided: it
   promotes the <source> children to grid items too, which claimed grid columns in .photo-row
   and stacked the photos. ---- */
picture {
  display: block;
  width: 100%;
  height: 100%;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 100;
  background: var(--accent-600);
  color: var(--text-on-accent);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-3);
}

/* ---- Focus-visible ---- */
a:focus-visible,
button:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}

.btn-primary {
  background: var(--accent-600);
  color: var(--text-on-accent);
}

.btn-primary:hover {
  background: var(--accent-700);
}

/* ---- Mailto fallback line (hero, CTA banner) ---- */
.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.cta-fallback {
  font-size: var(--text-sm);
  line-height: var(--lh-sm);
  color: var(--text-muted);
  text-align: center;
}

.cta-fallback a {
  color: var(--accent-700);
  text-decoration: underline;
}

/* ---- Inline mailto links: enlarge tap target without shifting text position ---- */
.mailto-inline {
  display: inline-block;
  padding-block: var(--space-3);
  margin-block: calc(var(--space-3) * -1);
}

/* ---- Layout container ---- */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* ---- Section headings (h2) — covers landing sections and .legal__section (nested in main.section) ---- */
.section h2 {
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
}

/* ---- Section rhythm (0 sibling margin; padding-block only, per spec) ---- */
.section {
  padding-block: var(--space-6);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-8);
  }

  .container {
    padding-inline: var(--space-6);
  }
}

/* ---- Header ---- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}

@media (min-width: 768px) {
  .site-header {
    padding: var(--space-4) var(--space-5);
  }
}

.site-header__brand img {
  height: 32px;
  width: auto;
}

@media (min-width: 768px) {
  .site-header__brand img {
    height: 40px;
  }
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav {
  display: none;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
    gap: var(--space-5);
  }
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-body);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent-700);
}

.site-header .btn {
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
}

/* ---- Back link (aviso legal) ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent-700);
  font-weight: 600;
  text-decoration: underline;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  max-width: 700px;
  margin-inline: auto;
  position: relative;
}

.hero__decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__shape {
  position: absolute;
  border-radius: var(--radius-lg);
}

.hero__shape--1 {
  width: 220px;
  height: 220px;
  background: var(--accent-100);
  opacity: 0.5;
  top: -40px;
  left: 5%;
}

.hero__shape--2 {
  width: 160px;
  height: 160px;
  background: var(--accent-200);
  opacity: 0.5;
  bottom: -20px;
  right: 5%;
}

.hero__badge img {
  width: 72px;
  height: 72px;
}

@media (min-width: 768px) {
  .hero__badge img {
    width: 96px;
    height: 96px;
  }
}

.hero__title {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: var(--text-display);
    line-height: var(--lh-display);
    font-weight: 800;
  }
}

.hero__sub {
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--text-body);
}

/* ---- Producto section (Qué es + feature tour) ---- */
.producto__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  max-width: 700px;
  margin-inline: auto;
}

/* Gaps between the "Qué es" block, the tour's own H2, and the rows below are not
   individually stated in the design spec's Feature tour subsection — falls back to the spec's
   own stated default rhythm recipe (gap:var(--space-4)) per the binding vertical-rhythm rule. */
.producto__tour {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.tour-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
}

@media (min-width: 768px) {
  .tour-rows {
    gap: var(--space-7);
  }
}

.tour-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .tour-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-6);
  }

  .tour-row--reverse .tour-row__panel {
    order: 2;
  }

  .tour-row--reverse .tour-row__text {
    order: 1;
  }
}

.tour-row__panel {
  position: relative;
  background: var(--accent-50);
  border: 1px solid var(--accent-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .tour-row__panel {
    height: 180px;
  }
}

.tour-row__photo {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.tour-row__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tour-row__text h3 {
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
  font-weight: 700;
}

.tour-row__text p {
  color: var(--text-body);
}

/* ---- Para quién ---- */
.para-quien__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chips-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

@media (min-width: 768px) {
  .chips-row {
    flex-direction: row;
    gap: var(--space-4);
  }
}

.chip {
  display: block;
  flex: 1;
  background: var(--accent-50);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  padding: var(--space-4);
  text-align: center;
  font-weight: 700;
  font-size: var(--text-base);
}

.photo-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

@media (min-width: 768px) {
  .photo-row {
    grid-template-columns: 1fr 1fr;
  }
}

.photo-row__img {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* ---- Nosotros ---- */
.nosotros__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .nosotros__grid {
    display: grid;
    grid-template-columns: 1fr 0.6fr;
    gap: var(--space-5);
    align-items: center;
  }
}

.nosotros__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nosotros__photo {
  border-radius: var(--radius-lg);
  object-fit: cover;
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .nosotros__photo {
    max-width: 480px;
  }
}

/* ---- Contacto (CTA banner) ---- */
.cta-banner {
  background: var(--accent-50);
  text-align: center;
}

.cta-banner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 600px;
  margin-inline: auto;
}

.cta-banner__inner > p {
  margin-top: var(--space-3);
}

.cta-banner .cta-group {
  margin-top: var(--space-5);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--space-5) var(--space-4);
}

@media (min-width: 768px) {
  .site-footer {
    padding: var(--space-6) var(--space-5);
  }
}

.site-footer__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .site-footer__row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--footer-text);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}

.site-footer__links a {
  color: var(--footer-text);
  text-decoration: underline;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer__meta {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-footer__meta p {
  font-size: var(--text-xs);
  line-height: var(--lh-xs);
  color: var(--footer-text-muted);
  margin: 0;
}

/* ---- Aviso Legal page ---- */
.legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 700px;
}

.legal__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.legal__rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.legal__rows p {
  margin: 0;
}

.legal h1 {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
}
