/* ======================================
   ROOT / TOKENS
====================================== */
:root {
  --tal-red: #e10600;
  --tal-red-dark: #b80500;
  --tal-blue: #0b3ea8;
  --tal-blue-dark: #162c48;
  --tal-silver: #d6d2cb;
  --tal-black: #000000;
  --tal-ink: #111827;
  --tal-muted: #4b5563;
  --tal-border: #e5e7eb;
  --tal-bg: #f9fafb;
  --tal-white: #ffffff;
  --tal-panel: #0b1120;
  --tal-panel-dark: #070c17;
  --tal-radius: 0.5rem;
  --tal-radius-lg: 1rem;
  --tal-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  --tal-shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.45);
  --tal-transition: 0.18s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--tal-bg);
  color: var(--tal-ink);
  line-height: 1.55;
}

img {
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

p,
ul,
ol {
  margin-top: 0;
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin-top: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link,
.sr-only {
  position: absolute;
}

.skip-link {
  left: 1rem;
  top: -100px;
  background: var(--tal-white);
  color: var(--tal-ink);
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
  border: 1px solid var(--tal-border);
  z-index: 100001;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ======================================
   TYPOGRAPHY HELPERS
====================================== */
.muted {
  color: var(--tal-muted);
}

.section-intro {
  max-width: 52rem;
}

.list-tight li + li {
  margin-top: 0.35rem;
}

/* ======================================
   HEADER
====================================== */
.site-header {
  background-color: var(--tal-black);
  color: var(--tal-white);
}

.header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.true-red {
  color: var(--tal-red);
}

.american-white {
  color: var(--tal-silver);
}

.landscape-blue {
  color: var(--tal-blue);
}

.logo-img {
  height: 92px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: contrast(1.1) saturate(1.15);
}

.brand-text {
  display: flex;
  gap: 0.35rem;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
  flex-shrink: 0;
  justify-content: flex-end;
}

.site-header nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
}

.site-header nav a:hover {
  opacity: 0.9;
}

.btn-nav {
  border: 2px solid var(--tal-white);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--tal-white);
}

.site-header nav a.active {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ======================================
   HERO / PAGE HERO
====================================== */
.hero {
  color: var(--tal-white);
}

.hero-flag {
  position: relative;
  background-image: url("../images/grass-flag.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 78vh;
  display: flex;
}

.hero-flag::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 80px;
  background: linear-gradient(var(--tal-black), rgba(0, 0, 0, 0));
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  width: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.55));
  display: flex;
  align-items: center;
  padding: 4rem 0;
  position: relative;
  z-index: 2;
}

.hero.hero-flag .container h1 {
  font-size: 2.6rem;
  margin: 0 0 0.9rem;
  color: var(--tal-white);
  max-width: 48rem;
}

.hero-sub {
  max-width: 40rem;
  opacity: 0.95;
  margin: 0;
  color: var(--tal-white);
}

.page-hero {
  background-color: #020617;
  color: var(--tal-white);
  padding: 3rem 0 2rem;
}

.page-sub {
  max-width: 44rem;
  opacity: 0.9;
}

.hero-cta {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ======================================
   BUTTONS
====================================== */
.btn-primary,
.btn-secondary {
  display: inline-block;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  padding: 0.7rem 1.3rem;
  transition:
    background-color var(--tal-transition),
    transform var(--tal-transition),
    border-color var(--tal-transition);
}

.btn-primary {
  background-color: var(--tal-red);
  color: var(--tal-white);
}

.btn-primary:hover {
  background-color: var(--tal-red-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #1f3a5f;
  color: var(--tal-white);
  border: 2px solid var(--tal-blue-dark);
}

.btn-secondary:hover {
  background-color: var(--tal-blue-dark);
  transform: translateY(-1px);
}

/* ======================================
   SECTIONS
====================================== */
.section {
  padding: 3rem 0;
}

.section-alt {
  background-color: var(--tal-border);
}

.section h2 {
  margin-bottom: 1rem;
}

/* ======================================
   CARDS / LAYOUT BLOCKS
====================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.card {
  background-color: var(--tal-white);
  border: 1px solid var(--tal-border);
  border-radius: var(--tal-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cards a.card {
  text-decoration: none;
  color: inherit;
  transition: transform var(--tal-transition);
}

.cards a.card:hover {
  transform: translateY(-2px);
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
}

.feature-card {
  padding: 0;
  overflow: hidden;
}

.feature-card-media {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.feature-card-body {
  padding: 1.5rem;
}

.service-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--tal-radius);
  border: 1px solid var(--tal-border);
  margin-top: auto;
}

.service-photo-top {
  margin-top: 1rem;
}

/* ======================================
   FORM
====================================== */
.quote-form {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quote-form label {
  font-weight: 600;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid #d1d5db;
  font: inherit;
  background: var(--tal-white);
  color: var(--tal-ink);
}

.quote-form textarea {
  min-height: 120px;
  resize: vertical;
}

.quote-form input:focus,
.quote-form textarea:focus {
  outline: 2px solid rgba(11, 62, 168, 0.22);
  border-color: var(--tal-blue);
}

.form-note {
  margin-top: 0.75rem;
}

/* ======================================
   MAP
====================================== */
.leaflet-map {
  height: 560px;
  border-radius: 12px;
  border: 1px solid var(--tal-border);
  overflow: hidden;
}

.map-caption {
  margin-top: 0.85rem;
}

.map-logo-wrap {
  background: rgba(0, 0, 0, 0.55);
  padding: 8px;
  border-radius: 10px;
  margin: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.map-logo {
  width: 84px;
  height: auto;
  display: block;
}

/* ======================================
   FOOTER
====================================== */
.site-footer {
  background: #0b0b0b;
  color: var(--tal-white);
  padding: 3rem 1.5rem 1rem;
  font-size: 0.95rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 1rem;
}

.footer-heading {
  color: #1f6feb;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #cccccc;
}

.footer-col a:hover {
  color: var(--tal-white);
}

.footer-bottom {
  border-top: 1px solid #222;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

/* ======================================
   TAL LIVE CHAT
====================================== */
.tal-chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 999px;
  background: var(--tal-black);
  box-shadow: var(--tal-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  padding: 0;
  pointer-events: auto;
}

.tal-chat-launcher img,
.tal-chat-launcher-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  object-fit: cover;
  filter: contrast(1.1) saturate(1.15);
  display: block;
  pointer-events: none;
}

.tal-chat-launcher.is-hidden {
  display: none;
}

.tal-chat-launcher-label {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: #111;
  color: var(--tal-white);
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  letter-spacing: 0.2px;
  pointer-events: none;
  transform-origin: bottom right;
  animation: talChatLabelPop 1.8s ease-in-out infinite;
}

.tal-chat-launcher-label::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 18px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #111;
}

@keyframes talChatLabelPop {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

.tal-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 360px;
  max-width: calc(100vw - 36px);
  height: 520px;
  max-height: calc(100vh - 36px);
  background: var(--tal-panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: var(--tal-shadow-lg);
  overflow: hidden;
  z-index: 99999;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--tal-transition),
    transform var(--tal-transition);
}

.tal-chat-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.tal-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--tal-black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tal-chat-agent {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tal-chat-agent img {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  filter: contrast(1.1) saturate(1.15);
}

.tal-chat-title {
  color: var(--tal-silver);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tal-chat-status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  line-height: 1.1;
}

.tal-chat-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
}

.tal-chat-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tal-chat-body {
  height: calc(520px - 56px - 54px);
  max-height: calc(100vh - 36px - 56px - 54px);
  overflow: auto;
  padding: 14px 12px;
  background: linear-gradient(var(--tal-panel), var(--tal-panel-dark));
}

.tal-chat-msg {
  display: flex;
  margin-bottom: 10px;
}

.tal-chat-msg-agent {
  justify-content: flex-start;
}

.tal-chat-msg-user {
  justify-content: flex-end;
}

.tal-chat-bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.tal-chat-msg-agent .tal-chat-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: var(--tal-white);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tal-chat-msg-user .tal-chat-bubble {
  background: var(--tal-red);
  color: var(--tal-white);
}

.tal-chat-muted {
  color: rgba(255, 255, 255, 0.78);
}

.tal-chat-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: var(--tal-black);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tal-chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--tal-white);
  outline: none;
  font-family: inherit;
}

.tal-chat-input input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.tal-chat-input button {
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: var(--tal-blue);
  color: var(--tal-white);
}

.tal-chat-input button:hover {
  filter: brightness(1.05);
}

/* ======================================
   MOBILE
====================================== */
@media (max-width: 768px) {
  .header-line {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .logo-img {
    height: 64px;
  }

  .brand-text {
    font-size: 1.05rem;
    letter-spacing: 0.06em;
  }

  .site-header nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .hero-flag {
    min-height: 66vh;
  }

  .hero.hero-flag .container h1 {
    font-size: 1.9rem;
  }

  .leaflet-map {
    height: 440px;
  }

  .feature-card-media {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .tal-chat-launcher {
    width: 58px;
    height: 58px;
  }

  .tal-chat-launcher img,
  .tal-chat-launcher-icon {
    width: 42px;
    height: 42px;
  }

  .tal-chat-panel {
    width: 100%;
    right: 0;
    bottom: 0;
    border-radius: 16px 16px 0 0;
    height: 78vh;
    max-width: 100%;
  }

  .tal-chat-body {
    height: calc(78vh - 56px - 54px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}