/* ═══════════════════════════════════════════
   Masthead GEO Test — Apple-inspired dark UI
   ═══════════════════════════════════════════ */

:root {
  --bg: #000000;
  --bg-card: #0a0a0f;
  --bg-card-hover: #111118;
  --border: #1a1a2e;
  --border-light: #252540;
  --text: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.15);
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Scroll Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 140px 24px 80px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #a78bfa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── Input Group ── */
.hero-input-wrap {
  max-width: 600px;
  margin: 0 auto;
}
.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.input-icon {
  padding: 0 12px;
  color: var(--text-tertiary);
  display: flex;
  flex-shrink: 0;
}
#urlInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
  padding: 12px 4px;
  min-width: 0;
}
#urlInput::placeholder {
  color: var(--text-tertiary);
}
.btn-primary {
  flex-shrink: 0;
  padding: 12px 28px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.3s, opacity 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.spinner {
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.input-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 12px;
}

.error-msg {
  max-width: 600px;
  margin: 16px auto 0;
  padding: 12px 20px;
  background: var(--red-dim);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 14px;
  text-align: center;
}

/* ── Results Section ── */
.results {
  padding: 0 24px 80px;
}
.results-inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* Score Hero */
.score-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.score-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.score-ring { width: 100%; height: 100%; }
.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#scoreValue {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.score-max {
  font-size: 16px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.score-meta h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.score-url {
  color: var(--text-secondary);
  font-size: 14px;
  word-break: break-all;
}
.load-time {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 4px;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s, transform 0.2s;
}
.cat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.cat-header {
  margin-bottom: 16px;
}
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.schema-icon { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.semantic-icon { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.meta-icon { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.tech-icon { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }

.cat-info { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cat-info h3 { font-size: 16px; font-weight: 600; }
.cat-score { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.cat-score-val { color: var(--text); font-weight: 700; font-size: 16px; }

.cat-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.cat-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cat-card[data-cat="0"] .cat-bar { background: linear-gradient(90deg, #6366f1, #818cf8); }
.cat-card[data-cat="1"] .cat-bar { background: linear-gradient(90deg, #10b981, #34d399); }
.cat-card[data-cat="2"] .cat-bar { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cat-card[data-cat="3"] .cat-bar { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

/* Check list */
.check-list {
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  opacity: 0;
  transform: translateX(-10px);
  animation: checkIn 0.4s ease forwards;
}
.check-item:nth-child(1) { animation-delay: 0.1s; }
.check-item:nth-child(2) { animation-delay: 0.2s; }
.check-item:nth-child(3) { animation-delay: 0.3s; }
.check-item:nth-child(4) { animation-delay: 0.4s; }
.check-item:nth-child(5) { animation-delay: 0.5s; }
.check-item:nth-child(6) { animation-delay: 0.6s; }
@keyframes checkIn {
  to { opacity: 1; transform: translateX(0); }
}

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}
.check-pass { background: var(--green-dim); color: var(--green); }
.check-fail { background: var(--red-dim); color: var(--red); }
.check-partial { background: var(--amber-dim); color: var(--amber); }

.check-info {
  flex: 1;
}
.check-name {
  font-weight: 500;
  color: var(--text);
}
.check-detail {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.check-points {
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  font-weight: 500;
}

/* Results CTA */
.results-cta {
  text-align: center;
  padding: 64px 32px;
  background: linear-gradient(180deg, var(--bg-card), rgba(99, 102, 241, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.results-cta h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 16px;
}
.results-cta p {
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.7;
}
.btn-cta {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.3s;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35);
}

/* ── Info Sections ── */
.info-section {
  padding: 100px 24px;
}
.info-inner {
  max-width: 900px;
  margin: 0 auto;
}
.info-block {
  margin-bottom: 100px;
}
.info-block:last-child { margin-bottom: 0; }

.info-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  margin-bottom: 16px;
}
.info-block h2 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.info-block > p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
}

/* Stats */
.info-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.stat-num {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.stat-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Offering Grid */
.offering-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.offer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.2s;
}
.offer-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.offer-icon {
  font-size: 28px;
  margin-bottom: 12px;
}
.offer-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.offer-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-final {
  text-align: center;
  margin-top: 48px;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-brand a {
  color: var(--accent-light);
  text-decoration: none;
}
.footer-brand a:hover { text-decoration: underline; }
.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .hero { padding: 120px 20px 60px; }
  .input-group {
    flex-direction: column;
    gap: 0;
  }
  .input-icon { display: none; }
  #urlInput { padding: 14px 16px; font-size: 16px; width: 100%; }
  .btn-primary { width: 100%; justify-content: center; padding: 14px; }
  
  .score-hero {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
    gap: 24px;
  }
  
  .category-grid { grid-template-columns: 1fr; }
  .info-stats { grid-template-columns: 1fr; }
  .offering-grid { grid-template-columns: 1fr; }
  
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 16px; }
  #scoreValue { font-size: 40px; }
}
