/* =========================================================
   TTIG WEBSITE STYLES
   -----------------------------------------------------
   This file is organized top to bottom in this order:
   1. Design tokens (colors, fonts, spacing) — edit these
      to change the whole site's look in one place.
   2. Reset / base styles
   3. Reusable pieces (buttons, containers, section headers)
   4. Header / navigation
   5. Hero
   6. Products
   7. Why Choose
   8. How It Works
   9. Agent Recruiting
   10. Contact form
   11. Footer + modal
   12. Animations
   13. Responsive breakpoints
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Colors */
  --navy-deep:   #0a1428;   /* main dark background */
  --navy-panel:  #0f1c38;   /* slightly lighter panels/cards on navy */
  --navy-line:   #223357;   /* hairlines on navy */
  --gold:        #c9a227;   /* primary gold accent */
  --gold-light:  #e8c766;   /* lighter gold for highlights/gradients */
  --off-white:   #f7f6f2;   /* main light background */
  --paper:       #ffffff;   /* card surfaces on light background */
  --ink:         #10131a;   /* main dark text on light background */
  --ink-soft:    #4a5164;   /* secondary text on light background */
  --line:        #e4e1d8;   /* hairlines on light background */

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius: 6px;
}

/* ---------- 2. RESET / BASE ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: inherit;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Visible keyboard focus for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- 3. REUSABLE PIECES ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: #f1efe6;
}

.section-head {
  max-width: 620px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--navy-deep);
}

.section-head p {
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-primary:hover { background: var(--gold-light); }

.btn-secondary {
  background: transparent;
  color: var(--off-white);
  border-color: rgba(247, 246, 242, 0.4);
}
.btn-secondary:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.btn-full {
  width: 100%;
  text-align: center;
  border: none;
}

/* ---------- 4. HEADER / NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 20, 40, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--navy-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--off-white);
  letter-spacing: 0.02em;
}

.logo-img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  border-radius: 6px;
}

.footer-logo {
  height: 84px;
  width: 84px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  color: #cfd4e4;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-nav a:hover { color: var(--gold-light); }

.main-nav a.nav-cta {
  background: var(--gold);
  color: var(--navy-deep);
  padding: 10px 18px;
  border-radius: var(--radius);
}
.main-nav a.nav-cta:hover { background: var(--gold-light); color: var(--navy-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--off-white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--off-white);
  overflow: hidden;
  padding: 88px 0 72px;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(201, 162, 39, 0.16), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(201, 162, 39, 0.08), transparent 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-kicker {
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--off-white);
  max-width: 11ch;
}

.hero-sub {
  font-size: 1.1rem;
  color: #c3c9dc;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-trust {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--navy-line);
  padding-top: 28px;
}

.trust-item {
  display: flex;
  flex-direction: column;
}

.trust-item strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-light);
}

.trust-item span {
  font-size: 0.85rem;
  color: #9aa2ba;
}

.hero-graphic {
  display: flex;
  justify-content: center;
}

.shield-art {
  width: 100%;
  max-width: 420px;
  animation: float-in 1.1s ease both;
}

/* ---------- 5b. MEET THE TEAM ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.team-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
}

.team-photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  margin: 0 auto 20px;
  border: 3px solid var(--gold);
}

.team-card h3 {
  font-size: 1.2rem;
  color: var(--navy-deep);
  margin-bottom: 2px;
}

.team-role {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 18px;
}

.team-quote {
  margin: 0;
  padding: 0;
  border: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- 6. PRODUCTS ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.product-card {
  background: var(--paper);
  padding: 36px 30px;
  position: relative;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.product-card:hover::before { transform: scaleX(1); }

.product-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold);
  margin-bottom: 18px;
}

.product-card h3 {
  font-size: 1.2rem;
  color: var(--navy-deep);
}

.product-card p { font-size: 0.96rem; margin-bottom: 0; }

/* ---------- 7. WHY CHOOSE ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
}

.why-intro h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--navy-deep);
}

.why-row {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: baseline;
}

.why-row:last-child { border-bottom: 1px solid var(--line); }

.why-row h3 {
  font-size: 1.1rem;
  color: var(--navy-deep);
  margin: 0;
}

.why-row p { margin: 0; font-size: 0.98rem; }

/* ---------- 8. HOW IT WORKS ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
  position: relative;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--navy-deep);
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 18px;
}

.step h3 {
  font-size: 1.1rem;
  color: var(--navy-deep);
}

.step p { font-size: 0.95rem; }

/* ---------- 9. AGENT RECRUITING ---------- */
.agents {
  background: var(--navy-deep);
  color: var(--off-white);
}

.agents-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.agents-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--off-white);
  max-width: 14ch;
}

.agents-copy > p {
  color: #c3c9dc;
  max-width: 52ch;
  font-size: 1.05rem;
}

.agents-list {
  margin: 32px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.agents-list li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--navy-line);
}

.agents-list li:last-child { border-bottom: none; padding-bottom: 0; }

.agents-list strong {
  color: var(--gold-light);
  font-size: 0.98rem;
}

.agents-list span {
  color: #b7bed3;
  font-size: 0.95rem;
}

.agents-panel {
  display: flex;
  justify-content: center;
}

.agents-art { width: 100%; max-width: 320px; }

/* ---------- 10. CONTACT FORM ---------- */
.contact-inner .section-head { max-width: 640px; }

.quote-form {
  max-width: 720px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 22px;
}

.field { display: flex; flex-direction: column; }

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.field input,
.field select {
  border: none;
  border-bottom: 1.5px solid var(--line);
  background: transparent;
  padding: 10px 2px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--gold);
  outline: none;
}

.field input:invalid[data-touched="true"],
.field select:invalid[data-touched="true"] {
  border-color: #c0463a;
}

.quote-form .btn-full { margin-top: 12px; }

.form-note {
  font-size: 0.82rem;
  color: #8b8f9a;
  margin-top: 16px;
  margin-bottom: 0;
}

.form-success {
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--navy-deep);
  font-size: 0.95rem;
}

/* ---------- 11. FOOTER + MODAL ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #9aa2ba;
  padding: 56px 0 32px;
}

.footer-inner { text-align: left; }

.footer-brand .logo-text { color: var(--off-white); }
.footer-brand p { margin: 4px 0 24px; color: #9aa2ba; }

.footer-links {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-size: 0.9rem;
  color: #cfd4e4;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover { color: var(--gold-light); border-color: var(--gold-light); }

.footer-disclaimer {
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 780px;
  color: #77809a;
  padding-top: 24px;
  border-top: 1px solid var(--navy-line);
}

.footer-copyright {
  font-size: 0.8rem;
  color: #5f6780;
  margin: 24px 0 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

/* This is the important rule: it keeps the modal fully hidden
   whenever it has the "hidden" attribute (its default state). */
.modal[hidden] {
  display: none;
}

.modal-box {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  position: relative;
}

.modal-box h3 { color: var(--navy-deep); }
.modal-box p { margin: 0; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink-soft);
  line-height: 1;
}

/* ---------- 12. ANIMATIONS ---------- */
@keyframes float-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 13. RESPONSIVE ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-graphic { order: -1; max-width: 280px; margin: 0 auto 12px; }
  .why-grid { grid-template-columns: 1fr; }
  .why-row { grid-template-columns: 1fr; gap: 8px; }
  .agents-inner { grid-template-columns: 1fr; }
  .agents-panel { order: -1; max-width: 220px; margin: 0 auto; }
  .agents-list li { grid-template-columns: 1fr; gap: 4px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--navy-line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .hero-trust { gap: 28px; flex-wrap: wrap; }
  .product-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 18px; }
  .quote-form { padding: 28px 22px; }
}
