/* ============================================================
   Magic Transit — Public Resource Site
   ============================================================ */

:root {
  --cf-orange: #f6821f;
  --cf-dark-orange: #e07b1a;
  --cf-blue: #003682;
  --cf-dark: #1d1d1d;
  --cf-gray: #535353;
  --cf-light-gray: #f5f5f5;
  --cf-border: #e5e5e5;
  --cf-white: #ffffff;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --max-width: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--cf-dark);
  background: var(--cf-white);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--cf-orange); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }
code {
  font-family: var(--font-mono);
  background: var(--cf-light-gray);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}
h1,h2,h3,h4 { line-height: 1.25; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Header ---------- */
.site-header {
  background: var(--cf-white);
  border-bottom: 1px solid var(--cf-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo svg { display: block; }
.product-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cf-dark);
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cf-gray);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--cf-orange); text-decoration: none; }
@media (max-width: 700px) {
  .site-nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--cf-blue) 0%, #1a3a7a 50%, #003682 100%);
  color: var(--cf-white);
  padding: 5rem 0;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  opacity: 0.9;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--cf-orange);
  color: var(--cf-white);
}
.btn-primary:hover { background: var(--cf-dark-orange); color: var(--cf-white); }
.btn-secondary {
  background: transparent;
  color: var(--cf-white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--cf-light-gray);
}
.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--cf-dark);
}
.section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--cf-dark);
}
.section h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section p {
  color: var(--cf-gray);
  margin-bottom: 1rem;
}
.section ul, .section ol {
  color: var(--cf-gray);
  margin-bottom: 1rem;
}
.section li { margin-bottom: 0.5rem; }

/* ---------- Highlight Box ---------- */
.highlight-box {
  background: var(--cf-white);
  border: 1px solid var(--cf-border);
  border-left: 4px solid var(--cf-orange);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.highlight-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cf-orange);
}
.highlight-box li { color: var(--cf-gray); }

/* ---------- Steps (How It Works) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step-number {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--cf-orange);
  color: var(--cf-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.step-content h3 { margin-top: 0.25rem; margin-bottom: 0.5rem; }
.step-content p { font-size: 0.9rem; margin-bottom: 0; }
.diagram-caption {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.diagram-caption p { margin: 0; color: var(--cf-blue); }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--cf-white);
  border: 1px solid var(--cf-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.section-alt .card {
  background: var(--cf-white);
}
.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.card h3, .card h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--cf-dark);
}
.card p { font-size: 0.9rem; color: var(--cf-gray); margin-bottom: 0.75rem; }
.card ul { font-size: 0.9rem; color: var(--cf-gray); margin-bottom: 0.75rem; }
.link-arrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cf-orange);
}

/* ---------- Comparison Table ---------- */
.comparison-table-wrapper {
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--cf-border);
  box-shadow: var(--shadow);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.comparison-table th, .comparison-table td {
  padding: 0.9rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--cf-border);
  vertical-align: top;
}
.comparison-table th {
  background: var(--cf-dark);
  color: var(--cf-white);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comparison-table th:first-child { border-top-left-radius: var(--radius); }
.comparison-table th:last-child { border-top-right-radius: var(--radius); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--cf-light-gray); }
.comparison-table td { color: var(--cf-gray); }
.comparison-table td strong { color: var(--cf-dark); }

/* ---------- Protection Layers ---------- */
.protection-layers {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.layer {
  flex: 1;
  min-width: 180px;
  background: var(--cf-white);
  border: 1px solid var(--cf-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.layer h3 {
  margin-top: 0;
  font-size: 0.95rem;
  color: var(--cf-orange);
  margin-bottom: 0.5rem;
}
.layer p { font-size: 0.85rem; margin: 0; }
.layer-arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--cf-orange);
  padding: 0 0.5rem;
  font-weight: 700;
}
@media (max-width: 700px) {
  .protection-layers { flex-direction: column; }
  .layer-arrow { transform: rotate(90deg); align-self: center; }
}

/* ---------- Notice ---------- */
.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--cf-orange);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: #7c3a1e;
  margin-top: 1.5rem;
}

/* ---------- Steps List (Numbered) ---------- */
.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
  margin: 1.5rem 0;
}
.steps-list li {
  counter-increment: step-counter;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
  color: var(--cf-gray);
  font-size: 0.95rem;
}
.steps-list li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--cf-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.1rem;
}
.steps-list li strong { color: var(--cf-dark); }

/* ---------- Analytics Grid ---------- */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.analytics-item {
  background: var(--cf-white);
  border: 1px solid var(--cf-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.analytics-item h4 {
  color: var(--cf-dark);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.analytics-item p { font-size: 0.875rem; color: var(--cf-gray); margin: 0; }

/* ---------- FAQs ---------- */
.faqs {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
details {
  background: var(--cf-white);
  border: 1px solid var(--cf-border);
  border-radius: var(--radius);
  overflow: hidden;
}
details[open] {
  border-color: var(--cf-orange);
  box-shadow: var(--shadow);
}
summary {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--cf-dark);
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--cf-orange);
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s;
}
details[open] summary::after {
  content: "−";
}
details > *:not(summary) {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--cf-gray);
}
details p, details li { font-size: 0.9rem; color: var(--cf-gray); }
details p:last-child { margin-bottom: 0; }
details ul { margin-top: 0.5rem; }

/* ---------- Resources ---------- */
.resource-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.resource-group h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cf-orange);
  color: var(--cf-dark);
  margin-top: 0;
}
.resource-list {
  list-style: none;
  padding: 0;
}
.resource-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--cf-border);
  font-size: 0.875rem;
}
.resource-list li:last-child { border-bottom: none; }
.resource-list a { color: var(--cf-orange); font-weight: 500; }
.resource-list a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cf-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0;
  text-align: center;
  font-size: 0.875rem;
}
.site-footer a { color: var(--cf-orange); }
.site-footer p { margin-bottom: 0.75rem; }
.footer-note {
  max-width: 600px;
  margin: 0 auto;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ---------- Print ---------- */
@media print {
  .site-header, .hero-cta, .site-footer { display: none; }
  .section { padding: 2rem 0; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.75em; }
}
