/*
Theme Name: TD Sports Intel
Theme URI: https://tommydavilla.us
Author: Larbi Media
Author URI: https://larbimedia.com
Description: Custom WordPress theme for Tommy Davilla sports analysis, alerts, and editorial intelligence.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: td-sports-intel
*/

:root {
  --td-ink: #0a0d12;
  --td-panel: #111720;
  --td-panel-2: #18202c;
  --td-paper: #f7f8fb;
  --td-text: #f8fbff;
  --td-muted: #9aa8ba;
  --td-line: rgba(255, 255, 255, 0.14);
  --td-red: #df1738;
  --td-red-dark: #9e1028;
  --td-blue: #2268d8;
  --td-gold: #f8c14a;
  --td-green: #40d99b;
  --td-radius: 8px;
  --td-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --td-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #17202c;
  background: var(--td-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body.menu-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 1000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  color: #fff;
  background: var(--td-red);
}

.td-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 14px clamp(18px, 5vw, 70px);
  color: var(--td-ink);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(13, 21, 33, 0.08);
  backdrop-filter: blur(14px);
}

.td-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--td-ink);
  text-decoration: none;
}

.td-brand img {
  width: min(282px, 62vw);
  height: auto;
}

.td-nav-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
}

.td-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.td-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--td-radius);
  color: #18212d;
  font-weight: 590;
  text-decoration: none;
}

.td-menu a:hover,
.td-menu .current-menu-item > a {
  color: var(--td-red);
  background: rgba(223, 23, 56, 0.08);
}

.td-call {
  display: grid;
  gap: 2px;
  min-width: 145px;
  padding-left: 22px;
  border-left: 1px solid rgba(13, 21, 33, 0.2);
  color: #111720;
  text-decoration: none;
}

.td-call span {
  color: var(--td-red);
  font-weight: 590;
}

.td-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(13, 21, 33, 0.16);
  border-radius: var(--td-radius);
  background: #fff;
}

.td-menu-toggle span:not(.screen-reader-text) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--td-ink);
}

.td-main {
  min-height: 58vh;
}

.td-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: center;
  min-height: 720px;
  padding: 86px clamp(18px, 5vw, 70px) 70px;
  overflow: hidden;
  color: var(--td-text);
  background:
    linear-gradient(110deg, rgba(10, 13, 18, 0.96), rgba(13, 19, 29, 0.82) 48%, rgba(10, 13, 18, 0.7)),
    url("assets/arena.svg") center / cover no-repeat,
    var(--td-ink);
}

.td-hero::before {
  content: "";
  position: absolute;
  inset: auto auto -220px -170px;
  width: min(780px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 23, 56, 0.72), rgba(223, 23, 56, 0.13) 62%, transparent 63%);
  pointer-events: none;
}

.td-hero > * {
  position: relative;
}

.td-eyebrow {
  margin: 0 0 14px;
  color: var(--td-gold);
  font-size: 0.78rem;
  font-weight: 590;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.td-hero h1,
.td-page-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: 5.35rem;
  font-weight: 560;
  line-height: 0.96;
  letter-spacing: 0;
}

.td-lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dce6f2;
  font-size: 1.24rem;
}

.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.td-button,
.td-form button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--td-radius);
  color: #fff;
  background: var(--td-red);
  box-shadow: 0 16px 34px rgba(223, 23, 56, 0.26);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.td-button:hover,
.td-form button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
  background: #f02143;
}

.td-button.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.td-button.light {
  color: var(--td-ink);
  background: #fff;
  box-shadow: none;
}

.td-hero-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(17, 23, 32, 0.74);
  box-shadow: var(--td-shadow);
  backdrop-filter: blur(14px);
}

.td-slate-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--td-radius);
  background: rgba(255, 255, 255, 0.08);
}

.td-slate-card b {
  color: #fff;
}

.td-slate-card small {
  color: var(--td-muted);
}

.td-meter {
  width: 74px;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.td-meter span {
  display: block;
  height: 100%;
  width: var(--level, 64%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--td-gold), var(--td-green));
}

.td-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--td-red);
  color: #fff;
}

.td-strip div {
  padding: 22px clamp(16px, 3vw, 34px);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.td-strip strong {
  display: block;
  font-size: 1.5rem;
}

.td-section,
.td-page-content {
  width: min(var(--td-width), calc(100% - 36px));
  margin: 0 auto;
  padding: 76px 0;
}

.td-section.dark {
  width: 100%;
  max-width: none;
  padding: 78px clamp(18px, 5vw, 70px);
  color: var(--td-text);
  background: var(--td-panel);
}

.td-section-heading {
  max-width: 780px;
  margin-bottom: 32px;
}

.td-section-heading h2,
.td-page-content h2 {
  margin: 0;
  color: var(--td-ink);
  font-size: 2.75rem;
  font-weight: 560;
  line-height: 1.08;
}

.td-section.dark h2,
.td-section.dark h3,
.td-section.dark p {
  color: inherit;
}

.td-section-heading p,
.td-page-content p {
  color: #4a586a;
  font-size: 1.05rem;
}

.td-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.td-card,
.td-plan,
.td-report {
  padding: 22px;
  border: 1px solid rgba(13, 21, 33, 0.1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(13, 21, 33, 0.06);
}

.td-card h3,
.td-plan h3,
.td-report h3 {
  margin: 8px 0 10px;
  color: var(--td-ink);
  font-size: 1.25rem;
  font-weight: 600;
}

.td-card p,
.td-plan p,
.td-report p {
  margin: 0;
  color: #5b6878;
}

.td-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--td-radius);
  color: #fff;
  background: var(--td-red);
  font-weight: 600;
}

.td-two {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 30px;
  align-items: start;
}

.td-checklist {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.td-checklist li {
  padding: 13px 15px;
  border-left: 4px solid var(--td-red);
  background: rgba(223, 23, 56, 0.08);
  font-weight: 560;
}

.td-page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 360px;
  padding: 76px clamp(18px, 5vw, 70px);
  color: var(--td-text);
  background:
    linear-gradient(90deg, rgba(8, 11, 16, 0.96) 0%, rgba(10, 14, 21, 0.88) 38%, rgba(10, 13, 18, 0.48) 72%, rgba(10, 13, 18, 0.18) 100%),
    url("assets/sports-hero-pro.webp") center right / cover no-repeat,
    var(--td-ink);
}

.td-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, transparent 72%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.td-page-hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--td-width), 100%);
  margin: 0 auto;
}

.td-page-hero-copy {
  min-width: 0;
  width: min(640px, 100%);
}

.td-page-hero h1 {
  font-size: 3.35rem;
}

.td-page-hero p {
  max-width: 760px;
  color: #dce6f2;
}

.td-page-content {
  font-size: 1.04rem;
}

.td-page-content > *:first-child {
  margin-top: 0;
}

.td-form {
  display: grid;
  gap: 15px;
  padding: 22px;
  border: 1px solid rgba(13, 21, 33, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(13, 21, 33, 0.06);
}

.td-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.td-form label {
  display: grid;
  gap: 7px;
  color: #1a2432;
  font-weight: 560;
}

.td-form input,
.td-form select,
.td-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid rgba(13, 21, 33, 0.16);
  border-radius: var(--td-radius);
  color: #141b26;
  background: #fff;
}

.td-form textarea {
  min-height: 130px;
  resize: vertical;
}

.td-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #38485c;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.55;
}

.td-form .td-consent span {
  font-weight: 400;
}

.td-form .td-consent a {
  font-weight: 600;
}

.td-consent input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.td-notice {
  padding: 14px 16px;
  border-left: 4px solid var(--td-green);
  background: rgba(64, 217, 155, 0.13);
  color: #163227;
  font-weight: 600;
}

.td-error {
  padding: 14px 16px;
  border-left: 4px solid var(--td-red);
  background: rgba(223, 23, 56, 0.1);
  color: #60101d;
  font-weight: 600;
}

.td-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.td-disclaimer {
  padding: 18px;
  border: 1px solid rgba(13, 21, 33, 0.1);
  border-radius: 12px;
  background: #fff;
  color: #526173;
}

.td-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  padding: 44px clamp(18px, 5vw, 70px);
  color: #d7e1ee;
  background: #080b10;
}

.td-footer img {
  width: 210px;
  filter: brightness(0) invert(1);
}

.td-footer p {
  max-width: 620px;
  color: #a7b4c6;
}

.td-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.td-footer a {
  color: #d7e1ee;
  font-weight: 600;
  text-decoration: none;
}

.td-credit {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #8e9bad;
  font-size: 0.94rem;
}

.td-credit a {
  color: #fff;
}

@media (max-width: 1020px) {
  .td-menu-toggle {
    display: block;
  }

  .td-nav-wrap {
    position: absolute;
    top: calc(100% + 8px);
    left: 18px;
    right: 18px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
    border: 1px solid rgba(13, 21, 33, 0.12);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--td-shadow);
  }

  .td-nav-wrap.open {
    display: flex;
  }

  .td-menu {
    align-items: stretch;
    flex-direction: column;
  }

  .td-menu a {
    justify-content: flex-start;
  }

  .td-call {
    padding: 12px;
    border-left: 0;
    border-top: 1px solid rgba(13, 21, 33, 0.12);
  }

  .td-hero,
  .td-two {
    grid-template-columns: 1fr;
  }

  .td-hero h1 {
    font-size: 4rem;
  }

  .td-page-hero h1 {
    font-size: 2.75rem;
  }

  .td-section-heading h2,
  .td-page-content h2 {
    font-size: 2.45rem;
  }

  .td-grid,
  .td-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .td-header {
    min-height: 70px;
    padding: 10px 16px;
  }

  .td-brand img {
    width: 238px;
  }

  .td-hero,
  .td-page-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .td-page-hero {
    padding-top: 46px;
    padding-bottom: 42px;
    min-height: 300px;
    background-position: 63% center;
  }

  .td-page-hero-inner {
    width: 100%;
  }

  .td-hero {
    min-height: auto;
    padding-top: 56px;
  }

  .td-hero h1,
  .td-page-hero h1 {
    font-size: 2.45rem;
    line-height: 1;
  }

  .td-section-heading h2,
  .td-page-content h2 {
    font-size: 2rem;
  }

  .td-grid,
  .td-strip,
  .td-form-grid {
    grid-template-columns: 1fr;
  }

  .td-section,
  .td-page-content {
    width: calc(100% - 28px);
    padding: 54px 0;
  }

  .td-footer {
    grid-template-columns: 1fr;
  }

  .td-footer nav {
    justify-content: flex-start;
  }

  .td-button,
  .td-form button {
    width: 100%;
  }
}
