/* ============================================================
   /seo-geo-website-analyser — SEO/GEO Analyser
   Namespace .sga-*  ·  Accent: lime #84cc16 -> deep #4d7c0f
   The hero carries a working tool, so the form is the visual centre:
   everything else stays quiet around it (calm pass - glow only on the
   real call to action).
   ============================================================ */

.sga {
  --sga: #84cc16;
  --sga-deep: #4d7c0f;
  --sga-glow: rgba(132, 204, 22, 0.35);
  --sga-ink: #f1f5f9;
  --sga-dim: #94a3b8;
  --sga-panel: rgba(15, 23, 42, 0.72);
  --sga-line: rgba(148, 163, 184, 0.18);
  display: block;
  overflow-x: hidden;
}

/* ------------------------------------------------------------ hero */

.sga-hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 20px clamp(36px, 6vw, 64px);
}

/* A single soft field behind the form, so the eye lands on the input
   rather than on decoration. */
.sga-hero::before {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  top: 0;
  width: min(880px, 96vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, var(--sga-glow), transparent 68%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.sga-hero-in {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
}

.sga-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #14200a;
  background: linear-gradient(135deg, var(--sga), var(--sga-deep));
  margin-bottom: 18px;
}

/* H1 law: solid heading colour, exactly one gradient punch line.
   The heading gets a wider measure than the body copy below it, so a headline
   does not wrap and leave one word stranded on its own line. */
.sga-h1 {
  max-width: 940px;
  margin-inline: auto;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 800;
  line-height: 1.22;
  color: var(--sga-ink);
  margin: 0 0 16px;
  border: 0;
  padding: 0;
}

.sga-h1-punch {
  display: block;
  width: fit-content;
  margin-inline: auto;
  background: linear-gradient(90deg, #8b5cf6, #ec4899, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.sga-hero-sub {
  font-size: clamp(1rem, 1.7vw, 1.1rem);
  line-height: 1.75;
  color: var(--sga-dim);
  margin: 0 auto 30px;
  max-width: 640px;
}

/* ------------------------------------------------------------ the form */

.sga-form {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 28px);
  background: var(--sga-panel);
  border: 1px solid var(--sga-line);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  text-align: start;
}

.sga-field { display: grid; gap: 6px; }

.sga-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--sga-dim);
}

.sga-form input[type="url"],
.sga-form input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--sga-line);
  background: rgba(2, 6, 23, 0.6);
  color: var(--sga-ink);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sga-form input:focus {
  outline: none;
  border-color: var(--sga);
  box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.18);
}

.sga-form input::placeholder { color: #64748b; }

/* Hidden from people, visible to the bots that fill everything in. */
.sga-hp {
  position: absolute !important;
  inset-inline-start: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sga-captcha { display: flex; justify-content: center; }

.sga-submit {
  position: relative;
  padding: 14px 22px;
  border: 0;
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 800;
  font-family: inherit;
  color: #14200a;
  background: linear-gradient(135deg, var(--sga), var(--sga-deep));
  cursor: pointer;
  box-shadow: 0 8px 26px var(--sga-glow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.sga-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px var(--sga-glow);
}

.sga-submit:disabled { opacity: 0.7; cursor: progress; }

.sga-form-err {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #fecdd3;
  background: rgba(190, 24, 93, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.sga-form-hint {
  margin: 0;
  font-size: 0.84rem;
  color: #64748b;
  text-align: center;
}

.sga-limits {
  margin: 18px auto 6px;
  font-size: 0.88rem;
  color: var(--sga-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sga-limits .fa { color: var(--sga); }

.sga-privacy {
  margin: 0 auto;
  max-width: 560px;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #64748b;
}

.sga-privacy a { color: var(--sga-dim); text-decoration: underline; }
.sga-privacy a:hover { color: var(--sga); }

/* While a check runs the hero recedes but never disappears - the user can
   still see what they submitted. */
.sga-hero.is-running .sga-form,
.sga-hero.is-running .sga-limits,
.sga-hero.is-running .sga-privacy { opacity: 0.4; pointer-events: none; }

.sga-hero.is-running .sga-form,
.sga-hero.is-running .sga-limits { transition: opacity 0.3s ease; }

/* ------------------------------------------------------------ stage */

.sga-stage { padding: 0 20px clamp(40px, 6vw, 72px); }

.sga-card {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(22px, 3.4vw, 32px);
  background: var(--sga-panel);
  border: 1px solid var(--sga-line);
  border-radius: 20px;
  text-align: center;
  animation: sgaIn 0.4s ease both;
}

@keyframes sgaIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.sga-run-head {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: start;
  margin-bottom: 18px;
}

.sga-run-orb {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #14200a;
  background: linear-gradient(135deg, var(--sga), var(--sga-deep));
  box-shadow: 0 0 22px var(--sga-glow);
  animation: sgaPulse 2.2s ease-in-out infinite;
}

@keyframes sgaPulse {
  0%, 100% { box-shadow: 0 0 18px var(--sga-glow); }
  50% { box-shadow: 0 0 30px var(--sga-glow); }
}

.sga-run-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--sga-ink);
  border: 0;
  padding: 0;
  display: block;
}

.sga-run-sub { margin: 4px 0 0; font-size: 0.94rem; color: var(--sga-dim); }
.sga-run-perks { margin: 12px 0 0; font-size: 0.9rem; line-height: 1.7; color: var(--sga-dim); }
.sga-run-meta { margin: 12px 0 0; font-size: 0.82rem; color: #64748b; }

/* Nine dots, one per analysis stage. */
.sga-rail {
  display: flex;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.sga-rail-step { display: block; }

.sga-rail-dot {
  display: block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.3);
  transition: background 0.3s ease, transform 0.3s ease;
}

.sga-rail-step.is-done .sga-rail-dot { background: var(--sga-deep); }

.sga-rail-step.is-current .sga-rail-dot {
  background: var(--sga);
  transform: scale(1.5);
  box-shadow: 0 0 12px var(--sga-glow);
}

.sga-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.sga-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sga-deep), var(--sga));
  transition: width 0.6s ease;
}

.sga-scores {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 18px 0;
}

.sga-score { display: grid; gap: 2px; }
.sga-score-n { font-size: 2.4rem; font-weight: 800; color: var(--sga); line-height: 1; }
.sga-score-l { font-size: 0.78rem; color: var(--sga-dim); letter-spacing: 0.08em; }

.sga-card-failed { border-color: rgba(244, 63, 94, 0.28); }
.sga-card-limit { border-color: rgba(132, 204, 22, 0.28); }

/* ------------------------------------------------------------ sections */

.sga-what, .sga-how, .sga-final { padding: clamp(48px, 7vw, 88px) 20px; }

.sga-section-head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }

.sga-section-label {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color, #8b5cf6), var(--secondary-color, #ec4899));
  margin-bottom: 14px;
}

/* The global h2 rule paints an orange underline on every h2; these headings
   are typography, not a divider. */
.sga-section-h2, .sga-final-h2 {
  display: block;
  border: 0;
  padding-bottom: 0;
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--sga-ink);
}

.sga-section-sub { margin: 0; font-size: 1rem; line-height: 1.75; color: var(--sga-dim); }

.sga-what-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.sga-what-card {
  padding: 22px;
  border-radius: 18px;
  background: var(--sga-panel);
  border: 1px solid var(--sga-line);
}

/* Colour lives on the glyph, not on the surface. */
.sga-what-icon { font-size: 1.5rem; color: var(--sga); margin-bottom: 10px; display: block; }

.sga-what-card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--sga-ink);
  border: 0;
  padding: 0;
}

.sga-what-card p { margin: 0; font-size: 0.94rem; line-height: 1.7; color: var(--sga-dim); }

.sga-how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.sga-how-step {
  padding: 24px;
  border-radius: 18px;
  background: var(--sga-panel);
  border: 1px solid var(--sga-line);
}

.sga-how-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--sga-deep);
  margin-bottom: 8px;
}

.sga-how-step h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--sga-ink);
  border: 0;
  padding: 0;
}

.sga-how-step p { margin: 0; font-size: 0.94rem; line-height: 1.7; color: var(--sga-dim); }

/* ------------------------------------------------------------ buttons */

.sga-final { text-align: center; }
.sga-final-sub { margin: 0 auto 22px; max-width: 560px; font-size: 1rem; color: var(--sga-dim); }

.sga-final-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.sga-btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.sga-btn-solid {
  color: #14200a;
  background: linear-gradient(135deg, var(--sga), var(--sga-deep));
  box-shadow: 0 8px 24px var(--sga-glow);
}

.sga-btn-solid:hover { transform: translateY(-1px); box-shadow: 0 12px 30px var(--sga-glow); }

/* Secondary CTA is tinted in the destination's colour (products = pink). */
.sga-btn-ghost {
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.36);
  background: rgba(236, 72, 153, 0.08);
}

.sga-btn-ghost:hover { background: rgba(236, 72, 153, 0.16); }

/* ------------------------------------------------------------ light theme */

body.light-theme .sga {
  --sga-ink: #0f172a;
  --sga-dim: #475569;
  --sga-panel: #ffffff;
  --sga-line: rgba(15, 23, 42, 0.1);
}

/* The global body.light-theme h1 gradient turns hero headings black. */
body.light-theme .sga-h1 { color: #0f172a; -webkit-text-fill-color: #0f172a; background: none; }
body.light-theme .sga-h1-punch { -webkit-text-fill-color: transparent; }
body.light-theme .sga-form { box-shadow: 0 10px 34px rgba(15, 23, 42, 0.08); }
body.light-theme .sga-form input[type="url"],
body.light-theme .sga-form input[type="email"] { background: #f8fafc; color: #0f172a; }
body.light-theme .sga-what-card,
body.light-theme .sga-how-step,
body.light-theme .sga-card { box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06); }
body.light-theme .sga-rail-dot { background: rgba(15, 23, 42, 0.16); }
body.light-theme .sga-bar { background: rgba(15, 23, 42, 0.1); }

/* ------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
  .sga-card { animation: none; }
  .sga-run-orb { animation: none; }
  .sga-rail-dot, .sga-bar span { transition: none; }
}

/* ------------------------------------------------------------ mobile
   Kept at the end of the file: the base clamps above would otherwise win. */

@media (max-width: 900px) {
  /* The global mobile rule centres any element whose class ends in -head or
     -sub; these are block sentences that must keep their own alignment. */
  .sga .sga-hero-in,
  .sga .sga-section-head { width: 100%; margin-inline: auto; }

  .sga-form { padding: 18px; }
  .sga-run-head { gap: 10px; }
  .sga-scores { gap: 20px; }
  .sga-score-n { font-size: 2rem; }
  .sga-final-cta .sga-btn { width: 100%; max-width: 320px; }
}

@media (max-width: 560px) {
  .sga-hero { padding-top: 40px; }
  .sga-rail { gap: 6px; }
  .sga-what-card, .sga-how-step { padding: 18px; }
}

/* ------------------------------------------------------------ /bot page */

.sga-code-block {
  max-width: 640px;
  margin: 8px auto 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--sga-panel);
  border: 1px solid var(--sga-line);
  text-align: start;
}

.sga-code-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sga-dim);
  margin-bottom: 6px;
}

.sga-code-block code {
  display: block;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--sga);
  word-break: break-all;
  direction: ltr;
  text-align: left;
}

.sga-bot-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.sga-pre {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--sga-line);
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}

.sga-pre code {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--sga-ink);
  white-space: pre;
}

body.light-theme .sga-pre { background: #f1f5f9; }
