/* ============================================================
   Tracers.au - Shared Stylesheet
   Theme: Dark/Orange professional investigative industry
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #222222;
  background: #ffffff;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #E8501A; text-decoration: none; transition: color 0.2s; }
a:hover { color: #c03e10; }
ul { list-style: none; }

/* --- Colour Variables --- */
:root {
  --orange: #E8501A;
  --orange-dark: #c03e10;
  --dark: #1e1e1e;
  --dark-mid: #2a2a2a;
  --dark-light: #3a3a3a;
  --grey-bg: #f5f5f5;
  --grey-border: #e0e0e0;
  --white: #ffffff;
  --text: #222222;
  --text-light: #555555;
  --text-muted: #888888;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; color: var(--text-light); }
p:last-child { margin-bottom: 0; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.5rem;
}

.section-title {
  position: relative;
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--orange);
  margin-top: 0.6rem;
  border-radius: 2px;
}

.section-title.centered::after { margin-left: auto; margin-right: auto; }

/* --- Layout --- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-dark { background: var(--dark-mid); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-dark p { color: #cccccc; }
.section-dark .section-label { color: var(--orange); }
.section-grey { background: var(--grey-bg); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.text-orange { color: var(--orange) !important; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* --- Top Bar --- */
.topbar {
  background: var(--orange);
  padding: 0.35rem 0;
  font-size: 0.8rem;
  color: var(--white);
}
.topbar a { color: var(--white); }
.topbar a:hover { opacity: 0.8; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

/* --- Navigation --- */
.site-nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo-box {
  width: 44px;
  height: 44px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--white);
  border-radius: 4px;
  letter-spacing: -1px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-text span:first-child {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.05em;
}

.nav-logo-text span:last-child {
  font-size: 0.65rem;
  color: #aaaaaa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: #cccccc;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--white);
  background: rgba(232, 80, 26, 0.15);
}

.nav-links .nav-cta {
  background: var(--orange);
  color: var(--white);
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 0.5rem;
}

.nav-links .nav-cta:hover {
  background: var(--orange-dark);
  color: var(--white);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 0.7rem; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark-light);
  min-width: 220px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 0.5rem 0;
  z-index: 100;
}
.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: #cccccc;
  font-size: 0.85rem;
  border-radius: 0;
}
.dropdown-menu a:hover { background: rgba(232,80,26,0.15); color: var(--white); }
.nav-dropdown:hover .dropdown-menu { display: block; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--dark);
}

.btn-outline-orange {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
.btn-outline-orange:hover {
  background: var(--orange);
  color: var(--white);
}

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.82rem; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1rem; }

/* --- Hero --- */
.hero {
  background: var(--dark);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(232,80,26,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  max-width: 750px;
}

.hero h1 span { color: var(--orange); }

.hero p {
  color: #bbbbbb;
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #cccccc;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--dark);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(232,80,26,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-hero p { color: #bbbbbb; max-width: 680px; font-size: 1.05rem; }
.breadcrumb { color: #888; font-size: 0.82rem; margin-bottom: 1rem; }
.breadcrumb a { color: var(--orange); }
.breadcrumb span { color: #888; }

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }

.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(232,80,26,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg { width: 26px; height: 26px; fill: var(--orange); }

.card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.card p { font-size: 0.9rem; color: var(--text-light); }

.card-dark {
  background: var(--dark-light);
  border-color: rgba(255,255,255,0.08);
}
.card-dark h3 { color: var(--white); }
.card-dark p { color: #aaaaaa; }

.card-orange {
  border-top: 4px solid var(--orange);
}

/* --- Stat blocks --- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--orange); line-height: 1; }
.stat-label { font-size: 0.82rem; color: #888; margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead { background: var(--dark); color: var(--white); }
thead th { padding: 0.9rem 1rem; text-align: left; font-weight: 600; font-size: 0.85rem; }
tbody tr { border-bottom: 1px solid var(--grey-border); }
tbody tr:nth-child(even) { background: var(--grey-bg); }
tbody td { padding: 0.85rem 1rem; color: var(--text-light); vertical-align: top; }
tbody td strong { color: var(--text); }

/* --- Callout boxes --- */
.callout {
  border-left: 4px solid var(--orange);
  background: rgba(232,80,26,0.06);
  padding: 1.25rem 1.5rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
}
.callout p { margin: 0; color: var(--text); font-size: 0.95rem; }
.callout strong { color: var(--orange); }

.callout-info {
  border-left-color: #2196F3;
  background: rgba(33,150,243,0.06);
}
.callout-info strong { color: #1976D2; }

.callout-warning {
  border-left-color: #FF9800;
  background: rgba(255,152,0,0.06);
}
.callout-warning strong { color: #E65100; }

/* --- Ecosystem Promo Blocks --- */
.ecosystem-block {
  background: var(--dark);
  border-radius: 10px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  border: 1px solid rgba(255,255,255,0.08);
}
.ecosystem-block .eco-logo {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: var(--white);
}
.eco-aimpac { background: #1a3a5c; }
.eco-tracerdesk { background: var(--orange); }
.eco-thinkedu { background: #1a1a2e; border: 1px solid #444; }

.ecosystem-block h4 { color: var(--white); margin-bottom: 0.35rem; font-size: 1rem; }
.ecosystem-block p { color: #aaaaaa; font-size: 0.88rem; margin-bottom: 0.75rem; }
.ecosystem-block .btn { font-size: 0.82rem; padding: 0.45rem 1rem; }

/* Ecosystem strip (3-column) */
.eco-strip { background: var(--dark-mid); padding: 3rem 0; }
.eco-strip .grid-3 { gap: 1.5rem; }

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--grey-border);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.1rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--orange);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  display: none;
  padding: 0 0 1.1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* --- State Licensing Table --- */
.state-table { margin: 2rem 0; }
.state-badge {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.state-badge.regulated { background: #2e7d32; }
.state-badge.unregulated { background: #888; }
.state-badge.partial { background: #E65100; }

/* --- CTA Banner --- */
.cta-banner {
  background: var(--orange);
  padding: 4rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 1.75rem; font-size: 1.05rem; max-width: 580px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-outline { border-color: var(--white); color: var(--white); }
.cta-banner .btn-outline:hover { background: var(--white); color: var(--orange); }

/* --- Footer --- */
.site-footer {
  background: var(--dark);
  color: #aaaaaa;
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-about p { font-size: 0.88rem; color: #888; margin-top: 1rem; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 1rem; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: #888; font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--orange); }
.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #555;
}
.footer-bottom a { color: #555; }
.footer-bottom a:hover { color: var(--orange); }

/* --- Content page layout --- */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.content-main { min-width: 0; }
.content-sidebar { position: sticky; top: 90px; }

.sidebar-card {
  background: var(--grey-bg);
  border: 1px solid var(--grey-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h4 { margin-bottom: 1rem; font-size: 0.95rem; color: var(--dark); }
.sidebar-card ul li { margin-bottom: 0.5rem; }
.sidebar-card ul li a { font-size: 0.88rem; color: var(--text-light); }
.sidebar-card ul li a:hover { color: var(--orange); }

.sidebar-promo {
  background: var(--dark);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-promo h4 { color: var(--white); margin-bottom: 0.5rem; font-size: 0.95rem; }
.sidebar-promo p { color: #aaa; font-size: 0.85rem; margin-bottom: 1rem; }
.sidebar-promo .btn { width: 100%; text-align: center; font-size: 0.85rem; }

/* Content typography */
.content-main h2 { margin: 2.5rem 0 1rem; padding-top: 0.5rem; border-top: 1px solid var(--grey-border); }
.content-main h2:first-child { border-top: none; margin-top: 0; }
.content-main h3 { margin: 1.75rem 0 0.75rem; color: var(--dark); }
.content-main p { color: var(--text-light); margin-bottom: 1.1rem; }
.content-main ul { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.content-main ul li { list-style: disc; color: var(--text-light); margin-bottom: 0.4rem; font-size: 0.95rem; }
.content-main ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.content-main ol li { list-style: decimal; color: var(--text-light); margin-bottom: 0.4rem; font-size: 0.95rem; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--dark-mid); padding: 1rem; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav-links .nav-cta { margin: 0.5rem 0 0; border-radius: 4px; }
  .nav-toggle { display: flex; }
  .site-nav { position: relative; }
  .dropdown-menu { position: static; box-shadow: none; background: rgba(255,255,255,0.05); }
  .nav-dropdown > a::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .ecosystem-block { flex-direction: column; }
  .eco-strip .grid-3 { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-badges { flex-direction: column; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
