/* Earlink Ads site styles, shared by index.html and contact.html.

   Design: "The page is an ad". An agency that
   writes ads presents itself as one: the hero is a search-ad unit, services
   are ad creatives, the steps read like ad extensions, the report is a
   lead-form panel, and the audit request is a lead form.

   Rules that keep it working:
   - Blue (--link) is only for things you can click. Titles are ink.
   - --flag yellow is only the Ad badge and focus rings.
   - Instrument Sans throughout; width 80 for display headlines.
   Contrast (WCAG AA): muted on paper 6.4:1, on wash 5.8:1; link on paper
   7.7:1; white on link 7.7:1; ink on flag 12:1. */
:root {
  --paper: #ffffff; --ink: #15171a; --muted: #5a5f66; --wash: #f2f3f5;
  --line: #dadde1; --link: #1f3fd6; --flag: #ffc93c;
  --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif; font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-wrap: pretty; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.05; font-stretch: 80%; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--flag); border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn-primary { background: var(--link); color: #fff; }
.btn-primary:hover { background: #1632b0; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* Header */
.top { display: flex; align-items: center; gap: 20px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); padding: 3px; background: var(--paper); }
.top > nav { display: flex; gap: 22px; margin-left: auto; }
.top > nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top > nav a:hover { color: var(--link); }
.top-right { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
/* EN / ES are links to the same page in the other language (/, /es/), so
   each language has its own indexable URL. The current one is aria-current. */
.lang a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 6px 12px; border-radius: 999px; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--ink); color: #fff; }
/* Skip link: hidden until focused with the keyboard. */
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.top .btn { min-height: 42px; padding: 9px 18px; }
@media (max-width: 900px) { .top > nav { display: none; } .top-right { margin-left: auto; } }
@media (max-width: 420px) { .top .btn { display: none; } }

/* Hero: the search-ad unit */
.hero { padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); }
.ad { max-width: 980px; }
.ad-meta { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.ad-badge { background: var(--flag); color: var(--ink); font-weight: 700; font-size: 14px;
  padding: 3px 10px; border-radius: 6px; }
.ad-site { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.ad-site img { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); padding: 2px; }
.ad h1 { font-size: clamp(48px, 9vw, 116px); margin-top: 18px; }
.ad h1 a { color: var(--link); text-decoration: none; }
.ad h1 a:hover { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .08em; }
.ad h1 .line { display: block; }
.ad-desc { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink); max-width: 60ch; margin-top: 22px; }
.ad-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.sitelinks { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 30px;
  border-top: 1px solid var(--line); max-width: 720px; }
@media (max-width: 900px) { .sitelinks { display: grid; } }
.sitelinks a { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 600; text-decoration: none; }
.sitelinks a:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--line); }
.sitelinks a:nth-child(even) { padding-left: 20px; }
.sitelinks a:hover span:first-child { text-decoration: underline; }
.sitelinks .chev { color: var(--muted); font-weight: 400; }

.callouts { margin-top: 34px; padding: 20px 22px 22px; background: var(--wash); border-radius: var(--r); max-width: 980px; }
.callouts-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.callouts-head h2 { font-size: 22px; font-stretch: 100%; letter-spacing: 0; }
.callouts-head p { color: var(--muted); font-size: 15px; }
.chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 15px; line-height: 1.35; }
.callouts-note { color: var(--muted); font-size: 15px; margin-top: 14px; }

/* The one load moment: the ad unit settles in, line by line. */
@media (prefers-reduced-motion: no-preference) {
  .ad > * { animation: settle .6s cubic-bezier(.2,.7,.2,1) both; }
  .ad > :nth-child(2) { animation-delay: .08s; }
  .ad > :nth-child(3) { animation-delay: .16s; }
  .ad > :nth-child(4) { animation-delay: .24s; }
  .ad > :nth-child(5) { animation-delay: .32s; }
  .ad > :nth-child(6) { animation-delay: .40s; }
  @keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Section scaffolding */
section { padding: clamp(48px, 7vw, 96px) 0; }
.sec-head h2 { font-size: clamp(34px, 5vw, 60px); max-width: 18ch; }
.sec-head p { font-size: 19px; color: var(--muted); max-width: 58ch; margin-top: 14px; }
.band { background: var(--wash); }

/* Steps: ad extensions */
.ext { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.ext li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 18px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line); }
.ext .pos { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 17px; align-self: start; }
.ext h3 { font-size: 24px; color: var(--ink); font-stretch: 90%; }
.ext p { color: var(--muted); max-width: 70ch; }
@media (min-width: 900px) {
  .ext li { grid-template-columns: 56px minmax(0, 18rem) minmax(0, 1fr); }
  .ext .pos { grid-row: auto; }
}

/* Services: feed carousel of creatives */
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(28px, 4vw, 44px); }
.creative { aspect-ratio: 1 / 1; border-radius: var(--r); padding: 26px;
  display: flex; flex-direction: column; justify-content: space-between; }
@media (max-width: 900px) {
  /* Phones: a swipe feed. Cards are 80% wide so the next one peeks in,
     which is the cue that there is more to the side. */
  .feed { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding: 4px 4px 14px; margin-left: -4px; margin-right: -4px; scrollbar-width: none; }
  .feed::-webkit-scrollbar { display: none; }
  .feed:focus-visible { box-shadow: 0 0 0 6px var(--flag); }
  .creative { scroll-snap-align: start; aspect-ratio: auto; min-height: 260px; }
}
.creative h3 { font-size: clamp(30px, 3vw, 38px); font-stretch: 80%; }
.creative p { font-size: 16px; }
.creative[data-index="0"], .creative[data-index="3"] { background: var(--link); color: #fff; }
.creative[data-index="1"], .creative[data-index="4"] { background: var(--ink); color: #fff; }
.creative[data-index="2"], .creative[data-index="5"] { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }

/* Transparency: instant-form preview */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 52ch; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; font-size: 18px; }
.checks li::before { content: ""; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  background: var(--link) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16 8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; }
.form { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden; }
.form-top { display: flex; gap: 12px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.form-top img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); padding: 3px; }
.form-top h3 { font-size: 20px; font-stretch: 100%; letter-spacing: 0; }
.form-top p { font-size: 14px; color: var(--muted); }
.fields { margin: 0; padding: 4px 20px; }
.field { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: 4px 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field dt { font-weight: 700; font-size: 15px; }
.field dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
@media (max-width: 380px) { .field { grid-template-columns: 1fr; } }
.form-foot { padding: 6px 20px 20px; }
.form-foot .btn { width: 100%; border-radius: 12px; }

/* FAQ */
.faq-list { margin-top: clamp(28px, 4vw, 44px); border-top: 1.5px solid var(--ink); max-width: 900px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px;
  align-items: center; padding: 20px 2px; font-size: clamp(19px, 2vw, 23px); font-weight: 600; color: var(--ink); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: 0 0 auto; width: 14px; height: 14px; border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-list summary:hover::after { border-color: var(--link); }
.faq-list details p { padding: 0 2px 22px; max-width: 68ch; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .faq-list summary::after { transition: none; } html { scroll-behavior: auto; } }

/* Closing: sponsored post */
.post-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .post-wrap { grid-template-columns: 1fr; } }
.post-wrap h2 { font-size: clamp(38px, 6vw, 76px); }
.post-wrap h2 .line { display: block; }
.post-copy { font-size: 19px; max-width: 42ch; margin-top: 20px; }
.post-mail { margin-top: 18px; font-weight: 600; }
.post { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 0 var(--line); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.post-head img { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); padding: 3px; }
.post-head strong { display: block; font-size: 16px; }
.post-head span { font-size: 13px; color: var(--muted); }
.post-list { list-style: none; margin: 0; padding: 0 16px 14px; display: grid; gap: 6px; font-size: 15px; }
.post-list li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; }
.post-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--link); margin-top: 8px; }
.post-media { background: var(--link); color: #fff; aspect-ratio: 1.25 / 1; display: flex; align-items: flex-end; padding: clamp(22px, 4vw, 34px); }
.post-media p { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; line-height: 1.08; font-stretch: 80%; }
.post-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 16px; background: var(--wash); flex-wrap: wrap; }
.post-bar .btn { min-height: 42px; padding: 9px 18px; border-radius: 10px; background: var(--ink); color: #fff; }
.post-bar .btn:hover { background: #000; }

/* Pinned audit bar, phones only. Shown once the hero is off screen, hidden
   again when the closing post (which has its own button) is on screen. */
.dock { display: none; }
@media (max-width: 720px) {
  .dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line); visibility: hidden; transform: translateY(100%);
    transition: transform .25s ease, visibility 0s linear .25s; }
  .dock.on { visibility: visible; transform: none; transition: transform .25s ease; }
  .dock .btn { width: 100%; }
  body { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) { .dock, .dock.on { transition: none; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 26px 0 34px; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
footer a { color: var(--ink); }

/* Audit request: a lead-form card holding the GoHighLevel form. */
.lead { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden; }
.lead-head { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.lead-head img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); padding: 3px; }
.lead-head strong { display: block; font-size: 16px; }
.lead-head span { font-size: 13px; color: var(--muted); }
.lead-title { font-size: clamp(24px, 2.6vw, 30px); font-stretch: 80%; padding: 18px 20px 4px; }
.lead-body { padding: 4px 8px 8px; }
/* GoHighLevel embedded form (fields, validation and the SMS consent
   checkboxes live in GHL, not here). These heights are a fallback only:
   form_embed.js sets an exact inline height when the form reports one, and
   that wins. The quick forms report 858px (EN) and 814px (ES) in GHL's
   embed code; these fallbacks add headroom for narrow columns, where the
   SMS consent text wraps onto more lines. They are estimates, not measured
   per width like the old 10-field forms were (those needed 1400-2000px).
   Erring short would hide the consent boxes and submit button behind an
   iframe scrollbar; erring tall only costs white space. See
   assets/js/ghl-form-guard.js for why the fallback is needed at all. */
.ghl-form { display: block; width: 100%; height: 1000px; border: 0; background: var(--paper); }
@media (max-width: 600px) {
  .ghl-form { height: 1300px; }
}
.audit-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .audit-wrap { grid-template-columns: 1fr; } }
.audit-side { position: sticky; top: 24px; }
@media (max-width: 900px) { .audit-side { position: static; } }
.audit-side h2 { font-size: clamp(38px, 6vw, 76px); }
.audit-side h2 .line, .contact-hero h1 .line { display: block; }
.audit-side .checks, .contact-hero .checks { margin-top: 24px; }
.plain-mail { margin-top: 22px; font-weight: 600; }
.plain-mail span { color: var(--muted); font-weight: 400; margin-right: 6px; }

/* Contact page */
.contact-hero { padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(48px, 7vw, 96px); }
.contact-hero h1 { font-size: clamp(40px, 5vw, 64px); }
.contact-hero .lede { font-size: clamp(18px, 1.6vw, 21px); max-width: 46ch; margin-top: 20px; }
.contact-hero .callouts { margin-top: 28px; }
.contact-hero .callouts h2 { font-size: 20px; font-stretch: 100%; letter-spacing: 0; }
.contact-hero .checks { font-size: 17px; }
.contact-hero .checks li { font-size: 17px; }

/* The GoHighLevel chat launcher sits bottom-right; on phones the pinned
   audit bar leaves room for it instead of covering it. */
@media (max-width: 720px) { .dock { padding-right: 88px; } }

/* Thank-you page (thanks.html, es/thanks.html) */
.thanks { max-width: 820px; padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(56px, 8vw, 104px); }
.thanks-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; margin-bottom: 22px; }
.thanks h1 { font-size: clamp(40px, 6vw, 72px); }
.thanks h1 .line { display: block; }
.thanks .lede { font-size: clamp(18px, 1.6vw, 21px); margin-top: 18px; max-width: 52ch; }
.thanks-next { font-size: clamp(26px, 3vw, 34px); margin-top: clamp(36px, 5vw, 56px); }
.thanks .ext { margin-top: 18px; }
.thanks-inbox { color: var(--muted); margin-top: 24px; max-width: 60ch; }
.thanks .ad-ctas { margin-top: 28px; }
/* Headers without the section nav (thank-you page) still push the language
   switch to the right edge. */
.brand + .top-right { margin-left: auto; }

/* Keyword line inside the homepage H1: reads like the path of a search ad,
   gives the heading its search terms without changing the headline. */
.h1-kicker { display: block; font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; font-stretch: 100%;
  letter-spacing: 0; line-height: 1.3; color: var(--ink); margin-bottom: 14px; }

/* Homepage service cards whose title links to a service page: the whole
   card is the link target, the underlined title says so. */
.creative { position: relative; }
.creative h3 a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: .14em; }
.creative h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.creative h3 a:hover { text-decoration-thickness: 3px; }
.creative:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--flag); }
.creative h3 a:focus-visible { outline: none; box-shadow: none; }

/* Service pages */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--link); }
.svc-h1 { font-size: clamp(40px, 6.4vw, 84px); margin-top: 18px; }
.svc-h1 a { color: var(--link); text-decoration: none; }
.svc-h1 a:hover { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .08em; }
.fixes { margin: 28px 0 0; border-top: 1.5px solid var(--ink); }
.fix { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fix dt { font-weight: 700; font-size: 18px; }
.fix dd { margin: 6px 0 0; color: var(--muted); }
.other-services { display: grid; margin-top: 24px; }
footer nav a { white-space: nowrap; }
