/*
  Piper AEO Scanner
  Palette:
    Dark Brown:  #2F1904
    Copper:      #DD532B
    Warm Gold:   #E9B42C
    Teal:        #708588
    Off-white:   #FDF8F3
    White:       #FFFFFF
*/

/* ─── Reset & Base ──────────────────────────────── */

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

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: #2F1904;
  background: #FDF8F3;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: #DD532B; text-decoration: none; }
a:hover { color: #A85A2A; }

/* ─── Header ────────────────────────────────────── */

.site-header {
  padding: 16px 0;
  border-bottom: 1px solid rgba(47, 25, 4, 0.08);
  background: #FDF8F3;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #2F1904;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.brand-text {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand-light { font-weight: 400; color: #DD532B; }

.header-link {
  font-size: 13px;
  color: #708588;
  letter-spacing: 0.02em;
}

/* ─── Hero ──────────────────────────────────────── */

.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #DD532B;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  color: #2F1904;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #DD532B, #E9B42C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: #708588;
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ─── Scan Panel ────────────────────────────────── */

.scan-panel {
  max-width: 620px;
  margin: 0 auto;
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-wrap {
  flex: 1;
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #708588;
  pointer-events: none;
}

.scan-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 2px solid rgba(47, 25, 4, 0.12);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #2F1904;
  background: #FFFFFF;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.scan-input:focus {
  border-color: #DD532B;
  box-shadow: 0 0 0 3px rgba(205, 115, 62, 0.12);
}

.scan-input::placeholder { color: #B0A89F; }

.btn-scan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #DD532B;
  color: #FDF8F3;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.btn-scan:hover { background: #DD532B; }
.btn-scan:active { transform: scale(0.98); }

.scan-note {
  text-align: center;
  font-size: 13px;
  color: #B0A89F;
  margin-top: 12px;
}

/* ─── Loading ───────────────────────────────────── */

.loading-card {
  text-align: center;
  padding: 60px 20px;
  margin: 40px 0;
  background: #FFFFFF;
  border: 1px solid rgba(47, 25, 4, 0.06);
  border-radius: 16px;
}

.scanner-anim {
  width: 200px;
  height: 4px;
  background: rgba(205, 115, 62, 0.12);
  border-radius: 4px;
  margin: 0 auto 24px;
  overflow: hidden;
  position: relative;
}

.scan-line {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #DD532B, transparent);
  border-radius: 4px;
  animation: scanSlide 1.2s ease-in-out infinite;
}

@keyframes scanSlide {
  0% { left: -40%; }
  100% { left: 100%; }
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #2F1904;
}

.dots span {
  animation: dotPulse 1.4s infinite;
  opacity: 0;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

.loading-sub {
  font-size: 14px;
  color: #708588;
  margin-top: 8px;
}

/* ─── Error ─────────────────────────────────────── */

.error-msg {
  padding: 16px 20px;
  background: #FDE8E8;
  color: #C62828;
  border-radius: 12px;
  font-size: 14px;
  margin: 20px 0;
}

/* ─── Score Header ──────────────────────────────── */

.score-header {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px;
  margin: 40px 0 24px;
  background: #FFFFFF;
  border: 1px solid rgba(47, 25, 4, 0.06);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(47, 25, 4, 0.04);
}

.score-header-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.score-header-meta { flex: 1; }

.score-url {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  color: #2F1904;
  margin-bottom: 8px;
}

.score-summary {
  font-size: 15px;
  color: #708588;
  line-height: 1.6;
  margin-bottom: 8px;
}

.score-date {
  font-size: 12px;
  color: #B0A89F;
}

/* ─── Score Ring ────────────────────────────────── */

.score-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.score-ring svg { display: block; }

.score-ring-value {
  position: absolute;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 36px;
  letter-spacing: -0.02em;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.score-ring-label {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.score-ring.mini .score-ring-value {
  font-size: 15px;
  top: 50%;
}

.score-ring.mini { min-width: 48px; }

.mini-val { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 700; }
.mini-of { font-size: 10px; opacity: 0.6; }

.score-ring.mini .score-ring-label { display: none; }

/* ─── Grade Badge ───────────────────────────────── */

.grade-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ─── Priority Actions ──────────────────────────── */

.actions-card {
  background: #FFFFFF;
  border: 1px solid rgba(47, 25, 4, 0.06);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 32px;
}

.actions-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  margin-bottom: 16px;
}

.actions-list {
  list-style: none;
}

.actions-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(47, 25, 4, 0.05);
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

.actions-list li:last-child { border-bottom: none; }

.ptag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 8px;
  vertical-align: middle;
}

.ptag-high { background: #FDE8E8; color: #C62828; }
.ptag-med  { background: #FFF3E0; color: #E65100; }
.ptag-low  { background: #E8F5E9; color: #2E7D32; }

/* ─── Results Grid ──────────────────────────────── */

.results-section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  margin-bottom: 20px;
}

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

.result-card {
  background: #FFFFFF;
  border: 1px solid rgba(47, 25, 4, 0.06);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(47, 25, 4, 0.03);
  transition: box-shadow 0.2s;
}

.result-card:hover {
  box-shadow: 0 4px 20px rgba(47, 25, 4, 0.06);
}

.result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.result-card-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 17px;
  color: #2F1904;
}

/* ─── Findings ──────────────────────────────────── */

.findings-list {
  list-style: none;
  margin-bottom: 16px;
}

.finding {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

.finding-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.finding.ok .finding-icon {
  background: #E8F5E9;
  color: #2E7D32;
}

.finding.fail .finding-icon {
  background: #FDE8E8;
  color: #C62828;
}

/* ─── Fixes ─────────────────────────────────────── */

.fixes-section {
  border-top: 1px solid rgba(47, 25, 4, 0.06);
  padding-top: 14px;
  margin-top: 4px;
}

.fixes-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #DD532B;
  margin-bottom: 8px;
}

.fixes-list {
  list-style: none;
}

.fix-item {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  padding: 5px 0 5px 14px;
  position: relative;
}

.fix-item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #DD532B;
  font-weight: 600;
}

/* ─── Post-Scan CTA ─────────────────────────────── */

.post-scan-cta {
  margin: 40px 0 60px;
  text-align: center;
}

.cta-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 32px 40px;
  background: #3D2510;
  border-radius: 20px;
  color: #FDF8F3;
  text-align: left;
  margin-bottom: 16px;
}

.cta-inner h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  margin-bottom: 8px;
  color: #E9B42C;
}

.cta-inner p {
  font-size: 14px;
  color: rgba(253, 248, 243, 0.7);
  line-height: 1.6;
}

.btn-cta {
  display: inline-block;
  padding: 14px 28px;
  background: #DD532B;
  color: #FDF8F3;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-cta:hover { background: #DD532B; color: #FDF8F3; }

button.btn-cta {
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.btn-share {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid rgba(47, 25, 4, 0.12);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #708588;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: border-color 0.2s, color 0.2s;
}

.btn-share:hover { border-color: #DD532B; color: #DD532B; }

/* ─── Pillars Preview ───────────────────────────── */

.pillars-preview {
  padding: 60px 0;
  background: #FFFFFF;
  border-top: 1px solid rgba(47, 25, 4, 0.06);
}

.section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  color: #708588;
  font-size: 15px;
  margin-bottom: 40px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar-card {
  padding: 28px 24px;
  border: 1px solid rgba(47, 25, 4, 0.06);
  border-radius: 14px;
  background: #FDF8F3;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pillar-card:hover {
  border-color: rgba(205, 115, 62, 0.2);
  box-shadow: 0 4px 16px rgba(205, 115, 62, 0.06);
}

.pillar-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(205, 115, 62, 0.08);
  color: #DD532B;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  font-family: 'DM Sans', monospace;
}

.pillar-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2F1904;
}

.pillar-card p {
  font-size: 13px;
  color: #708588;
  line-height: 1.6;
}

/* ─── CTA Section ───────────────────────────────── */

.cta-section {
  padding: 60px 0;
}

.cta-card {
  text-align: center;
  padding: 48px 40px;
  background: #553f34;
  border-radius: 20px;
  color: #FDF8F3;
}

.cta-card h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 28px;
  margin-bottom: 12px;
  color: #E9B42C;
}

.cta-card p {
  font-size: 15px;
  color: rgba(253, 248, 243, 0.7);
  max-width: 500px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

/* ─── Footer ────────────────────────────────────── */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid rgba(47, 25, 4, 0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #B0A89F;
}

.footer-note { font-size: 12px; }

/* ─── Responsive ────────────────────────────────── */

@media (max-width: 768px) {
  .hero { padding: 50px 0 40px; }
  .hero-sub br { display: none; }

  .input-row {
    flex-direction: column;
  }

  .btn-scan { width: 100%; justify-content: center; }

  .score-header {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
    gap: 24px;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .hero-title br { display: none; }
  .result-card { padding: 18px; }
}

/* ─── Pillar Summary Cards (Free) ───────────────── */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.summary-card {
  background: #FFFFFF;
  border: 1px solid rgba(47, 25, 4, 0.06);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(47, 25, 4, 0.03);
}

.summary-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-card-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 15px;
  color: #2F1904;
  margin-bottom: 2px;
}

.summary-card-stat {
  font-size: 12px;
  color: #708588;
}

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

/* ─── Email Gate ────────────────────────────────── */

.email-gate {
  margin: 0 0 40px;
}

.gate-preview {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.gate-blur {
  filter: blur(6px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  max-height: 500px;
  overflow: hidden;
}

.gate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(253,248,243,0.3) 0%, rgba(253,248,243,0.95) 50%, rgba(253,248,243,1) 100%);
}

.gate-card {
  text-align: center;
  max-width: 440px;
  padding: 40px;
  background: #FFFFFF;
  border: 1px solid rgba(47, 25, 4, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(47, 25, 4, 0.1);
}

.gate-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  color: #2F1904;
  margin-bottom: 8px;
}

.gate-card > p {
  font-size: 14px;
  color: #708588;
  line-height: 1.6;
  margin-bottom: 24px;
}

.gate-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.gate-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(47, 25, 4, 0.12);
  border-radius: 10px;
  font-size: 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #2F1904;
  background: #FDF8F3;
  outline: none;
  transition: border-color 0.2s;
}

.gate-input:focus {
  border-color: #DD532B;
  box-shadow: 0 0 0 3px rgba(221, 83, 43, 0.1);
}

.gate-input::placeholder { color: #B0A89F; }

.gate-note {
  font-size: 11px;
  color: #B0A89F;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .gate-form {
    flex-direction: column;
  }
  .gate-card {
    padding: 28px 20px;
    margin: 0 12px;
  }
}

/* ─── Audit Details Section ─────────────────────── */

.audit-details {
  scroll-margin-top: 80px;
  padding: 60px 0;
  background: #FFFFFF;
  border-top: 1px solid rgba(47, 25, 4, 0.06);
  display: none;
}

.audit-details.visible {
  display: block;
  animation: fadeSlideIn 0.4s ease-out;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.audit-feature {
  padding: 28px 24px;
  border: 1px solid rgba(47, 25, 4, 0.06);
  border-radius: 14px;
  background: #FDF8F3;
}

.audit-feature-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.audit-feature h3 {
  font-size: 15px;
  font-weight: 700;
  color: #2F1904;
  margin-bottom: 8px;
}

.audit-feature p {
  font-size: 13px;
  color: #708588;
  line-height: 1.6;
}

.audit-pricing {
  text-align: center;
  margin-top: 20px;
}

.audit-pricing-card {
  display: inline-block;
  padding: 36px 48px;
  background: #3D2510;
  border-radius: 20px;
  color: #FDF8F3;
}

.audit-pricing-label {
  font-size: 13px;
  color: rgba(253, 248, 243, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.audit-pricing-amount {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 42px;
  color: #E9B42C;
  margin-bottom: 12px;
}

.audit-pricing-detail {
  font-size: 14px;
  color: rgba(253, 248, 243, 0.7);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto 24px;
}

@media (max-width: 768px) {
  .audit-grid { grid-template-columns: 1fr; }
  .audit-pricing-card { padding: 28px 24px; }
}

/* ─── Fixes Teaser (locked behind paid audit) ─── */

.fixes-teaser {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(47, 25, 4, 0.03);
  border: 1px dashed rgba(47, 25, 4, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fixes-teaser-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.fixes-teaser p {
  font-size: 13px;
  color: #708588;
  font-style: italic;
  margin: 0;
}
