/* =========================================================================
 * Expend Stat marketing site — shared styles
 * Pure CSS, no external dependencies, mobile-friendly.
 * ========================================================================= */

:root {
  --brand-50:  #EFF6FF;
  --brand-100: #DBEAFE;
  --brand-200: #BFDBFE;
  --brand-500: #3B82F6;
  --brand-600: #2563EB;
  --brand-700: #1D4ED8;
  --brand-800: #1E40AF;
  --accent-500: #10B981;

  --bg:        #F8FAFC;
  --surface:   #FFFFFF;
  --border:    #E2E8F0;
  --ink:       #0F172A;
  --ink-2:     #1E293B;
  --muted:     #475569;
  --muted-2:   #64748B;
  --soft:      #94A3B8;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-700);
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--muted);
}

ul li, ol li {
  margin-bottom: 0.4rem;
}

code {
  font-family: "SF Mono", "Menlo", "Monaco", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--brand-50);
  color: var(--brand-700);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Header / Nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.brand img,
.brand svg {
  height: 32px;
  width: auto;
  max-width: 140px;
  display: block;
  object-fit: contain;
}

.brand:hover {
  color: var(--brand-700);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-700);
}

.nav-links a.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.nav-links a.nav-cta:hover {
  background: var(--brand-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

/* ----- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
    linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #3B82F6 100%);
  color: #fff;
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.14);
  color: #DBEAFE;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 18px;
  max-width: 22ch;
}

.hero .hero-sub {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 56ch;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: 0;
}

.btn-primary {
  background: #fff;
  color: var(--brand-700);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--brand-50);
  color: var(--brand-800);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ----- Section ---------------------------------------------------------- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: #fff;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--brand-700);
  background: var(--brand-50);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0 0 12px;
}

.section-head p {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--muted);
}

/* ----- Feature grid ----------------------------------------------------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: 700;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
}

/* ----- Steps ------------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-200);
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

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

/* ----- Highlight / callout --------------------------------------------- */
.callout {
  background: linear-gradient(135deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-xl);
  padding: 36px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

@media (max-width: 700px) {
  .callout { grid-template-columns: 1fr; }
}

.callout h3 {
  margin-bottom: 8px;
}

.callout p {
  margin: 0;
}

/* ----- Footer ----------------------------------------------------------- */
.site-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 56px 0 32px;
  margin-top: 80px;
}

.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-grid p {
  color: #94A3B8;
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.footer-grid a {
  display: block;
  color: #CBD5E1;
  font-size: 0.92rem;
  padding: 4px 0;
}

.footer-grid a:hover { color: #fff; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #1E293B;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #64748B;
}

/* ----- Policy / Legal pages -------------------------------------------- */
.policy {
  background: #fff;
  padding: 56px 0 96px;
}

.policy .container {
  max-width: 820px;
}

.policy-head {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.policy-head h1 {
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.policy-head .meta {
  color: var(--muted-2);
  font-size: 0.92rem;
  margin: 0;
}

.policy section {
  margin-bottom: 32px;
}

.policy h2 {
  font-size: 1.45rem;
  margin: 0 0 12px;
  padding-top: 8px;
}

.policy h3 {
  font-size: 1.1rem;
  margin: 16px 0 8px;
}

.policy p {
  color: var(--ink-2);
}

.policy ul, .policy ol {
  color: var(--ink-2);
}

.policy .toc {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 36px;
}

.policy .toc h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--brand-800);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.policy .toc ol {
  margin: 0;
  padding-left: 1.4rem;
  columns: 2;
  column-gap: 24px;
}

@media (max-width: 600px) {
  .policy .toc ol { columns: 1; }
}

.policy .toc a {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.policy .toc a:hover { color: var(--brand-700); }

.policy .notice {
  border-left: 4px solid var(--brand-500);
  background: var(--brand-50);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 12px 0 16px;
}

.policy .notice strong {
  color: var(--brand-800);
}

.policy .notice p:last-child { margin-bottom: 0; }

.policy .bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 12px 0 20px;
}

.policy .bilingual h4 {
  font-size: 0.78rem;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
}

.policy .bilingual p:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
  .policy .bilingual { grid-template-columns: 1fr; }
}

.policy .contact-card {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.policy .contact-card p { margin-bottom: 4px; }
.policy .contact-card p:last-child { margin-bottom: 0; }

/* ----- Anchor offset for sticky header --------------------------------- */
:target {
  scroll-margin-top: 84px;
}
