/* ============================================
   FREE SEO AUDIT PAGE
   page-free-seo-audit.php
============================================ */


/* ============================================
   AMBIENT BACKGROUND BLOBS
============================================ */
.blob-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(0,0,0,0.055), rgba(0,0,0,0.018) 60%, transparent 80%);
  filter: blur(55px);
  will-change: transform, border-radius;
}

.blob-1 {
  width: 55vw;
  height: 55vw;
  top: -10vw;
  left: -15vw;
  animation: blobDrift1 32s ease-in-out infinite;
}
.blob-2 {
  width: 40vw;
  height: 40vw;
  top: 20vh;
  right: -10vw;
  background: radial-gradient(circle at 60% 40%, rgba(0,0,0,0.04), rgba(0,0,0,0.012) 60%, transparent 80%);
  animation: blobDrift2 44s ease-in-out infinite;
}
.blob-3 {
  width: 32vw;
  height: 32vw;
  bottom: 5vh;
  left: 25vw;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.032), rgba(0,0,0,0.01) 60%, transparent 80%);
  animation: blobDrift3 56s ease-in-out infinite;
}

@keyframes blobDrift1 {
  0%   { transform: translate(0, 0);      border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%; }
  25%  { transform: translate(4vw, 6vh);   border-radius: 40% 60% 55% 45% / 48% 62% 38% 52%; }
  50%  { transform: translate(8vw, 2vh);   border-radius: 55% 45% 38% 62% / 52% 40% 60% 48%; }
  75%  { transform: translate(2vw, 8vh);   border-radius: 48% 52% 60% 40% / 38% 55% 45% 62%; }
  100% { transform: translate(0, 0);      border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%; }
}
@keyframes blobDrift2 {
  0%   { transform: translate(0, 0);      border-radius: 44% 56% 62% 38% / 52% 48% 52% 48%; }
  33%  { transform: translate(-5vw, 4vh);  border-radius: 60% 40% 44% 56% / 38% 62% 48% 52%; }
  66%  { transform: translate(-2vw, 10vh); border-radius: 38% 62% 56% 44% / 60% 40% 52% 48%; }
  100% { transform: translate(0, 0);      border-radius: 44% 56% 62% 38% / 52% 48% 52% 48%; }
}
@keyframes blobDrift3 {
  0%   { transform: translate(0, 0);      border-radius: 52% 48% 40% 60% / 44% 56% 44% 56%; }
  50%  { transform: translate(-6vw, -4vh); border-radius: 40% 60% 56% 44% / 62% 38% 56% 44%; }
  100% { transform: translate(0, 0);      border-radius: 52% 48% 40% 60% / 44% 56% 44% 56%; }
}


/* ============================================
   PAGE LAYOUT
   Both columns scroll with the page.
   Form column uses position: sticky to stay
   pinned while the editorial content scrolls.
============================================ */
.audit-page {
  position: relative;
  z-index: 1;
  background: var(--off-white);
  min-height: 100vh;
  padding-top: 72px; /* nav height */
}

.audit-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 100%;
}


/* ============================================
   BREADCRUMB — LIGHT VARIANT
   Overrides the dark-hero breadcrumb from
   components.css for this light-bg page.
============================================ */
.breadcrumb--light {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  max-width: none;
  padding: 0;
  margin-bottom: 3rem;
  color: var(--text-light);
  opacity: 0;
  animation: fadeIn 0.6s 0.2s forwards;
}

.breadcrumb--light a { color: var(--text-light); }
.breadcrumb--light a:hover { color: var(--accent-dark); }


/* ============================================
   LEFT COLUMN — EDITORIAL CONTENT
   Static positioning. Natural document flow.
============================================ */
.audit-content {
  padding: 4rem 4rem 6rem 3rem;
}

.content-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.content-eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.content-h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 3.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--dark);
  margin-bottom: 1.4rem;
}

.content-h1 em {
  font-style: italic;
  color: var(--accent-dark);
}

.content-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-body);
  font-weight: 300;
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

.content-divider {
  width: 2.5rem;
  height: 1px;
  background: var(--accent);
  margin-bottom: 2.5rem;
  opacity: 0.4;
}

.content-h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.content-h2:first-of-type { margin-top: 0; }

.content-p {
  font-size: 0.92rem;
  line-height: 1.78;
  color: var(--text-light);
  margin-bottom: 1.4rem;
  max-width: 56ch;
}

/* Checklist */
.audit-checklist {
  list-style: none;
  margin: 1.2rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.audit-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-body);
}

.audit-checklist li::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='7.5' stroke='%234A8FD8' stroke-opacity='0.4'/%3E%3Cpath d='M4.5 8L7 10.5L11.5 5.5' stroke='%23174f8b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
}

.audit-checklist li strong {
  font-weight: 600;
}

/* Trust bar */
.trust-bar {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(17,18,16,0.08);
}

.trust-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  color: var(--dark);
  line-height: 1;
  display: block;
}

.trust-label {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 400;
  display: block;
  margin-top: 0.3rem;
}


/* ============================================
   RIGHT COLUMN — FORM (STICKY)
   Sticks to the viewport while left content
   scrolls. Unsticks naturally when footer
   pushes it out.
============================================ */
.audit-form-col {
  padding: 4rem 3rem 4rem 4rem;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  border-left: 1px solid rgba(17,18,16,0.07);
  position: sticky;
  top: 72px; /* nav height */
  align-self: start;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  scrollbar-width: none;
}

.audit-form-col::-webkit-scrollbar { display: none; }


/* ---- Form header ---- */
.form-header { margin-bottom: 1.6rem; }

.form-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 0.8rem;
}

.form-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: -0.015em;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.form-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0;
}


/* ============================================
   FORM — FLOATING LABELS
   Works with Contact Form 7 output.
   Mirrors the contact page conventions.
============================================ */

/* CF7 resets */
.audit-form-col .wpcf7 { margin: 0; padding: 0; }
.audit-form-col .wpcf7-form { display: flex; flex-direction: column; gap: 0; }
.audit-form-col .wpcf7-form p { margin: 0; }
.audit-form-col .wpcf7-form br { display: none; }

/* ---- Floating label fields ---- */
.audit-form-col .field {
  position: relative;
  padding-top: 1.4rem;
  margin-bottom: 1.1rem;
}

.audit-form-col .field label {
  position: absolute;
  top: 1.4rem;
  left: 0;
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 400;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.22s var(--ease-out), color 0.22s;
  white-space: nowrap;
}

/* CF7 wraps inputs in a span */
.audit-form-col .field .wpcf7-form-control-wrap { display: block; }

/* Floated state */
.audit-form-col .field.floated label,
.audit-form-col .field input:focus ~ label,
.audit-form-col .field textarea:focus ~ label,
.audit-form-col .field .wpcf7-form-control-wrap:focus-within ~ label {
  transform: translateY(-1.4rem) scale(0.75);
  color: var(--accent-dark);
  font-weight: 500;
}

.audit-form-col .field input,
.audit-form-col .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(17,18,16,0.2);
  padding: 0.4rem 0 0.55rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--dark);
  outline: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.22s;
}

.audit-form-col .field input::placeholder,
.audit-form-col .field textarea::placeholder { color: transparent; }

.audit-form-col .field input:focus,
.audit-form-col .field textarea:focus { border-bottom-color: var(--accent); }

/* Animated underline accent on focus */
.audit-form-col .field::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.audit-form-col .field:focus-within::after { width: 100%; }

.audit-form-col .field textarea {
  resize: none;
  height: 88px;
  line-height: 1.6;
}


/* ---- CF7 validation (inline) ---- */
.audit-form-col .wpcf7-not-valid-tip {
  font-size: 0.7rem;
  color: #b44a3e;
  font-weight: 400;
  margin-top: 0.3rem;
  animation: revealUp 0.3s var(--ease-out);
}

.audit-form-col .wpcf7-not-valid {
  border-bottom-color: #b44a3e !important;
}

/* ---- CF7 response output (bottom banner) ---- */
.audit-form-col .wpcf7-response-output {
  margin: 1.2rem 0 0 !important;
  padding: 0.9rem 1.2rem !important;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 2px;
  border-width: 1px !important;
  border-style: solid !important;
}

/* Validation failed */
.audit-form-col .wpcf7-form.invalid .wpcf7-response-output,
.audit-form-col .wpcf7-form.unaccepted .wpcf7-response-output {
  background: rgba(180, 74, 62, 0.06);
  border-color: rgba(180, 74, 62, 0.25) !important;
  color: #8b3329;
}

/* Mail send failed */
.audit-form-col .wpcf7-form.failed .wpcf7-response-output {
  background: rgba(180, 74, 62, 0.06);
  border-color: rgba(180, 74, 62, 0.25) !important;
  color: #8b3329;
}

/* Spam detected */
.audit-form-col .wpcf7-form.spam .wpcf7-response-output {
  background: rgba(180, 140, 40, 0.06);
  border-color: rgba(180, 140, 40, 0.25) !important;
  color: #7a6520;
}

/* Success — hide default CF7 output, we use our own panel */
.audit-form-col .wpcf7-form.sent .wpcf7-response-output {
  display: none !important;
}


/* ---- Submit ---- */
.form-submit-wrap { margin-top: 1.4rem; }

.audit-form-col .form-submit,
.audit-form-col .wpcf7-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--dark);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1.05rem 2rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), transform 0.2s;
  position: relative;
  overflow: hidden;
}

.audit-form-col .form-submit::before,
.audit-form-col .wpcf7-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-dark);
  transform: translateX(-101%);
  transition: transform 0.4s var(--ease-out);
}

.audit-form-col .form-submit:hover::before,
.audit-form-col .wpcf7-submit:hover::before { transform: translateX(0); }

.audit-form-col .form-submit:hover,
.audit-form-col .wpcf7-submit:hover { transform: translateY(-1px); }

.audit-form-col .form-submit span,
.audit-form-col .form-submit svg,
.audit-form-col .wpcf7-submit { position: relative; z-index: 1; }

.form-note {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.8rem;
  text-align: center;
  line-height: 1.5;
}


/* ============================================
   SUCCESS STATE
   Crossfade: form fades out, success fades in.
   The form-col handles the animated height
   transition via JS.
============================================ */

/* Phase 1: fade-out form content */
.audit-form-col.transitioning .wpcf7,
.audit-form-col.transitioning .form-header,
.audit-form-col.transitioning .form-note {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

/* Success panel — hidden by default */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.2rem;
  padding: 2.5rem;
  background: rgba(74, 143, 216, 0.05);
  border: 1px solid rgba(74, 143, 216, 0.2);
  border-radius: 2px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s 0.15s var(--ease-out), transform 0.5s 0.15s var(--ease-out);
  position: absolute;
  inset: 4rem 3rem 4rem 4rem;
  pointer-events: none;
}

.form-success.visible {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  inset: auto;
  pointer-events: auto;
}

.form-success-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(74, 143, 216, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.form-success-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.form-success-body {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.7;
  font-weight: 300;
}

.form-success-body strong {
  color: var(--dark);
  font-weight: 500;
}

/* Form hidden by JS during transition — CSS sent-state fallback */
.audit-form-col .wpcf7-form.sent { opacity: 0; pointer-events: none; position: absolute; }


/* ============================================
   RESPONSIVE
============================================ */

/* Tablet: stack columns */
@media (max-width: 1024px) {
  .audit-wrap {
    grid-template-columns: 1fr;
  }

  .audit-content {
    padding: 4rem 2.5rem 3rem;
  }

  .audit-form-col {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 3rem 2.5rem 4rem;
    border-left: none;
    border-top: 1px solid rgba(17,18,16,0.07);
  }

  .form-success {
    inset: 3rem 2.5rem 4rem;
  }

  .trust-bar { flex-wrap: wrap; gap: 1.5rem; }
}

/* Mobile */
@media (max-width: 768px) {
  .audit-content { padding: 3rem 1.5rem 2rem; }
  .audit-form-col { padding: 2.5rem 1.5rem 3rem; }

  .form-success { inset: 2.5rem 1.5rem 3rem; }

  .content-h1 { font-size: clamp(2rem, 7vw, 2.8rem); }

  .breadcrumb--light { margin-bottom: 2rem; }
}

@media (max-width: 480px) {
  .audit-content { padding: 2.5rem 1.25rem 2rem; }
  .audit-form-col { padding: 2rem 1.25rem 3rem; }

  .form-success { inset: 2rem 1.25rem 3rem; }
}