/* --- Variables --- */
:root {
  --blue: #4A90E2;
  --blue-dark: #3A7BD5;
  --blue-light: #EBF3FC;
  --gray: #B8C0C8;
  --gray-light: #F3F5F7;
  --dark: #1A1F2E;
  --dark-mid: #2D3348;
  --text: #1E293B;
  --text-mid: #475569;
  --text-light: #64748B;
  --white: #FFFFFF;
  --red: #EF4444;
  --orange: #F97316;
  --yellow: #EAB308;
  --green: #22C55E;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(26, 31, 46, 0.95);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--white);
  text-decoration: none;
}

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--white);
  background: var(--blue);
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.nav-cta:hover { background: var(--blue-dark); }

/* --- Hero --- */
.hero {
  position: relative;
  background: var(--dark);
  padding: 120px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 144, 226, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 144, 226, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  max-width: 640px;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  background: rgba(74, 144, 226, 0.12);
  padding: 6px 16px;
  border-radius: 24px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
}

.hero-highlight {
  color: var(--blue);
  position: relative;
}

.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  opacity: 0.5;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  padding: 14px 36px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.hero-cta:hover { background: var(--blue-dark); }
.hero-cta:active { transform: scale(0.98); }

/* Hero visual */
.hero-visual {
  position: relative;
  width: 220px;
  height: 220px;
  margin-top: 48px;
  z-index: 2;
}

.preview-gauge {
  position: relative;
  width: 100%;
  height: 100%;
}

.preview-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.preview-bg {
  fill: none;
  stroke: rgba(74, 144, 226, 0.1);
  stroke-width: 10;
}

.preview-fill {
  fill: none;
  stroke: var(--blue);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 160;
  animation: gauge-pulse 3s ease-in-out infinite;
}

@keyframes gauge-pulse {
  0%, 100% { stroke-dashoffset: 160; opacity: 0.7; }
  50% { stroke-dashoffset: 200; opacity: 1; }
}

.preview-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.preview-q {
  display: block;
  font-family: var(--serif);
  font-size: 3.5rem;
  color: var(--white);
  line-height: 1;
}

.preview-label {
  font-size: 0.875rem;
  color: var(--gray);
}

/* Floating tags */
.float-tag {
  position: absolute;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--white);
  background: var(--dark-mid);
  border: 1px solid rgba(74, 144, 226, 0.2);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}

.tag-website { top: 10px; left: -20px; animation-delay: 0s; }
.tag-reviews { top: 50%; right: -30px; animation-delay: 1.3s; }
.tag-gbp { bottom: 10px; left: -10px; animation-delay: 2.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--gray-light);
  border-top: 1px solid #E8ECF0;
  border-bottom: 1px solid #E8ECF0;
  padding: 28px 24px;
}

.stats-inner {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-number {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: #D5DAE0;
}

/* --- Section Shared --- */
.section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}

/* --- What We Check --- */
.what-section {
  padding: 72px 24px;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

.pillar {
  background: var(--white);
  border: 1px solid #E8ECF0;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pillar:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.08);
}

.pillar-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border-radius: 10px;
  color: var(--blue);
  margin-bottom: 16px;
}

.pillar-icon svg {
  width: 22px;
  height: 22px;
}

.pillar h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.pillar-points {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}

.pillar p:last-child {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.65;
}

/* --- Form Section --- */
.form-section {
  background: var(--gray-light);
  padding: 72px 24px;
}

.form-wrapper {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.form-text {
  text-align: center;
}

.form-description {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 24px;
}

.form-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-mid);
}

.trust-icon {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex-shrink: 0;
}

.form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.06);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-group .optional {
  font-weight: 400;
  color: var(--gray);
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-family: var(--sans);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input::placeholder {
  color: var(--gray);
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.12);
}

.form-group input.input-error {
  border-color: var(--red);
}

.error-msg {
  display: block;
  font-size: 0.75rem;
  color: var(--red);
  margin-top: 3px;
  min-height: 1em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* --- Buttons --- */
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-align: center;
  text-decoration: none;
  margin-top: 6px;
}

.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: #CBD5E1;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 16px auto 0;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 10px;
}

/* --- Loading --- */
.fullscreen-state {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.loading-content {
  text-align: center;
  max-width: 360px;
}

.loading-content h2 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  margin-bottom: 28px;
}

.loading-gauge {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
}

.loading-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.loading-bg {
  fill: none;
  stroke: var(--gray-light);
  stroke-width: 8;
}

.loading-fill {
  fill: none;
  stroke: var(--blue);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 400;
  animation: loading-spin 1.5s linear infinite;
}

@keyframes loading-spin {
  0% { stroke-dashoffset: 400; transform: rotate(0deg); }
  50% { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 400; transform: rotate(360deg); }
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--gray);
  transition: color 0.3s;
}

.loading-step.active {
  color: var(--blue);
  font-weight: 600;
}

.loading-step.done {
  color: var(--green);
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.loading-step.active .step-dot {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2);
}

.loading-step.done .step-dot {
  background: var(--green);
}

/* --- Results --- */
.results-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 24px 48px;
}

.results-hero {
  text-align: center;
  margin-bottom: 36px;
}

.results-hero .section-tag {
  margin-bottom: 6px;
}

.results-hero h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-mid);
  margin-bottom: 24px;
}

.score-gauge {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--gray-light);
  stroke-width: 12;
}

.gauge-fill {
  fill: none;
  stroke: var(--blue);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 2s ease-out, stroke 0.5s;
}

.score-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-number {
  display: block;
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--text);
}

.score-max {
  font-size: 1rem;
  color: var(--gray);
  font-weight: 500;
}

.score-label {
  font-size: 1.125rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 24px;
  display: inline-block;
}

/* --- Breakdown Cards --- */
.breakdown-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.breakdown-card {
  background: var(--white);
  border: 1px solid #E8ECF0;
  border-radius: 16px;
  padding: 24px;
}

.breakdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.breakdown-icon-wrap {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  border-radius: 9px;
  color: var(--blue);
  flex-shrink: 0;
}

.breakdown-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.breakdown-header h3 {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 400;
  flex: 1;
}

.breakdown-score {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-light);
  padding: 4px 10px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* --- Findings --- */
.findings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finding-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--gray-light);
  border-radius: 10px;
  font-size: 0.8125rem;
}

.finding-label {
  font-weight: 500;
  color: var(--text);
}

.finding-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.finding-value {
  color: var(--text-light);
  font-size: 0.75rem;
}

.finding-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.finding-badge.good { background: #F0FDF4; color: #16A34A; }
.finding-badge.okay { background: #FFFBEB; color: #CA8A04; }
.finding-badge.bad { background: #FEF2F2; color: #DC2626; }

/* --- Recommendations --- */
.recommendations-card {
  background: var(--white);
  border: 1px solid #E8ECF0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.recommendations-card h3 {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 16px;
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.rec-item.critical { background: #FEF2F2; border-left: 4px solid var(--red); }
.rec-item.high { background: #FFF7ED; border-left: 4px solid var(--orange); }
.rec-item.medium { background: var(--blue-light); border-left: 4px solid var(--blue); }

.rec-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.rec-item.critical .rec-badge { color: #DC2626; }
.rec-item.high .rec-badge { color: #EA580C; }
.rec-item.medium .rec-badge { color: var(--blue); }

/* --- Results CTA --- */
.results-cta {
  text-align: center;
  background: var(--dark);
  border-radius: 16px;
  padding: 40px 28px;
  margin-bottom: 16px;
}

.results-cta h3 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 8px;
}

.results-cta p {
  color: var(--gray);
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.results-cta .btn-primary {
  max-width: 300px;
  margin: 20px auto 0;
}

.results-cta .disclaimer {
  color: rgba(184, 192, 200, 0.6);
}

/* --- Error --- */
.error-content {
  text-align: center;
  max-width: 360px;
}

.error-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FEF2F2;
  border-radius: 50%;
  color: var(--red);
}

.error-icon-wrap svg { width: 28px; height: 28px; }

.error-content h2 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.error-content p {
  color: var(--text-mid);
  font-size: 0.9375rem;
  margin-bottom: 24px;
}

.error-content .btn-primary {
  max-width: 240px;
  margin: 0 auto;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid #E8ECF0;
  padding: 28px 24px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.footer p {
  font-size: 0.75rem;
  color: var(--gray);
}

/* --- Animations --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge { animation: fade-up 0.6s ease-out both; }
.hero h1 { animation: fade-up 0.6s ease-out 0.1s both; }
.hero-sub { animation: fade-up 0.6s ease-out 0.2s both; }
.hero-cta { animation: fade-up 0.6s ease-out 0.3s both; }
.hero-visual { animation: fade-up 0.8s ease-out 0.5s both; }

/* --- Responsive --- */
@media (min-width: 640px) {
  .nav { padding: 16px 40px; }

  .hero {
    padding: 140px 40px 80px;
  }

  .hero h1 { font-size: 3.25rem; }

  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
  }

  .form-text {
    text-align: left;
  }

  .form-trust {
    justify-content: flex-start;
  }

  .form-card {
    margin: 0;
    max-width: none;
  }

  .section-title { font-size: 2.25rem; }

  .results-container { padding-top: 100px; }
}

@media (min-width: 640px) {
  .tag-website { left: -40px; }
  .tag-reviews { right: -50px; }
  .tag-gbp { left: -30px; }
}

@media (min-width: 900px) {
  .hero h1 { font-size: 3.5rem; }
  .hero { padding: 160px 40px 100px; }
  .hero-visual { width: 260px; height: 260px; }
}
