/* SlopeLift Design System */
:root {
  --navy: #1A485E;
  --teal: #007B90;
  --lift-blue: #3BB0C7;

  --coral: #FE7C5C;
  --misty-rose: #FEE3E8;
  --turquoise: #B2F8EA;
  --light-blue: #96C4FC;
  --lime-mist: #E1FEA7;
  --lavender: #C5B8F5;

  --text: #2D2D2D;
  --text-muted: #666;
  --bg-light: #F5F7FA;
  --border: #D0D8E0;
  --white: #fff;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(26,72,94,.10);
  --shadow-hover: 0 6px 28px rgba(26,72,94,.18);

  --font: 'Montserrat', 'Lato', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-light);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Typography ── */
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; color: var(--navy); }
h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 700; color: var(--navy); border-bottom: 3px solid var(--lift-blue); padding-bottom: 8px; margin-bottom: 24px; }
h3 { font-size: 1.1rem; font-weight: 700; color: var(--teal); }
p { color: var(--text); }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--navy); }

/* ── Layout ── */
#app { min-height: 100vh; }

.page { animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Nav ── */
.site-header {
  background: var(--navy);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.site-header .logo-text {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: .5px;
}

.site-header .logo-text span {
  color: var(--lift-blue);
}

.site-header .tagline {
  font-size: .75rem;
  color: var(--lift-blue);
  opacity: .85;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}

.breadcrumb a {
  color: var(--lift-blue);
  cursor: pointer;
}

.breadcrumb .sep { opacity: .4; }

/* ── Home: Tile Grid ── */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  padding: 56px 24px;
  text-align: center;
}

.home-hero h1 { color: var(--white); margin-bottom: 12px; }
.home-hero p { color: rgba(255,255,255,.8); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 40px 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.study-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  border-top: 4px solid transparent;
  text-decoration: none;
}

.study-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.study-card.featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  border-top-color: var(--lime-mist);
  background: linear-gradient(135deg, #f8fff0 0%, #fffff5 100%);
}

.study-card.seo {
  border-top-color: var(--misty-rose);
}

.card-accent {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

.study-card.featured .card-accent {
  width: 72px;
  height: 72px;
  font-size: 2rem;
  background: var(--lime-mist);
}

.study-card.seo .card-accent {
  background: var(--misty-rose);
}

.card-body { flex: 1; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.status-badge.live {
  background: var(--lime-mist);
  color: #3a6b0a;
}

.status-badge.live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ab71b;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.status-badge.year {
  background: var(--misty-rose);
  color: #8a3044;
}

.card-body h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.study-card.featured .card-body h3 {
  font-size: 1.5rem;
}

.card-body p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-partner {
  font-size: .7rem;
  color: var(--text-muted);
  opacity: .7;
  margin-top: 4px;
}

.card-arrow {
  font-size: 1.4rem;
  color: var(--teal);
  transition: transform .2s;
  flex-shrink: 0;
}

.study-card:hover .card-arrow { transform: translateX(4px); }

/* ── Gate (LeadGen) ── */
.gate-wrapper {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(160deg, #f0fff4 0%, #fffff0 100%);
}

.gate-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(26,72,94,.14);
  padding: 48px 40px;
  max-width: 500px;
  width: 100%;
}

.gate-card .gate-icon {
  width: 64px;
  height: 64px;
  background: var(--lime-mist);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

.gate-card h2 {
  border: none;
  padding: 0;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.gate-card .gate-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; letter-spacing: .3px; }
.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  transition: border-color .18s;
  outline: none;
}

.form-group input:focus { border-color: var(--teal); }
.form-group input.error { border-color: var(--coral); }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--teal);
  margin-top: 2px;
  cursor: pointer;
}

.consent-row label {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .18s, transform .15s, box-shadow .18s;
  text-decoration: none;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  width: 100%;
}

.btn-primary:hover { background: var(--teal); box-shadow: 0 4px 16px rgba(0,123,144,.3); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}

.btn-ghost:hover { background: var(--teal); color: var(--white); }

.form-error {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 16px;
  display: none;
}

.form-error.show { display: block; }

/* ── Dashboard ── */
.dashboard-page { padding-bottom: 80px; }

.dashboard-hero {
  background: var(--navy);
  color: var(--white);
  padding: 40px 24px;
}

.dashboard-hero .container { display: flex; align-items: center; gap: 20px; justify-content: space-between; }

.dashboard-hero-text h1 { color: var(--white); }
.dashboard-hero-text .study-meta { color: rgba(255,255,255,.65); font-size: .85rem; margin-top: 4px; }
.dashboard-hero-text p { color: rgba(255,255,255,.85); margin-top: 12px; max-width: 640px; line-height: 1.7; font-size: .95rem; }

.dashboard-hero .hero-badge {
  flex-shrink: 0;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 16px 24px;
  text-align: center;
}

.dashboard-hero .hero-badge .badge-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--lift-blue);
}

.dashboard-hero .hero-badge .badge-label {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}

.dashboard-section { padding: 40px 24px 0; max-width: 1140px; margin: 0 auto; }

/* Key Findings */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 0;
}

.finding-card {
  background: var(--white);
  border-left: 4px solid var(--lift-blue);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text);
}

.finding-card.highlight {
  background: var(--lime-mist);
  border-left-color: var(--teal);
}

/* Industry Dropdown */
.industry-select-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.industry-select-wrap label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
}

.industry-select {
  padding: 9px 36px 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9rem;
  color: var(--navy);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23007B90' fill='none' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color .18s;
}

.industry-select:focus { outline: none; border-color: var(--teal); }

/* KPI Tiles */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.kpi-tile {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.kpi-tile .kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.kpi-tile .kpi-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.kpi-tile .kpi-sub {
  font-size: .8rem;
  color: var(--lift-blue);
  margin-top: 4px;
  font-weight: 600;
}

/* Insights Text */
.insights-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  line-height: 1.8;
}

.insights-box p { margin-bottom: 12px; }
.insights-box p:last-child { margin-bottom: 0; }

/* Chart */
.chart-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  overflow-x: auto;
}

.chart-wrap canvas { min-width: 500px; }

/* Ranking Table */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ranking-table thead tr { background: var(--navy); }
.ranking-table thead th { color: var(--white); padding: 12px 16px; text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.ranking-table tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
.ranking-table tbody tr:last-child { border-bottom: none; }
.ranking-table tbody tr:hover { background: var(--bg-light); }
.ranking-table tbody td { padding: 12px 16px; font-size: .9rem; }
.ranking-table .rank-num { font-weight: 700; color: var(--navy); width: 40px; }
.ranking-table .rank-domain { font-weight: 600; color: var(--text); }
.ranking-table .rank-score { color: var(--teal); font-weight: 700; }
.ranking-table .rank-trend { font-size: 1rem; }
.ranking-table tbody tr:nth-child(1) .rank-num { color: #b7860b; }
.ranking-table tbody tr:nth-child(2) .rank-num { color: #7a8c99; }
.ranking-table tbody tr:nth-child(3) .rank-num { color: #9c6244; }

/* TBA Block */
.tba-block {
  background: var(--white);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  padding: 40px;
  text-align: center;
}

.tba-block .tba-icon { font-size: 2.5rem; margin-bottom: 12px; }
.tba-block h3 { color: var(--navy); margin-bottom: 8px; }
.tba-block p { color: var(--text-muted); font-size: .9rem; }

/* Contact: Marietta */
.contact-section {
  background: var(--navy);
  color: var(--white);
  padding: 48px 24px;
  margin-top: 40px;
}

.contact-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.contact-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--lift-blue);
}

.contact-avatar-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(59,176,199,.2);
  border: 3px solid var(--lift-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.contact-info h3 { color: var(--lift-blue); font-size: 1.1rem; margin-bottom: 2px; }
.contact-info .contact-title { color: rgba(255,255,255,.65); font-size: .85rem; margin-bottom: 12px; }
.contact-info p { color: rgba(255,255,255,.8); font-size: .9rem; line-height: 1.7; margin-bottom: 16px; }

.contact-form-inline { display: flex; flex-direction: column; gap: 10px; }
.contact-form-inline input,
.contact-form-inline textarea {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: var(--white);
  font-family: var(--font);
  font-size: .9rem;
  outline: none;
  transition: border-color .18s;
}

.contact-form-inline input::placeholder,
.contact-form-inline textarea::placeholder { color: rgba(255,255,255,.4); }
.contact-form-inline input:focus,
.contact-form-inline textarea:focus { border-color: var(--lift-blue); }
.contact-form-inline textarea { min-height: 80px; resize: vertical; }

.contact-form-inline .btn-contact {
  background: var(--lift-blue);
  color: var(--navy);
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  cursor: pointer;
  transition: background .18s;
  align-self: flex-start;
}

.contact-form-inline .btn-contact:hover { background: var(--white); }

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 20px;
  font-size: .78rem;
}

.site-footer a { color: var(--lift-blue); }

/* ── Utility ── */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.success-msg {
  background: #f0fff4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: .9rem;
  text-align: center;
  margin-top: 16px;
  display: none;
}

.success-msg.show { display: block; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .studies-grid { grid-template-columns: 1fr; }
  .study-card.featured { grid-column: span 1; flex-direction: column; }
  .dashboard-hero .container { flex-direction: column; align-items: flex-start; }
  .contact-inner { flex-direction: column; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .gate-card { padding: 32px 24px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
