/* ==========================================================================
   AEO Audit — single-page styles
   FCAEO palette: navy primary + red accent
   ========================================================================== */

:root {
	--navy:    #0a1e3f;
	--red:     #ed1c24;
	--ink:     #222;
	--muted:   #6b7280;
	--bg:      #f9fafb;
	--card:    #ffffff;
	--border:  #e5e7eb;
	--green:   #1e9d4f;
	--amber:   #d97706;
	--font-serif: Georgia, "Antic Slab", "Times New Roman", serif;
	--font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

body {
	margin: 0;
	font-family: var(--font-sans);
	background: var(--bg);
	color: var(--ink);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: underline; }
a:hover { color: var(--red); }

/* Image containment baseline — keeps every img inside its column */
img { max-width: 100%; height: auto; }

.container {
	max-width: 1050px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.hidden { display: none !important; }

/* ----------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------- */
.hero {
	background: var(--navy);
	color: #fff;
	padding: 2.5rem 0 3rem;
	text-align: center;
}
.hero .logo {
	display: inline-block;
	color: #fff;
	text-decoration: none;
	font-family: var(--font-serif);
	font-weight: 700;
	letter-spacing: 0.08em;
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
}
.hero .logo-aeo {
	color: var(--red);
	font-weight: 800;
}
.hero h1 {
	font-family: var(--font-serif);
	font-size: clamp(1.7rem, 4vw, 2.6rem);
	margin: 0 0 1rem;
	line-height: 1.15;
	font-weight: 700;
}
.hero-sub {
	max-width: 620px;
	margin: 0 auto 2rem;
	font-size: 1.05rem;
	opacity: 0.92;
	line-height: 1.55;
}
.hero-fineprint {
	margin-top: 1rem;
	font-size: 0.85rem;
	color: rgba(255,255,255,0.7);
}

/* ----------------------------------------------------------------------
   Audit form
   ---------------------------------------------------------------------- */
.audit-form {
	display: flex;
	gap: 0.5rem;
	max-width: 580px;
	margin: 0 auto;
	background: #fff;
	padding: 0.4rem;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.audit-form input[type="url"] {
	flex: 1;
	padding: 0.85rem 1rem;
	font-size: 1rem;
	border: none;
	border-radius: 4px;
	color: var(--ink);
	background: transparent;
	min-width: 0;
}
.audit-form input[type="url"]:focus {
	outline: 2px solid var(--red);
	outline-offset: -1px;
}
.audit-form button {
	background: var(--red);
	color: #fff;
	border: none;
	padding: 0.85rem 1.4rem;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: background 0.15s ease, transform 0.1s ease;
}
.audit-form button:hover { background: #c41a21; }
.audit-form button:active { transform: translateY(1px); }
.audit-form button:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 560px) {
	.audit-form { flex-direction: column; padding: 0.6rem; }
	.audit-form button { padding: 1rem; }
}

/* Spinner */
.btn-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	display: none;
	animation: spin 0.8s linear infinite;
}
.is-loading .btn-spinner { display: inline-block; }
.is-loading .btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------------
   Results
   ---------------------------------------------------------------------- */
.results {
	padding: 3rem 0 4rem;
}
.section-title {
	font-family: var(--font-serif);
	font-size: 1.6rem;
	color: var(--navy);
	border-bottom: 3px solid var(--red);
	padding-bottom: 0.5rem;
	margin: 2.5rem 0 1.5rem;
	text-align: center;
}

.score-card {
	display: flex;
	align-items: center;
	gap: 2rem;
	background: #fff;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	margin-bottom: 2rem;
}
.score-circle {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	background: var(--bg);
	border: 6px solid var(--green);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.4rem;
	font-weight: 800;
	color: var(--green);
	flex-shrink: 0;
	font-family: var(--font-serif);
}
.score-circle[data-band="warn"]  { border-color: var(--amber); color: var(--amber); }
.score-circle[data-band="fail"]  { border-color: var(--red);   color: var(--red); }
.score-circle[data-band="pass"]  { border-color: var(--green); color: var(--green); }
.score-meta {
	flex: 1;
	min-width: 0;
}
.score-label {
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 0.5rem;
}
.score-url {
	font-family: var(--font-serif);
	font-size: 1.2rem;
	color: var(--navy);
	font-weight: 700;
	word-break: break-all;
	margin-bottom: 0.4rem;
}
.score-elapsed {
	font-size: 0.85rem;
	color: var(--muted);
}

@media (max-width: 560px) {
	.score-card { flex-direction: column; text-align: center; padding: 1.5rem; }
}

/* Issues list */
.issues-list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	counter-reset: issue;
}
.issues-list li {
	background: #fff;
	border-left: 5px solid var(--red);
	padding: 1.25rem 1.5rem 1.25rem 3rem;
	margin-bottom: 1rem;
	border-radius: 0 4px 4px 0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
	position: relative;
	counter-increment: issue;
}
.issues-list li::before {
	content: counter(issue);
	position: absolute;
	left: 0.75rem;
	top: 1.1rem;
	width: 1.6rem;
	height: 1.6rem;
	background: var(--navy);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	font-weight: 700;
}
.issues-list li[data-severity="warn"] { border-left-color: var(--amber); }
.issues-list li[data-severity="pass"] { border-left-color: var(--green); }
.issues-list .issue-label {
	font-weight: 700;
	color: var(--navy);
	display: block;
	margin-bottom: 0.3rem;
}
.issues-list .issue-summary {
	color: var(--ink);
	font-size: 0.95rem;
}

/* Gate card */
.gate-card {
	background: var(--navy);
	color: #fff;
	padding: 2rem;
	border-radius: 8px;
	margin-top: 2.5rem;
	box-shadow: 0 4px 12px rgba(10,30,63,0.18);
}
.gate-card h3 {
	margin: 0 0 0.5rem;
	font-family: var(--font-serif);
	font-size: 1.4rem;
}
.gate-card p { margin: 0 0 1rem; opacity: 0.92; }
.gate-form {
	display: flex;
	gap: 0.5rem;
	background: #fff;
	padding: 0.4rem;
	border-radius: 6px;
}
.gate-form input[type="email"] {
	flex: 1;
	padding: 0.75rem 1rem;
	border: none;
	font-size: 1rem;
	color: var(--ink);
	background: transparent;
	min-width: 0;
}
.gate-form input[type="email"]:focus { outline: 2px solid var(--red); outline-offset: -1px; }
.gate-form button {
	background: var(--red);
	color: #fff;
	border: none;
	padding: 0.75rem 1.2rem;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.03em;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.gate-form button:hover { background: #c41a21; }
.gate-fineprint { margin-top: 0.75rem; font-size: 0.8rem; opacity: 0.75; }

@media (max-width: 560px) {
	.gate-form { flex-direction: column; padding: 0.6rem; }
}

.gate-success {
	background: var(--green);
	color: #fff;
	padding: 2rem;
	border-radius: 8px;
	margin-top: 2rem;
	text-align: center;
}
.gate-success h3 { margin: 0 0 0.4rem; font-family: var(--font-serif); font-size: 1.6rem; }

/* ----------------------------------------------------------------------
   Why section (cards)
   ---------------------------------------------------------------------- */
.why { padding: 3rem 0 4rem; background: #fff; }
.why-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
	margin-top: 1.5rem;
}
.why-card {
	background: var(--bg);
	padding: 1.5rem;
	border-radius: 6px;
	border-left: 4px solid var(--red);
}
.why-card h3 {
	margin: 0 0 0.5rem;
	color: var(--navy);
	font-family: var(--font-serif);
	font-size: 1.1rem;
	text-align: center;
}
.why-card p { margin: 0; text-align: center; font-size: 0.95rem; color: var(--ink); }

/* Case-study screenshots inside .why sections */
.why p img {
	display: block;
	margin: 1.5rem auto;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ----------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */
.site-footer {
	background: var(--navy);
	color: rgba(255,255,255,0.85);
	padding: 1.5rem 0;
	text-align: center;
	font-size: 0.9rem;
}
.site-footer a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--red); }

/* Footer brand strip — uniform logo row */
.brand-strip { margin: 0.75rem 0 1rem; }
.brand-strip p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	margin: 0;
}
.brand-strip a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}
.brand-strip img {
	max-height: 180px;
	width: auto;
	display: block;
}

/* ----------------------------------------------------------------------
   Error state
   ---------------------------------------------------------------------- */
.error-banner {
	background: #fef2f2;
	border-left: 4px solid var(--red);
	padding: 1rem 1.5rem;
	border-radius: 0 4px 4px 0;
	color: #991b1b;
	margin-top: 1rem;
}
