/* AdsVizor landing page styles (master template)
   Notes:
   - Vanilla CSS only; no external dependencies (Inter is loaded in index.html).
   - Mobile-first, then enhanced at >= 768px.
*/

body {
  visibility: hidden;
}

body.ready {
  visibility: visible;
}

:root {
  --color-primary: #1a1a2e; /* deep blue */
  --color-accent: #2563eb; /* accent blue */
  --color-bg: #ffffff;
  --color-muted: #6b7280;
  --color-border: rgba(26, 26, 46, 0.14);
  --color-surface: #f8fafc;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 6px 20px rgba(26, 26, 46, 0.08);
  --shadow-md: 0 12px 36px rgba(26, 26, 46, 0.12);

  --font-sans: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-primary);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   Header
   ========================= */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header > div a {
  font-weight: 800;
  letter-spacing: 0.2px;
  text-decoration: none;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  font-weight: 600;
  color: rgba(26, 26, 46, 0.9);
}

nav a:hover {
  color: var(--color-accent);
}

/* =========================
   Page layout / sections
   ========================= */

main {
  width: 100%;
}

section {
  padding: 44px 18px;
}

/* =========================
   Hero
   ========================= */

section[aria-labelledby="hero-title"] {
  padding-top: 64px;
  padding-bottom: 30px;
  text-align: center;
}

section[aria-labelledby="hero-title"] h1 {
  margin: 0 auto 12px;
  max-width: 980px;
  font-size: 2.1rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

section[aria-labelledby="hero-title"] p {
  margin: 0 auto 18px;
  max-width: 760px;
  color: rgba(26, 26, 46, 0.82);
}

/* CTA: template uses an <a data-cta-id> */
section[aria-labelledby="hero-title"] a[data-cta-id] {
  display: inline-block;
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.24);
}

section[aria-labelledby="hero-title"] a[data-cta-id]:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

section[aria-labelledby="hero-title"] a[data-cta-id]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 10px 26px rgba(37, 99, 235, 0.24);
}

/* =========================
   Benefits
   ========================= */

section[aria-labelledby="benefits-title"] {
  background: var(--color-surface);
}

section[aria-labelledby="benefits-title"] h2 {
  text-align: center;
  margin: 0 0 18px;
}

section[aria-labelledby="benefits-title"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

section[aria-labelledby="benefits-title"] li {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

section[aria-labelledby="benefits-title"] h3 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.06rem;
}

/* "Icons area" placeholder: purely CSS icon block */
section[aria-labelledby="benefits-title"] h3::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.7));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
  flex: 0 0 auto;
}

section[aria-labelledby="benefits-title"] p {
  margin: 0;
  color: rgba(26, 26, 46, 0.82);
}

/* =========================
   Testimonials
   ========================= */

section[aria-labelledby="testimonials-title"] h2 {
  text-align: center;
  margin: 0 0 18px;
}

section[aria-labelledby="testimonials-title"] > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

section[aria-labelledby="testimonials-title"] figure {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

section[aria-labelledby="testimonials-title"] blockquote {
  margin: 0;
  font-weight: 500;
  color: rgba(26, 26, 46, 0.9);
}

section[aria-labelledby="testimonials-title"] figcaption {
  margin-top: 12px;
  color: var(--color-muted);
  font-weight: 600;
}

/* =========================
   Lead form
   ========================= */

section[aria-labelledby="lead-form-title"] {
  padding-top: 46px;
  padding-bottom: 58px;
}

section[aria-labelledby="lead-form-title"] h2 {
  text-align: center;
  margin: 0 0 18px;
}

form[data-client-slug] {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

form[data-client-slug] > div {
  display: grid;
  gap: 6px;
}

form label {
  font-weight: 700;
  font-size: 0.95rem;
}

form input,
form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-primary);
  font-size: 1rem;
}

form textarea {
  resize: vertical;
  min-height: 110px;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

form button[type="submit"] {
  justify-self: center;
  width: 100%;
  max-width: 320px;
  border: none;
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

form button[type="submit"]:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

form button[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 12px 28px rgba(37, 99, 235, 0.25);
}

/* Error block inserted by script.js: <div data-form-error="true">...</div> */
form [data-form-error] {
  background: #b91c1c; /* red background */
  color: #ffffff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Footer */
footer {
  padding: 26px 18px 40px;
  text-align: center;
  color: var(--color-muted);
}

footer p {
  margin: 0;
  font-weight: 600;
}

/* =========================
   Thank-you page
   ========================= */

.thankyou {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  padding-top: 54px;
  padding-bottom: 54px;
}

.thankyou-card {
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  padding: 26px 18px;
  text-align: center;
}

.thankyou-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.22);
  position: relative;
}

/* CSS-only checkmark */
.thankyou-icon::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 36px;
  border-right: 5px solid var(--color-accent);
  border-bottom: 5px solid var(--color-accent);
  transform: rotate(45deg);
  left: 50%;
  top: 50%;
  translate: -40% -55%;
  border-radius: 2px;
}

.thankyou-card h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.thankyou-card p {
  margin: 0 auto 14px;
  max-width: 62ch;
  color: rgba(26, 26, 46, 0.82);
}

/* Generic button class used on thank-you page */
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 999px;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
  text-decoration: none;
}

.btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 12px 28px rgba(37, 99, 235, 0.25);
}

/* ==========================================
   Responsive enhancements (>= 768px)
   ========================================== */

@media (min-width: 768px) {
  header {
    padding-left: 34px;
    padding-right: 34px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  section {
    padding-left: 34px;
    padding-right: 34px;
  }

  section[aria-labelledby="hero-title"] h1 {
    font-size: 3rem;
  }

  section[aria-labelledby="benefits-title"] ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  section[aria-labelledby="testimonials-title"] > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  section[aria-labelledby="lead-form-title"] {
    padding-top: 62px;
    padding-bottom: 74px;
  }
}

