/*
Theme Name: TAT-8
Theme URI: https://tat-8.mx
Author: TAT-8
Description: Tema a medida para TAT-8 · Integrated ITC & Specialized Equipment Solutions. Incluye Proyectos, Clientes, Servicios, carrusel de portada y formulario de contacto administrables.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: tat8
License: Propietaria
*/

:root {
	--ink: #0B1620;
	--ink-2: #15232E;
	--ink-3: #22313D;
	--ink-line: #3A4854;
	--ground: #F4F5F2;
	--ground-2: #E7EAE5;
	--white: #FFFFFF;
	--line: #D9DDD8;
	--line-strong: #9AA39C;
	--muted: #4A5560;
	--muted-dark: #A3AFB8;
	--soft-dark: #C2CBD2;
	--blue: #2E4FB8;
	--blue-soft: #E9EDF8;
	--accent: #F07A3A;
	--display: 'Space Grotesk', system-ui, sans-serif;
	--body: 'IBM Plex Sans', system-ui, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, monospace;
	--radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: var(--white); color: var(--ink); padding: 12px 16px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--tight { padding-top: 0; }
.dark { background: var(--ink); color: #E8ECEA; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.dark .eyebrow { color: var(--accent); }
.h2 { font-size: clamp(32px, 4vw, 44px); }
.dark .h2, .dark h1, .dark h3 { color: var(--white); }
.lead { color: var(--muted); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-bottom: 44px; }
.section-head--row { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-head--row > div { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 14px 24px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform 120ms ease, background 120ms ease; }
.btn:hover { transform: translateY(-1px); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { color: var(--ink); background: #F58C51; }
.btn--ghost { border-color: var(--ink-line); color: var(--white); font-weight: 500; }
.btn--ghost:hover { color: var(--white); border-color: var(--muted-dark); }
.btn--dark { background: var(--ink); color: var(--white); border: 0; }
.btn--dark:hover { color: var(--white); background: var(--ink-3); }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.site-logo img, .custom-logo { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; padding: 10px 0; display: inline-block; }
.nav a:hover, .nav .current-menu-item > a, .nav a[aria-current="page"] { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { font-family: var(--mono); font-size: 14px; color: var(--muted); text-decoration: none; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 1080px) {
	.menu-toggle { display: inline-flex; }
	.header-phone { display: none; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; flex-direction: column; align-items: stretch; }
	.nav.is-open { display: flex; }
	.nav ul { flex-direction: column; gap: 0; }
	.nav a { padding: 12px 0; display: block; border-bottom: 1px solid var(--ground-2); }
	.site-header { position: sticky; }
}
@media (max-width: 520px) { .site-logo img, .custom-logo { height: 40px; } .header-actions .btn { display: none; } }

/* Hero */
.hero { padding: 72px 0 96px; }
.hero__grid { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(38px, 5.2vw, 66px); line-height: 1.05; letter-spacing: -0.02em; }
.hero__sub { font-size: 19px; color: var(--soft-dark); max-width: 580px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 16px; border-top: 1px solid var(--ink-3); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-family: var(--display); font-size: 32px; color: var(--white); line-height: 1.2; }
.stat span { font-size: 14px; color: var(--muted-dark); }
@media (max-width: 520px) { .stats { gap: 20px 24px; } .stat { flex: 1 1 40%; } .stat strong { font-size: 26px; } .hero { padding: 48px 0 64px; } .section { padding: 64px 0; } .section--tight { padding-top: 0; } }

/* Carousel */
.carousel { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.carousel__viewport { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--ink-2); }
.carousel__track { display: flex; width: 100%; height: 100%; transition: transform 700ms ease-in-out; will-change: transform; }
.carousel__track.no-anim { transition: none; }
.carousel__slide { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; position: relative; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__caption { position: absolute; left: 16px; bottom: 16px; background: var(--ink); color: #E8ECEA; font-family: var(--mono); font-size: 12px; padding: 6px 10px; border-radius: 6px; }
.carousel__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 99px; border: 0; background: var(--white); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.carousel__btn--prev { left: 12px; }
.carousel__btn--next { right: 12px; }
.carousel__dots { display: flex; justify-content: center; gap: 4px; }
.carousel__dot { width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.carousel__dot span { display: block; height: 8px; width: 8px; border-radius: 99px; background: var(--ink-line); transition: width 300ms; }
.carousel__dot[aria-current="true"] span { width: 24px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .carousel__track { transition: none; } }

/* Client strip */
.strip { background: var(--white); border-bottom: 1px solid var(--line); padding: 28px 0; }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px; }
.strip__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.strip__name { font-family: var(--display); font-weight: 500; font-size: 18px; }

/* Cards & grids */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--sectors { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.sector { padding: 40px; display: flex; flex-direction: column; gap: 18px; border-radius: 16px; }
.sector h3 { font-size: 28px; }
.sector p { color: var(--muted); }
.dash-list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.dash-list li { display: flex; gap: 10px; }
.dash-list li::before { content: '—'; color: var(--blue); font-weight: 600; }
.service { border-top: 4px solid var(--blue); padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 12px; }
.service__n { font-family: var(--mono); font-size: 14px; color: var(--blue); }
.service h3 { font-size: 22px; line-height: 1.25; }
.service p { color: var(--muted); font-size: 16px; }

/* Featured projects (dark) */
.feat { text-decoration: none; color: inherit; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.feat:hover { color: inherit; border-color: var(--ink-line); }
.feat__img { width: 100%; height: 220px; object-fit: cover; background: #1C2C38; }
.feat__ph { height: 220px; background: #1C2C38; display: flex; align-items: flex-end; padding: 20px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dark); }
.feat__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.feat__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.pill--accent { background: var(--accent); color: var(--ink); }
.pill--dark { background: var(--ink); color: var(--white); }
.feat__year { font-family: var(--mono); font-size: 13px; color: var(--muted-dark); }
.feat h3 { font-size: 22px; }
.feat .feat__figure { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--white); line-height: 1.1; }
.feat p { font-size: 15px; color: var(--muted-dark); }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 56px; margin-bottom: 56px; }
.about > div { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about__rows { gap: 0 !important; }
.about__row { display: flex; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.about__row:last-child { border-bottom: 1px solid var(--line); }
.about__row span { font-family: var(--mono); font-size: 14px; color: var(--blue); padding-top: 3px; min-width: 64px; }
.about__row p { color: var(--muted); font-size: 16px; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.value { padding: 20px; display: flex; flex-direction: column; gap: 6px; border-radius: 12px; }
.value span { font-family: var(--mono); font-size: 13px; color: var(--blue); }
.value strong { font-family: var(--display); font-size: 20px; }

/* Certifications */
.certs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cert { padding: 24px; display: flex; flex-direction: column; gap: 10px; border-radius: 12px; }
.cert__cat { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cert__brands { font-weight: 600; }
.cert__more { font-size: 14px; color: var(--muted); }

/* Contact */
.contact { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 56px 48px; display: flex; flex-wrap: wrap; gap: 56px; }
@media (max-width: 640px) { .contact { padding: 32px 20px; } }
.contact__info { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contact__list { display: flex; flex-direction: column; gap: 18px; font-size: 16px; }
.contact__item { display: flex; flex-direction: column; gap: 2px; }
.contact__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact__strong { font-weight: 600; color: var(--ink); text-decoration: none; }
.form { flex: 1.3 1 440px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-content: start; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; font-weight: 400; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--ground); color: var(--ink); width: 100%; }
.form textarea { resize: vertical; min-height: 120px; }
.form .hp { position: absolute; left: -9999px; }
.form button { justify-self: start; }
.notice { grid-column: 1 / -1; padding: 14px 18px; border-radius: 10px; font-weight: 500; }
.notice--ok { background: #E3F4EC; border: 1px solid #1F7A4F; color: #14532F; }
.notice--err { background: #FCEAE6; border: 1px solid #B42318; color: #7A1A10; }

/* Footer */
.site-footer { background: var(--ink); color: var(--muted-dark); padding: 40px 0; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 12px; }
.site-footer__brand img { width: 200px; }
.social { display: flex; flex-wrap: wrap; gap: 24px; }
.social a { color: #E8ECEA; text-decoration: none; padding: 8px 0; }

/* Projects archive */
.page-hero { padding: 56px 0 72px; }
.page-hero .wrap { display: flex; flex-direction: column; gap: 16px; }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08; max-width: 860px; }
.page-hero p { color: var(--soft-dark); max-width: 640px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter { font: inherit; font-size: 15px; font-weight: 500; min-height: 44px; padding: 10px 18px; border-radius: 99px; cursor: pointer; border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.filter small { font-family: var(--mono); font-size: 13px; opacity: .8; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 400px) { .projects { grid-template-columns: 1fr; } }
.project { overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.project:hover { color: inherit; border-color: var(--line-strong); }
.project[hidden] { display: none; }
.project__img { width: 100%; height: 220px; object-fit: cover; }
.project__body { padding: 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.project__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.project__meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.project h2, .project h3 { font-size: 24px; line-height: 1.2; }
.project p { color: var(--muted); font-size: 15px; }
.figures { display: flex; flex-wrap: wrap; gap: 10px; }
.figure { background: var(--blue-soft); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.figure strong { font-family: var(--display); font-size: 24px; line-height: 1.1; }
.figure span { font-size: 13px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.tag { font-size: 13px; border: 1px solid var(--line-strong); padding: 3px 10px; border-radius: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery img { width: 100%; height: 280px; object-fit: cover; border-radius: 12px; background: var(--ground-2); }
.clients { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.client-group { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.client-group h3 { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-weight: 500; }
.client-group ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.client-group li { font-weight: 500; font-size: 16px; border-bottom: 1px solid #ECEFEA; padding-bottom: 8px; }
.cta-band { border-radius: 20px; padding: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { font-size: 32px; max-width: 640px; }
@media (max-width: 640px) { .cta-band { padding: 32px 20px; } }

/* Single project */
.single-head { display: flex; flex-direction: column; gap: 18px; }
.single-body { display: flex; flex-wrap: wrap; gap: 48px; }
.single-body__main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.single-body__side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.entry-content > * + * { margin-top: 1em; }
.entry-content img { border-radius: 12px; }
.single-cover { width: 100%; max-height: 560px; object-fit: cover; border-radius: 16px; }

/* Generic page */
.page-content { max-width: 820px; }
