/*
Theme Name: Taller Baixo Miño
Author: Electromecánica Baixo Miño
Description: Tema de bloques a medida para Electromecánica Baixo Miño (Tui). Landing de una página con servicios, contacto y botón de WhatsApp. Tipografía Archivo autoalojada, sin dependencias externas.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tallerbaixomino
*/

/* ---------- Tipografía autoalojada (RGPD-friendly, sin Google Fonts) ---------- */
@font-face {
  font-family: "Archivo Variable";
  src: url("assets/fonts/archivo-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --tbm-ink: #0d1b24;      /* azul cárter, casi negro */
  --tbm-ink-2: #13242f;
  --tbm-amber: #ffb400;    /* ámbar de señal */
  --tbm-amber-dark: #e5a200;
  --tbm-steel: #55636d;    /* texto secundario */
  --tbm-line: #dce2e0;     /* bordes finos */
  --tbm-mist: #eff2f1;     /* fondo claro */
  --tbm-on-ink: #c7d2d8;   /* texto claro sobre ink */
  --tbm-wa: #25d366;
  --tbm-stripe: repeating-linear-gradient(
    135deg,
    var(--tbm-amber) 0 14px,
    var(--tbm-ink) 14px 28px
  );
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

::selection { background: var(--tbm-amber); color: var(--tbm-ink); }

a:focus-visible,
.wp-block-button__link:focus-visible,
.tbm-wa:focus-visible {
  outline: 3px solid var(--tbm-amber);
  outline-offset: 2px;
}

/* ---------- Barra superior ---------- */
.tbm-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #fff;
  border-bottom: 1px solid var(--tbm-line);
  padding: 0.75rem 1.25rem;
}

.tbm-topbar-row { align-items: center; }

.tbm-brand,
.tbm-brand a {
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.02rem;
  text-decoration: none;
  color: var(--tbm-ink);
}

.tbm-topbar-actions { align-items: center; gap: 1.25rem; }

.tbm-topbar-tel { font-size: 0.95rem; margin: 0; }
.tbm-topbar-tel a {
  color: var(--tbm-ink);
  text-decoration: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tbm-topbar-tel a:hover { color: var(--tbm-amber-dark); }

.tbm-topbar .wp-block-button__link { padding: 0.55rem 1.1rem; font-size: 0.92rem; }

@media (max-width: 640px) {
  .tbm-topbar-tel { display: none; }
}

/* ---------- Botones ---------- */
.wp-block-button__link { transition: background-color 0.15s ease, transform 0.15s ease; }

.tbm-btn-ghost .wp-block-button__link {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.tbm-btn-ghost .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ---------- Hero ---------- */
.tbm-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--tbm-ink);
  background-image: radial-gradient(
    ellipse 90rem 40rem at 15% -10%,
    rgba(255, 180, 0, 0.09),
    transparent 55%
  );
  color: #fff;
  padding: clamp(4.5rem, 9vw, 7.5rem) 1.25rem clamp(5rem, 10vw, 8rem);
}

.tbm-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 10px;
  background: var(--tbm-stripe);
}

.tbm-kicker {
  color: var(--tbm-amber);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0 0 1.1rem;
}

.tbm-h1 {
  font-size: clamp(2.35rem, 5.6vw, 4.1rem);
  font-weight: 800;
  font-stretch: 116%;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 21ch;
}

.tbm-lead {
  color: var(--tbm-on-ink);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  max-width: 54ch;
  margin: 0 0 2rem;
}

.tbm-hero-cta { gap: 0.9rem; }

.tbm-hero-note {
  color: var(--tbm-steel);
  color: rgba(199, 210, 216, 0.75);
  font-size: 0.92rem;
  margin-top: 1.75rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Secciones ---------- */
.tbm-section { padding: clamp(3.5rem, 7vw, 5.5rem) 1.25rem; }

.tbm-h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

.tbm-section-intro {
  color: var(--tbm-steel);
  max-width: 60ch;
  margin: 0 0 2.5rem;
}

/* ---------- Servicios ---------- */
.tbm-servicios { background: var(--tbm-mist); }

.tbm-cards { margin-top: 0; margin-bottom: 2rem; gap: 1.25rem; }
.tbm-cards:last-child { margin-bottom: 0; }

.tbm-card {
  background: #fff;
  border: 1px solid var(--tbm-line);
  border-radius: 10px;
  padding: 1.6rem 1.5rem 1.5rem;
  height: 100%;
}

.tbm-card::before {
  content: "";
  display: block;
  width: 28px;
  height: 5px;
  background: var(--tbm-amber);
  border-radius: 2px;
  margin-bottom: 1.1rem;
}

.tbm-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.tbm-card p {
  color: var(--tbm-steel);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .tbm-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
  .tbm-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(13, 27, 36, 0.08);
  }
}

/* ---------- Franja "por qué nosotros" ---------- */
.tbm-why {
  background: var(--tbm-ink);
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 1.25rem;
}

.tbm-why h3 {
  color: var(--tbm-amber);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.6rem;
}

.tbm-why p {
  color: var(--tbm-on-ink);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Contacto ---------- */
.tbm-dato {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  border-bottom: 1px dashed var(--tbm-line);
  padding: 0.7rem 0;
  margin: 0;
  font-size: 0.98rem;
}

.tbm-dato strong {
  color: var(--tbm-steel);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  align-self: center;
}

.tbm-dato a { color: var(--tbm-ink); font-weight: 600; }
.tbm-dato a:hover { color: var(--tbm-amber-dark); }

.tbm-contacto .tbm-hero-cta { margin-top: 1.75rem; }

.tbm-map { height: 100%; }
.tbm-map iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 1px solid var(--tbm-line);
  border-radius: 10px;
  display: block;
}

/* ---------- Pie ---------- */
.tbm-footer {
  background-color: var(--tbm-ink);
  background-image: var(--tbm-stripe);
  background-size: 100% 10px;
  background-repeat: no-repeat;
  background-position: top;
  color: var(--tbm-on-ink);
  padding: calc(10px + 3rem) 1.25rem 2.5rem;
  font-size: 0.92rem;
}

.tbm-footer-row { align-items: flex-start; gap: 2rem; }

.tbm-footer .tbm-brand,
.tbm-footer .tbm-brand a { color: #fff; }

.tbm-footer p { margin: 0.35rem 0 0; }

.tbm-footer a { color: var(--tbm-on-ink); }
.tbm-footer a:hover { color: var(--tbm-amber); }

.tbm-footer-legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85rem; color: rgba(199, 210, 216, 0.7); }

/* ---------- Botón flotante de WhatsApp ---------- */
.tbm-wa {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tbm-wa);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(13, 27, 36, 0.28);
}

.tbm-wa svg { width: 30px; height: 30px; fill: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .tbm-wa { transition: transform 0.15s ease; }
  .tbm-wa:hover { transform: scale(1.07); }
}
