/* ==========================================================================
   Vela Coach — estilos
   Paleta y tipografía pensadas para leerse bien al sol, en el pantalán,
   desde el móvil.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Paleta */
  --color-bg: #F5F7F6;
  --color-surface: #FFFFFF;
  --color-navy: #0B2545;
  --color-navy-2: #123A63;
  --color-accent: #C68A3D;   /* latón / driza */
  --color-teal: #2F6E6E;     /* viento / agua */
  --color-danger: #B3411E;   /* bandera de señales */
  --color-border: #D7DEE2;
  --color-text: #16232F;
  --color-text-muted: #5B6B76;

  /* Tipografía */
  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaciado */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 4px 12px rgba(11, 37, 69, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-navy);
  margin: 0 0 var(--space-3);
}

h1 { font-size: clamp(28px, 7vw, 40px); }
h2 { font-size: clamp(20px, 5vw, 26px); }
h3 { font-size: 18px; text-transform: none; letter-spacing: 0; }

p { margin: 0 0 var(--space-3); }

a { color: var(--color-navy-2); }

button, input, select, textarea { font-family: inherit; font-size: 16px; }

:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
}

/* ---------- Cabecera / navegación ---------- */

.cabecera {
  background: var(--color-navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.cabecera__interior {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cabecera__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: auto;
}

.cabecera__logo img { width: 28px; height: 28px; }

.nav {
  display: flex;
  gap: var(--space-4);
}

.nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
}

.nav a.activo,
.nav a:hover {
  color: #fff;
  border-bottom-color: var(--color-accent);
}

@media (max-width: 480px) {
  .nav { gap: var(--space-3); }
  .nav a { font-size: 13px; }
}

/* ---------- Contenedor principal ---------- */

.contenedor {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
}

.cabecera-seccion {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.15s ease;
}

.boton:active { transform: translateY(1px); }

.boton--primario { background: var(--color-accent); color: #221503; }
.boton--primario:hover { background: #b57c30; }

.boton--secundario { background: var(--color-navy-2); color: #fff; }
.boton--secundario:hover { background: var(--color-navy); }

.boton--ghost {
  background: transparent;
  color: var(--color-navy-2);
  border: 1px solid var(--color-border);
}
.boton--ghost:hover { background: #fff; }

.boton--peligro { background: transparent; color: var(--color-danger); border: 1px solid rgba(179,65,30,0.35); }
.boton--peligro:hover { background: rgba(179,65,30,0.06); }

.boton--whatsapp { background: #25D366; color: #06210f; }
.boton--whatsapp:hover { background: #1fbd5a; }

.boton--bloque { width: 100%; }

/* ---------- Tarjeta de sesión (elemento distintivo) ----------
   Inspirada en un dorsal de regata: número de sesión de la temporada
   en una placa, franja lateral de color según el tipo, y una línea de
   puntada (como una costura de vela) que separa cabecera y contenido. */

.lista-sesiones {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tarjeta-sesion {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 6px solid var(--tipo-color, var(--color-teal));
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tarjeta-sesion:hover { box-shadow: 0 2px 4px rgba(11,37,69,0.08), 0 8px 20px rgba(11,37,69,0.1); }

.tarjeta-sesion__fila {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
}

.tarjeta-sesion__numero {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--tipo-color, var(--color-teal));
  min-width: 44px;
  text-align: center;
}

.tarjeta-sesion__cuerpo { flex: 1; min-width: 0; }

.tarjeta-sesion__titulo {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}

.tarjeta-sesion__meta {
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}

.tarjeta-sesion__pie {
  border-top: 1px dashed var(--color-border);
  padding: var(--space-2) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-text-muted);
  background: #FBFCFB;
}

.etiqueta {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--tipo-color, var(--color-teal)) 15%, white);
  color: var(--tipo-color, var(--color-teal));
}

/* Colores por tipo de sesión */
.tipo-entreno   { --tipo-color: var(--color-teal); }
.tipo-regata    { --tipo-color: var(--color-danger); }
.tipo-fisico    { --tipo-color: var(--color-accent); }

/* ---------- Estado vacío ---------- */

.vacio {
  text-align: center;
  padding: var(--space-7) var(--space-4);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px dashed var(--color-border);
}

.vacio h3 { color: var(--color-text); margin-bottom: var(--space-2); }

/* ---------- Formularios ---------- */

.campo { margin-bottom: var(--space-4); }

.campo label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: var(--space-2);
  color: var(--color-navy);
}

.campo input[type="text"],
.campo input[type="date"],
.campo input[type="time"],
.campo input[type="number"],
.campo select,
.campo textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
}

.campo textarea { min-height: 90px; resize: vertical; }

.campo--ayuda {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.fila-campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .fila-campos { grid-template-columns: 1fr; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.chip input { margin: 0; }

.chip:has(input:checked) {
  border-color: var(--color-teal);
  background: color-mix(in srgb, var(--color-teal) 10%, white);
  color: var(--color-teal);
  font-weight: 600;
}

.acciones-formulario {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

/* ---------- Tarjeta de ejercicio ---------- */

.tarjeta-ejercicio {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.tarjeta-ejercicio__cabecera {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.tarjeta-ejercicio__titulo { font-weight: 700; margin-bottom: 4px; }

.tarjeta-ejercicio__descripcion {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
}

/* ---------- Meteo ---------- */

.meteo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  background: #EEF3F2;
  border-radius: 999px;
  padding: 4px 10px;
}

/* ---------- Utilidades ---------- */

.oculto { display: none !important; }

.texto-muted { color: var(--color-text-muted); }

.enlace-volver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.enlace-volver:hover { color: var(--color-navy); }

/* ---------- Pie de página ---------- */

.pie {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  font-size: 12px;
  color: var(--color-text-muted);
}
