/* ═══════════════════════════════════════════════════════════
   WEBSITE-HEALTH.CSS — Umbrella Corp HQ
   Website Health Checker Tool Styles
═══════════════════════════════════════════════════════════ */

/* ─── Hero ──────────────────────────────────────────────── */
.wh-hero {
  padding:    160px 0 80px;
  text-align: center;
  position:   relative;
  overflow:   hidden;
}

.wh-hero::before {
  content:    '';
  position:   absolute;
  top:        -200px;
  left:       50%;
  transform:  translateX(-50%);
  width:      700px;
  height:     700px;
  background: radial-gradient(circle, rgba(193,18,31,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.wh-badge {
  display:        inline-flex;
  align-items:    center;
  gap:            8px;
  padding:        6px 16px;
  background:     rgba(193,18,31,0.1);
  border:         1px solid rgba(193,18,31,0.25);
  border-radius:  980px;
  font-size:      12px;
  font-weight:    600;
  color:          var(--corp-red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom:  24px;
}

.wh-badge svg { width: 14px; height: 14px; }

.wh-hero h1 {
  font-size:      clamp(40px, 5.5vw, 72px);
  font-weight:    700;
  line-height:    1.05;
  letter-spacing: -0.02em;
  color:          var(--ivory);
  margin-bottom:  20px;
}

.wh-hero h1 span { color: var(--corp-red); }

.wh-hero p {
  font-size:  19px;
  color:      var(--steel);
  max-width:  560px;
  margin:     0 auto 48px;
  line-height: 1.5;
}

/* ─── URL Input ─────────────────────────────────────────── */
.wh-input-wrap {
  max-width:      640px;
  margin:         0 auto;
  display:        flex;
  gap:            12px;
  align-items:    stretch;
}

.wh-url-field {
  flex:           1;
  display:        flex;
  align-items:    center;
  gap:            12px;
  background:     rgba(255,255,255,0.04);
  border:         1px solid rgba(255,255,255,0.1);
  border-radius:  14px;
  padding:        0 20px;
  transition:     border-color 0.2s ease, box-shadow 0.2s ease;
}

.wh-url-field:focus-within {
  border-color: rgba(193,18,31,0.5);
  box-shadow:   0 0 0 3px rgba(193,18,31,0.08);
}

.wh-url-field svg {
  width:      18px;
  height:     18px;
  color:      var(--steel);
  flex-shrink: 0;
}

.wh-url-field input {
  flex:        1;
  background:  transparent;
  border:      none;
  outline:     none;
  color:       var(--ivory);
  font-size:   15px;
  font-family: var(--font-body);
  padding:     18px 0;
}

.wh-url-field input::placeholder { color: var(--steel); }

.wh-scan-btn {
  padding:        18px 32px;
  background:     var(--corp-red);
  color:          var(--ivory);
  border:         none;
  border-radius:  14px;
  font-family:    var(--font-body);
  font-size:      15px;
  font-weight:    600;
  cursor:         pointer;
  white-space:    nowrap;
  transition:     background 0.2s ease, transform 0.15s ease;
  display:        flex;
  align-items:    center;
  gap:            8px;
}

.wh-scan-btn:hover { background: var(--deep-red); transform: translateY(-1px); }
.wh-scan-btn:active { transform: translateY(0); }
.wh-scan-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.wh-scan-btn svg { width: 18px; height: 18px; }

.wh-disclaimer {
  margin-top:  16px;
  font-size:   12px;
  color:       rgba(85,85,85,0.8);
}

/* ─── Loading ───────────────────────────────────────────── */
.wh-loading {
  display:    none;
  padding:    60px 0 80px;
  text-align: center;
}

.wh-loading.is-active { display: block; }

/* Radar */
.wh-radar {
  width:    72px;
  height:   72px;
  margin:   0 auto 28px;
  position: relative;
}

.wh-radar svg {
  width:    100%;
  height:   100%;
  animation: wh-spin 2s linear infinite;
}

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

/* Pulse ring around radar */
.wh-radar::after {
  content:       '';
  position:      absolute;
  inset:         -10px;
  border-radius: 50%;
  border:        1.5px solid rgba(193,18,31,0.25);
  animation:     wh-pulse 2s ease-out infinite;
}

@keyframes wh-pulse {
  0%   { transform: scale(0.85); opacity: 0.8; }
  70%  { transform: scale(1.2);  opacity: 0; }
  100% { transform: scale(1.2);  opacity: 0; }
}

.wh-loading-title {
  font-size:     22px;
  font-weight:   600;
  color:         var(--ivory);
  margin-bottom: 6px;
}

.wh-loading-url {
  font-size:     13px;
  color:         var(--corp-red);
  margin-bottom: 32px;
  word-break:    break-all;
}

/* ── Step list ── */
.wh-steps {
  list-style:    none;
  max-width:     340px;
  margin:        0 auto 32px;
  display:       flex;
  flex-direction: column;
  gap:           10px;
  text-align:    left;
}

.wh-step {
  display:       flex;
  align-items:   center;
  gap:           12px;
  padding:       10px 14px;
  border-radius: 10px;
  font-size:     14px;
  color:         var(--steel);
  background:    rgba(255,255,255,0.02);
  border:        1px solid rgba(255,255,255,0.04);
  transition:    all 0.3s ease;
}

.wh-step.is-active {
  color:        var(--ivory);
  background:   rgba(193,18,31,0.06);
  border-color: rgba(193,18,31,0.2);
}

.wh-step.is-done {
  color:        #30d158;
  background:   rgba(48,209,88,0.05);
  border-color: rgba(48,209,88,0.15);
}

.wh-step-icon {
  width:         20px;
  height:        20px;
  flex-shrink:   0;
  display:       flex;
  align-items:   center;
  justify-content: center;
}

/* Spinner for active step */
.wh-step-spinner {
  width:         16px;
  height:        16px;
  border:        2px solid rgba(193,18,31,0.2);
  border-top-color: var(--corp-red);
  border-radius: 50%;
  animation:     wh-spin 0.7s linear infinite;
}

/* Checkmark for done step */
.wh-step-check {
  width:  16px;
  height: 16px;
  color:  #30d158;
}

/* Dot for pending step */
.wh-step-dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
  background:    rgba(255,255,255,0.12);
  margin:        auto;
}

/* ── Status message ── */
.wh-loading-status {
  font-size:   13px;
  color:       var(--steel);
  min-height:  20px;
  margin-bottom: 20px;
  font-style:  italic;
  transition:  opacity 0.4s ease;
}

/* ── Progress bar ── */
.wh-loading-bar-wrap {
  max-width:     340px;
  margin:        0 auto;
  background:    rgba(255,255,255,0.05);
  border-radius: 4px;
  height:        3px;
  overflow:      hidden;
}

.wh-loading-bar {
  height:        100%;
  background:    linear-gradient(90deg, var(--corp-red), #ff6b6b);
  width:         0%;
  border-radius: 4px;
  transition:    width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* Shimmer effect on bar */
.wh-loading-bar::after {
  content:    '';
  position:   absolute;
  top:        0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation:  wh-shimmer 1.5s infinite;
}

@keyframes wh-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.wh-loading-bar-wrap { position: relative; }

/* ─── Error ─────────────────────────────────────────────── */
.wh-error {
  display:       none;
  max-width:     560px;
  margin:        40px auto;
  padding:       24px 28px;
  background:    rgba(193,18,31,0.08);
  border:        1px solid rgba(193,18,31,0.25);
  border-radius: 16px;
  text-align:    left;
}

.wh-error.is-active { display: block; }

.wh-error-title {
  font-size:     16px;
  font-weight:   600;
  color:         var(--corp-red);
  margin-bottom: 8px;
  display:       flex;
  align-items:   center;
  gap:           8px;
}

.wh-error-msg { font-size: 14px; color: var(--steel); }

/* ─── Results ───────────────────────────────────────────── */
.wh-results {
  display: none;
  padding: 20px 0 100px;
}

.wh-results.is-active { display: block; }

/* Scan meta bar */
.wh-meta-bar {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         16px 24px;
  background:      rgba(255,255,255,0.03);
  border:          1px solid rgba(255,255,255,0.06);
  border-radius:   12px;
  margin-bottom:   40px;
  flex-wrap:       wrap;
  gap:             12px;
}

.wh-scanned-url {
  display:     flex;
  align-items: center;
  gap:         8px;
  font-size:   14px;
  color:       var(--ivory);
  font-weight: 500;
  word-break:  break-all;
}

.wh-scanned-url svg { width: 16px; height: 16px; color: var(--corp-red); flex-shrink: 0; }

.wh-rescan-btn {
  padding:        8px 20px;
  background:     transparent;
  border:         1px solid rgba(255,255,255,0.12);
  border-radius:  980px;
  color:          var(--ivory);
  font-size:      13px;
  font-family:    var(--font-body);
  cursor:         pointer;
  transition:     all 0.2s ease;
  white-space:    nowrap;
}

.wh-rescan-btn:hover {
  border-color: var(--corp-red);
  color:        var(--corp-red);
}

/* ─── Score Overview ────────────────────────────────────── */
.wh-scores-grid {
  display:               grid;
  grid-template-columns: 1fr 3fr;
  gap:                   32px;
  margin-bottom:         40px;
  align-items:           center;
}

@media (max-width: 900px) {
  .wh-scores-grid { grid-template-columns: 1fr; }
}

/* Big score circle */
.wh-overall-wrap {
  text-align: center;
}

.wh-overall-circle {
  position:   relative;
  width:      160px;
  height:     160px;
  margin:     0 auto 16px;
}

.wh-overall-circle svg {
  width:     100%;
  height:    100%;
  transform: rotate(-90deg);
}

.wh-circle-bg {
  fill:           none;
  stroke:         rgba(255,255,255,0.06);
  stroke-width:   10;
}

.wh-circle-fill {
  fill:                none;
  stroke-width:        10;
  stroke-linecap:      round;
  stroke-dasharray:    427;
  stroke-dashoffset:   427;
  transition:          stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1);
}

.wh-overall-num {
  position:    absolute;
  top:         50%;
  left:        50%;
  transform:   translate(-50%,-50%);
  font-size:   48px;
  font-weight: 700;
  line-height: 1;
  color:       var(--ivory);
}

.wh-overall-label {
  font-size:   13px;
  color:       var(--steel);
  font-weight: 500;
}

.wh-overall-grade {
  display:        inline-block;
  margin-top:     8px;
  padding:        4px 16px;
  border-radius:  980px;
  font-size:      13px;
  font-weight:    700;
}

/* Category score cards */
.wh-cat-grid {
  display:               grid;
  grid-template-columns: repeat(4, 1fr);
  gap:                   16px;
}

@media (max-width: 768px) {
  .wh-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

.wh-cat-card {
  background:    rgba(255,255,255,0.03);
  border:        1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding:       20px;
  text-align:    center;
  transition:    border-color 0.2s ease;
}

.wh-cat-card:hover { border-color: rgba(255,255,255,0.12); }

.wh-cat-icon {
  width:         40px;
  height:        40px;
  border-radius: 10px;
  margin:        0 auto 12px;
  display:       flex;
  align-items:   center;
  justify-content: center;
}

.wh-cat-icon svg { width: 20px; height: 20px; }

.wh-cat-score {
  font-size:   32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.wh-cat-name {
  font-size:  12px;
  color:      var(--steel);
  font-weight: 500;
}

.wh-cat-bar-wrap {
  margin-top:    10px;
  height:        3px;
  background:    rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow:      hidden;
}

.wh-cat-bar {
  height:        100%;
  border-radius: 2px;
  width:         0%;
  transition:    width 1s ease 0.3s;
}

/* Score colour helpers */
.score-good  { color: #30d158; }
.score-avg   { color: #ffd60a; }
.score-poor  { color: #ff453a; }
.bar-good    { background: #30d158; }
.bar-avg     { background: #ffd60a; }
.bar-poor    { background: #ff453a; }
.fill-good   { stroke: #30d158; }
.fill-avg    { stroke: #ffd60a; }
.fill-poor   { stroke: #ff453a; }
.grade-good  { background: rgba(48,209,88,0.12); color: #30d158; border: 1px solid rgba(48,209,88,0.25); }
.grade-avg   { background: rgba(255,214,10,0.12); color: #ffd60a; border: 1px solid rgba(255,214,10,0.25); }
.grade-poor  { background: rgba(255,69,58,0.12);  color: #ff453a; border: 1px solid rgba(255,69,58,0.25); }
.icon-good   { background: rgba(48,209,88,0.12);  color: #30d158; }
.icon-avg    { background: rgba(255,214,10,0.12); color: #ffd60a; }
.icon-poor   { background: rgba(255,69,58,0.12);  color: #ff453a; }
.icon-blue   { background: rgba(10,132,255,0.12); color: #0a84ff; }

/* ─── Core Web Vitals ───────────────────────────────────── */
.wh-section-title {
  font-size:     20px;
  font-weight:   700;
  color:         var(--ivory);
  margin-bottom: 20px;
  display:       flex;
  align-items:   center;
  gap:           10px;
}

.wh-section-title svg { width: 20px; height: 20px; color: var(--corp-red); }

.wh-vitals-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   16px;
  margin-bottom:         40px;
}

@media (max-width: 768px) {
  .wh-vitals-grid { grid-template-columns: 1fr 1fr; }
}

.wh-vital-card {
  background:    rgba(255,255,255,0.03);
  border:        1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding:       20px 24px;
  position:      relative;
  overflow:      hidden;
}

.wh-vital-card::before {
  content:       '';
  position:      absolute;
  top:           0;
  left:          0;
  right:         0;
  height:        3px;
  border-radius: 16px 16px 0 0;
}

.wh-vital-card.v-good::before  { background: #30d158; }
.wh-vital-card.v-avg::before   { background: #ffd60a; }
.wh-vital-card.v-poor::before  { background: #ff453a; }

.wh-vital-name {
  font-size:   12px;
  color:       var(--steel);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.wh-vital-value {
  font-size:   28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.wh-vital-desc {
  font-size: 12px;
  color:     var(--steel);
}

/* ─── AI Analysis ───────────────────────────────────────── */
.wh-ai-section {
  margin-bottom: 40px;
}

.wh-ai-card {
  background:    rgba(255,255,255,0.03);
  border:        1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding:       32px;
}

.wh-ai-header {
  display:       flex;
  align-items:   center;
  gap:           12px;
  margin-bottom: 24px;
}

.wh-ai-icon {
  width:         44px;
  height:        44px;
  background:    rgba(193,18,31,0.1);
  border:        1px solid rgba(193,18,31,0.2);
  border-radius: 12px;
  display:       flex;
  align-items:   center;
  justify-content: center;
}

.wh-ai-icon svg { width: 22px; height: 22px; color: var(--corp-red); }

.wh-ai-header-text h3 {
  font-size:   18px;
  font-weight: 600;
  color:       var(--ivory);
  margin-bottom: 2px;
}

.wh-ai-header-text p {
  font-size: 13px;
  color:     var(--steel);
  margin: 0;
}

.wh-ai-summary {
  font-size:   16px;
  line-height: 1.7;
  color:       rgba(240,237,232,0.85);
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.wh-issues-list {
  list-style: none;
  display:    flex;
  flex-direction: column;
  gap:        12px;
  margin-bottom: 28px;
}

.wh-issue-item {
  display:       flex;
  align-items:   flex-start;
  gap:           12px;
  padding:       14px 16px;
  border-radius: 12px;
  font-size:     14px;
  line-height:   1.5;
}

.wh-issue-item.issue-critical {
  background: rgba(255,69,58,0.06);
  border:     1px solid rgba(255,69,58,0.15);
  color:      rgba(240,237,232,0.9);
}

.wh-issue-item.issue-warning {
  background: rgba(255,214,10,0.06);
  border:     1px solid rgba(255,214,10,0.15);
  color:      rgba(240,237,232,0.9);
}

.wh-issue-item.issue-pass {
  background: rgba(48,209,88,0.06);
  border:     1px solid rgba(48,209,88,0.15);
  color:      rgba(240,237,232,0.9);
}

.wh-issue-dot {
  width:        8px;
  height:       8px;
  border-radius: 50%;
  flex-shrink:  0;
  margin-top:   5px;
}

.issue-critical .wh-issue-dot { background: #ff453a; }
.issue-warning  .wh-issue-dot { background: #ffd60a; }
.issue-pass     .wh-issue-dot { background: #30d158; }

.wh-recs-title {
  font-size:   15px;
  font-weight: 600;
  color:       var(--ivory);
  margin-bottom: 14px;
}

.wh-recs-list {
  list-style: none;
  display:    flex;
  flex-direction: column;
  gap:        10px;
}

.wh-rec-item {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
  font-size:   14px;
  color:       rgba(240,237,232,0.8);
  line-height: 1.5;
}

.wh-rec-num {
  width:         22px;
  height:        22px;
  background:    rgba(193,18,31,0.15);
  border:        1px solid rgba(193,18,31,0.25);
  border-radius: 50%;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     11px;
  font-weight:   700;
  color:         var(--corp-red);
  flex-shrink:   0;
  margin-top:    1px;
}

/* ─── Device toggle ─────────────────────────────────────── */
.wh-device-toggle {
  display:       flex;
  gap:           8px;
  margin-bottom: 32px;
}

.wh-device-btn {
  display:     flex;
  align-items: center;
  gap:         6px;
  padding:     8px 20px;
  background:  rgba(255,255,255,0.04);
  border:      1px solid rgba(255,255,255,0.08);
  border-radius: 980px;
  font-size:   13px;
  font-family: var(--font-body);
  color:       var(--steel);
  cursor:      pointer;
  transition:  all 0.2s ease;
}

.wh-device-btn svg { width: 16px; height: 16px; }

.wh-device-btn.is-active {
  background:   rgba(193,18,31,0.1);
  border-color: rgba(193,18,31,0.3);
  color:        var(--corp-red);
}

/* ─── CTA ───────────────────────────────────────────────── */
.wh-cta {
  margin-top:    40px;
  padding:       40px;
  background:    rgba(193,18,31,0.06);
  border:        1px solid rgba(193,18,31,0.15);
  border-radius: 20px;
  text-align:    center;
}

.wh-cta h3 {
  font-size:   24px;
  font-weight: 700;
  color:       var(--ivory);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.wh-cta p {
  font-size:   16px;
  color:       var(--steel);
  margin-bottom: 24px;
}

/* ─── Streaming text ────────────────────────────────────── */
.wh-ai-summary.is-streaming::after {
  content:    '▊';
  animation:  wh-blink 0.7s step-end infinite;
  color:      var(--corp-red);
}

@keyframes wh-blink { 50% { opacity: 0; } }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .wh-input-wrap   { flex-direction: column; }
  .wh-scan-btn     { width: 100%; justify-content: center; }
  .wh-vitals-grid  { grid-template-columns: 1fr; }
  .wh-overall-circle { width: 130px; height: 130px; }
  .wh-overall-num  { font-size: 38px; }
  .wh-ai-card      { padding: 20px; }
}
