/*
Theme Name: Audit My Website
Theme URI: https://auditmywebsite.com.au
Author: Little Red Jet
Author URI: https://auditmywebsite.com.au
Description: A free website audit tool theme. Visitors enter their website URL and receive a score plus actionable fixes across SEO, performance, analytics, and security — powered by the Google PageSpeed Insights API.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: auditmywebsite
*/

:root {
  --amw-bg: #0d1220;
  --amw-bg-soft: #151b2e;
  --amw-card: #1b2440;
  --amw-border: #2a3556;
  --amw-text: #e8ecf6;
  --amw-muted: #97a1c4;
  --amw-brand: #e63946;
  --amw-brand-dark: #c42d39;
  --amw-good: #22c55e;
  --amw-warn: #f59e0b;
  --amw-bad: #ef4444;
  --amw-accent: #4f7cff;
  --amw-radius: 16px;
  --amw-shadow: 0 20px 60px rgba(0,0,0,.35);
  --amw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body.amw {
  margin: 0;
  font-family: var(--amw-font);
  background: radial-gradient(1200px 600px at 50% -10%, #1c2748 0%, transparent 60%), var(--amw-bg);
  background-color: var(--amw-bg);
  color: var(--amw-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.amw-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
.amw-site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.amw-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--amw-text); text-decoration: none; letter-spacing: -.02em; }
.amw-logo .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--amw-brand); box-shadow: 0 0 0 4px rgba(230,57,70,.2); }
.amw-nav a { color: var(--amw-muted); text-decoration: none; font-size: 14px; margin-left: 20px; }
.amw-nav a:hover { color: var(--amw-text); }

/* Hero */
.amw-hero { text-align: center; padding: 48px 0 24px; }
.amw-hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.05; margin: 0 0 14px; letter-spacing: -.03em; }
.amw-hero h1 .hl { color: var(--amw-brand); }
.amw-hero p.lead { font-size: 18px; color: var(--amw-muted); max-width: 640px; margin: 0 auto 28px; }

/* Form */
.amw-form { display: flex; gap: 10px; max-width: 620px; margin: 0 auto; flex-wrap: wrap; }
.amw-form input[type="url"] {
  flex: 1 1 320px; min-width: 0; padding: 16px 18px; font-size: 16px;
  border-radius: 12px; border: 1px solid var(--amw-border);
  background: var(--amw-bg-soft); color: var(--amw-text); outline: none;
}
.amw-form input[type="url"]::placeholder { color: #6b769c; }
.amw-form input[type="url"]:focus { border-color: var(--amw-accent); box-shadow: 0 0 0 3px rgba(79,124,255,.25); }
.amw-btn {
  padding: 16px 26px; font-size: 16px; font-weight: 700; cursor: pointer;
  border: none; border-radius: 12px; color: #fff;
  background: linear-gradient(180deg, var(--amw-brand), var(--amw-brand-dark));
  transition: transform .06s ease, filter .15s ease;
}
.amw-btn:hover { filter: brightness(1.06); }
.amw-btn:active { transform: translateY(1px); }
.amw-btn[disabled] { opacity: .6; cursor: not-allowed; }
.amw-form small { flex-basis: 100%; text-align: center; color: var(--amw-muted); font-size: 13px; margin-top: 6px; }

/* Trust row */
.amw-trust { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin: 30px 0 8px; color: var(--amw-muted); font-size: 14px; }
.amw-trust span { display: inline-flex; align-items: center; gap: 8px; }
.amw-trust svg { width: 16px; height: 16px; color: var(--amw-good); }

/* Loading */
.amw-loading { text-align: center; padding: 40px 0; }
.amw-spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--amw-border); border-top-color: var(--amw-brand); animation: amw-spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes amw-spin { to { transform: rotate(360deg); } }
.amw-loading .step { color: var(--amw-muted); font-size: 14px; }

/* Results */
.amw-results { margin: 30px 0 60px; display: none; }
.amw-results.show { display: block; }

.amw-overall {
  background: var(--amw-card); border: 1px solid var(--amw-border);
  border-radius: var(--amw-radius); padding: 28px; box-shadow: var(--amw-shadow);
  display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center;
}
@media (max-width: 640px) { .amw-overall { grid-template-columns: 1fr; text-align: center; } }
.amw-gauge { position: relative; width: 160px; height: 160px; margin: 0 auto; }
.amw-gauge svg { transform: rotate(-90deg); }
.amw-gauge .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.amw-gauge .val .num { font-size: 44px; font-weight: 800; line-height: 1; }
.amw-gauge .val .lbl { font-size: 12px; color: var(--amw-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.amw-overall .headline h2 { margin: 0 0 6px; font-size: 24px; }
.amw-overall .headline .site { color: var(--amw-muted); font-size: 14px; word-break: break-all; }
.amw-overall .headline .verdict { margin-top: 12px; font-size: 15px; }

/* Category cards */
.amw-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
@media (max-width: 820px) { .amw-cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .amw-cats { grid-template-columns: 1fr; } }
.amw-cat { background: var(--amw-card); border: 1px solid var(--amw-border); border-radius: var(--amw-radius); padding: 18px; }
.amw-cat .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.amw-cat .name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.amw-cat .score { font-weight: 800; font-size: 22px; }
.amw-bar { height: 8px; border-radius: 999px; background: var(--amw-bg-soft); overflow: hidden; }
.amw-bar > i { display: block; height: 100%; border-radius: 999px; transition: width .8s cubic-bezier(.2,.7,.2,1); }

/* Findings */
.amw-findings { margin-top: 26px; }
.amw-findings h3 { font-size: 18px; margin: 0 0 14px; }
.amw-finding {
  display: flex; gap: 14px; padding: 16px 18px; margin-bottom: 12px;
  background: var(--amw-card); border: 1px solid var(--amw-border); border-radius: 12px;
  border-left-width: 4px;
}
.amw-finding.pass { border-left-color: var(--amw-good); }
.amw-finding.warn { border-left-color: var(--amw-warn); }
.amw-finding.fail { border-left-color: var(--amw-bad); }
.amw-finding .ico { flex: 0 0 22px; margin-top: 2px; }
.amw-finding .body h4 { margin: 0 0 4px; font-size: 15px; }
.amw-finding .body p { margin: 0; color: var(--amw-muted); font-size: 14px; }
.amw-finding .body .how { margin-top: 8px; font-size: 13px; color: #c7cfea; background: var(--amw-bg-soft); border-radius: 8px; padding: 10px 12px; }
.amw-pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; }
.amw-pill.good { background: rgba(34,197,94,.15); color: #7ff0a6; }
.amw-pill.warn { background: rgba(245,158,11,.15); color: #ffcf7a; }
.amw-pill.bad { background: rgba(239,68,68,.15); color: #ff9a9a; }

.amw-cta { text-align: center; margin: 40px 0; padding: 30px; background: linear-gradient(160deg, var(--amw-card), var(--amw-bg-soft)); border: 1px solid var(--amw-border); border-radius: var(--amw-radius); }
.amw-cta h3 { margin: 0 0 8px; font-size: 22px; }
.amw-cta p { color: var(--amw-muted); margin: 0 0 18px; }

.amw-error { display: none; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.4); color: #ffbcbc; padding: 14px 18px; border-radius: 12px; margin: 20px auto; max-width: 620px; text-align: center; }
.amw-error.show { display: block; }

/* Feature strip */
.amw-features { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin: 60px 0; }
@media (max-width: 820px){ .amw-features{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 460px){ .amw-features{ grid-template-columns: 1fr;} }
.amw-feature { text-align: center; padding: 8px; }
.amw-feature .emoji { font-size: 26px; }
.amw-feature h4 { margin: 8px 0 4px; font-size: 15px; }
.amw-feature p { margin: 0; color: var(--amw-muted); font-size: 13px; }

/* Footer */
.amw-site-footer { border-top: 1px solid var(--amw-border); padding: 26px 0; color: var(--amw-muted); font-size: 13px; text-align: center; }

.amw-print { display: none; }
