/* Upfront Solutions brand styles */
:root {
  --navy: #151C34;
  --slate: #44465F;
  --gold: #EFBD41;
  --gold-soft: #E9C05E;
  --cream: #F7F2EF;
  --ink: #333333;
  --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: #000;
  line-height: 1.15;
}

img { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.nav img.logo { height: 42px; width: auto; }
.nav ul { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; }
.nav a:hover { color: #000; }
.nav a.nav-cta {
  background: var(--navy);
  color: var(--gold);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
}
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: var(--gold-soft);
  text-align: center;
  padding: 90px 24px 70px;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 62px);
  max-width: 900px;
  margin: 0 auto 16px;
}
.hero p.sub {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--navy);
  max-width: 680px;
  margin: 0 auto 36px;
  font-weight: 500;
}
.btn-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-2px); opacity: .92; }
.btn-dark { background: #111; color: var(--gold); border: 2px solid #111; }
.btn-outline { background: transparent; color: #111; border: 2px solid #111; }
.btn-gold { background: var(--gold); color: #111; border: 2px solid var(--gold); }

/* ---------- Hero split layout (home page) ---------- */
.hero-inner {
  display: flex;
  align-items: center;
  gap: 56px;
  max-width: 1140px;
  margin: 0 auto;
}
.hero-copy { flex: 1; text-align: left; }
.hero-copy h1 { margin-left: 0; }
.hero-copy .sub { margin-left: 0; }
.hero-copy .btn-row { justify-content: flex-start; }
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; gap: 40px; }
  .hero-copy { text-align: center; }
  .hero-copy .btn-row { justify-content: center; }
}

/* ---------- Animated search results graphic ---------- */
.serp-demo {
  width: min(420px, 100%);
  flex: none;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(21,28,52,.22);
  padding: 20px;
  text-align: left;
}
.serp-caption {
  position: relative;
  height: 24px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
}
.serp-caption > span { position: absolute; left: 2px; top: 0; }
.cap-now { color: var(--slate); animation: capNow 8s ease .4s infinite both; }
.cap-goal { color: var(--navy); opacity: 0; animation: capGoal 8s ease .4s infinite both; }
.cap-goal em { font-style: normal; color: #B8860B; }
@keyframes capNow  { 0%, 30% { opacity: 1; } 44%, 88% { opacity: 0; } 96%, 100% { opacity: 1; } }
@keyframes capGoal { 0%, 44% { opacity: 0; } 58%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* flowing dots on "Where you are now..." */
.cap-now i {
  font-style: normal;
  display: inline-block;
  animation: dotFlow 1.1s ease-in-out infinite;
}
.cap-now i:nth-child(2) { animation-delay: .18s; }
.cap-now i:nth-child(3) { animation-delay: .36s; }
@keyframes dotFlow {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.serp-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 16px;
}
.serp-bar svg { flex: none; }
.serp-list { position: relative; height: 264px; }
.serp-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border-radius: 10px;
  padding: 0 14px;
}
.serp-row .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #DDD6CF;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.serp-row .lines { flex: 1; }
.serp-row .bar { height: 8px; border-radius: 4px; background: #DDD6CF; margin: 5px 0; }
.serp-row .bar.short { width: 55%; }
.serp-row .bar.tiny { width: 35%; }
.serp-row .stars-grey { color: #CFC9C2; font-size: 12px; letter-spacing: 1px; }

.serp-row.you {
  background: #FFF;
  border: 2.5px solid var(--gold);
  box-shadow: 0 8px 24px rgba(239,189,65,.35);
  z-index: 5;
}
.serp-row.you .avatar { background: var(--gold); }
.serp-row.you .name { font-weight: 800; font-size: 15px; color: var(--navy); line-height: 1.2; }
.serp-row.you .stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.serp-row.you .reviews { color: var(--slate); font-size: 12px; font-weight: 600; }
.serp-row.you .rank {
  flex: none;
  background: var(--navy);
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
  border-radius: 8px;
  padding: 6px 10px;
  opacity: 0;
  animation: capGoal 8s ease .4s infinite both;
}

/* positions: 0, 69, 138, 207 (58px row + 11px gap).
   8s loop: hold start, rise to #1, hold, crossfade back to the start screen. */
.serp-row.r1  { top: 0;     animation: comp1 8s cubic-bezier(.45,0,.2,1) .4s infinite both; }
.serp-row.r2  { top: 69px;  animation: comp2 8s cubic-bezier(.45,0,.2,1) .4s infinite both; }
.serp-row.you { top: 138px; animation: rise  8s cubic-bezier(.45,0,.2,1) .4s infinite both; }
.serp-row.r4  { top: 207px; }

/* static copy of the start screen that fades in over the end screen,
   covering the rows while they snap back to their start positions */
.serp-ghost {
  position: absolute;
  inset: 0;
  background: var(--white);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  animation: ghostIn 8s ease .4s infinite both;
}
.serp-ghost .serp-row { animation: none; }
.serp-ghost .g1 { top: 0; }
.serp-ghost .g2 { top: 69px; }
.serp-ghost .gyou { top: 138px; }
.serp-ghost .g4 { top: 207px; }
@keyframes ghostIn {
  0%, 88% { opacity: 0; }
  96%, 100% { opacity: 1; }
}

@keyframes rise {
  0%, 22%   { top: 138px; }
  44%, 96%  { top: 0; }
  100%      { top: 138px; }
}
@keyframes comp1 {
  0%, 22%   { top: 0; }
  44%, 96%  { top: 69px; }
  100%      { top: 0; }
}
@keyframes comp2 {
  0%, 22%   { top: 69px; }
  44%, 96%  { top: 138px; }
  100%      { top: 69px; }
}
.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
}

.trust-row {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 52px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-title { font-size: clamp(28px, 4vw, 42px); text-align: center; margin-bottom: 14px; }
.section-sub { text-align: center; max-width: 720px; margin: 0 auto 48px; color: var(--slate); font-size: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.card {
  background: var(--white);
  border-radius: 14px;
  padding: 36px 30px;
  box-shadow: 0 10px 34px rgba(21,28,52,.10);
}
.card .icon { font-size: 30px; margin-bottom: 14px; display: block; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--slate); font-size: 15.5px; margin-bottom: 14px; }
.card a.more { color: #000; font-weight: 700; text-decoration: none; }
.card a.more:hover { text-decoration: underline; }

.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,.85); }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: stretch; }
.price-card {
  background: var(--white);
  border-radius: 14px;
  padding: 38px 32px;
  box-shadow: 0 10px 34px rgba(21,28,52,.10);
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.featured { border: 3px solid var(--gold); }
.badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #111;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.price-card h3 { font-size: 21px; margin-bottom: 6px; }
.price { font-size: 40px; font-weight: 800; color: #000; margin: 10px 0 2px; }
.price span { font-size: 16px; font-weight: 500; color: var(--slate); }
.price-note { font-size: 14px; color: var(--slate); margin-bottom: 18px; }
.price-card ul { list-style: none; margin: 0 0 26px; flex: 1; }
.price-card li { padding: 7px 0 7px 28px; position: relative; font-size: 15.5px; color: var(--ink); }
.price-card li::before { content: "\2713"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.price-card .btn { text-align: center; }

/* ---------- Card mini-animations ---------- */
.viz {
  background: var(--cream);
  border-radius: 12px;
  height: 132px;
  margin-bottom: 18px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

/* Card 1: search + your site appears */
.vz-bar {
  background: var(--white);
  border-radius: 18px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(21,28,52,.08);
}
.vz-type {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  border-right: 2px solid var(--navy);
  animation: vzType 7s infinite, vzCaret .7s steps(1) infinite;
}
@keyframes vzType {
  0%, 6%    { width: 0; animation-timing-function: steps(18, end); }
  36%, 94%  { width: 132px; }
  100%      { width: 0; }
}
@keyframes vzCaret { 50% { border-color: transparent; } }
.vz-result {
  margin-top: 11px;
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  gap: 9px;
  align-items: center;
  opacity: 0;
  animation: vzPop 7s ease infinite;
}
.vz-fav {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  flex: none;
}
.vz-meta { flex: 1; }
.vz-line { height: 7px; border-radius: 4px; background: #E4DED8; margin: 4px 0; }
.vz-line.w60 { width: 60%; }
.vz-tag {
  font-size: 10.5px; font-weight: 800;
  color: var(--navy); background: var(--gold);
  border-radius: 10px; padding: 3px 8px;
  white-space: nowrap;
}
@keyframes vzPop {
  0%, 40%   { opacity: 0; transform: translateY(8px); }
  48%, 90%  { opacity: 1; transform: translateY(0); }
  96%, 100% { opacity: 0; transform: translateY(8px); }
}

/* Card 2: map pack turning green */
.viz-map { padding: 0; }
.vz-mapbg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 30%, #EAE4DC 30.5% 33.5%, transparent 34%),
    linear-gradient(90deg, transparent 68%, #EAE4DC 68.5% 71.5%, transparent 72%),
    linear-gradient(0deg,  transparent 46%, #EAE4DC 47% 53%, transparent 54%),
    linear-gradient(115deg, transparent 55%, #E3EDDD 55.5% 62%, transparent 62.5%),
    #F4EFE9;
}
.vz-pins {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  place-items: center;
  padding: 8px 12px;
}
.pin { width: 31px; height: 31px; position: relative; }
.pin b, .pin i {
  position: absolute; inset: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; font-style: normal;
  color: #fff;
  box-shadow: 0 2px 5px rgba(21,28,52,.22);
}
.pin b { background: #C4453C; animation: pinOld 7s ease infinite; animation-delay: var(--d, 0s); }
.pin.org b { background: #E08A2E; }
.pin i { background: #3E9B4F; opacity: 0; animation: pinNew 7s ease infinite; animation-delay: var(--d, 0s); }
@keyframes pinOld {
  0%, 38%   { opacity: 1; }
  46%, 88%  { opacity: 0; }
  95%, 100% { opacity: 1; }
}
@keyframes pinNew {
  0%, 38%   { opacity: 0; transform: scale(.6); }
  46%, 88%  { opacity: 1; transform: scale(1); }
  95%, 100% { opacity: 0; transform: scale(.6); }
}

/* Card 3: repeat touches lead to a sale */
.viz-touch { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.vz-touchrow { display: flex; align-items: center; justify-content: space-between; }
.tp {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--white);
  color: #B9B2A9;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(21,28,52,.08);
  flex: none;
}
.sep { color: #CFC8BF; font-weight: 800; font-size: 15px; }
.tp.buy {
  width: auto;
  border-radius: 18px;
  padding: 0 13px;
  font-weight: 800; font-size: 13px;
  animation: buyPop 7s ease infinite;
}
.t1 { animation: tpA 7s ease infinite; }
.t2 { animation: tpB 7s ease infinite; }
.t3 { animation: tpC 7s ease infinite; }
.t4 { animation: tpD 7s ease infinite; }
@keyframes tpA { 0%, 8%  { background: #fff; color: #B9B2A9; } 13%, 88% { background: var(--gold); color: var(--navy); } 95%, 100% { background: #fff; color: #B9B2A9; } }
@keyframes tpB { 0%, 21% { background: #fff; color: #B9B2A9; } 26%, 88% { background: var(--gold); color: var(--navy); } 95%, 100% { background: #fff; color: #B9B2A9; } }
@keyframes tpC { 0%, 34% { background: #fff; color: #B9B2A9; } 39%, 88% { background: var(--gold); color: var(--navy); } 95%, 100% { background: #fff; color: #B9B2A9; } }
@keyframes tpD { 0%, 47% { background: #fff; color: #B9B2A9; } 52%, 88% { background: var(--gold); color: var(--navy); } 95%, 100% { background: #fff; color: #B9B2A9; } }
@keyframes buyPop {
  0%, 60%   { background: #fff; color: #B9B2A9; transform: scale(1); }
  66%, 88%  { background: var(--navy); color: var(--gold); transform: scale(1.08); }
  95%, 100% { background: #fff; color: #B9B2A9; transform: scale(1); }
}
.vz-note { font-size: 12.5px; font-weight: 600; color: var(--slate); text-align: center; }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.testimonial {
  background: var(--white);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 10px 34px rgba(21,28,52,.10);
  border-top: 4px solid var(--gold);
}
.testimonial blockquote { font-size: 17px; font-weight: 600; color: var(--navy); margin-bottom: 18px; }
.t-footer { display: flex; align-items: center; gap: 12px; }
.t-logo { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; flex: none; }
.testimonial .who { font-weight: 700; color: #000; }
.testimonial .role { font-size: 14px; color: var(--slate); }

/* ---------- Case studies ---------- */
.case-study {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(21,28,52,.10);
  padding: 40px;
  margin-bottom: 36px;
}
.case-study h3 { font-size: 24px; margin-bottom: 6px; }
.case-study .tag {
  display: inline-block;
  background: var(--cream);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.case-study .result {
  font-size: 30px;
  font-weight: 800;
  color: #000;
  margin: 14px 0 6px;
}
.case-study .shot {
  background: var(--cream);
  border: 2px dashed rgba(21,28,52,.25);
  border-radius: 10px;
  padding: 48px 20px;
  text-align: center;
  color: var(--slate);
  margin-top: 22px;
  font-size: 15px;
}
.case-study img.shot-img { border-radius: 10px; margin-top: 22px; box-shadow: 0 6px 20px rgba(21,28,52,.12); }

/* ---------- Forms ---------- */
.form-wrap { max-width: 620px; margin: 0 auto; }
form label { display: block; font-weight: 600; margin: 18px 0 6px; color: var(--navy); }
form input, form textarea, form select {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #d8d4cf;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: var(--white);
}
form input:focus, form textarea:focus, form select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
form button {
  margin-top: 26px;
  width: 100%;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  background: var(--navy);
  color: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
form button:hover { opacity: .93; }

.form-msg { display: none; margin-top: 20px; border-radius: 10px; padding: 22px 24px; font-weight: 600; }
.form-msg.show { display: block; }
.form-success {
  background: var(--white);
  border: 2.5px solid var(--gold);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(239,189,65,.25);
  font-size: 17px;
  text-align: center;
}
.form-success .big {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.form-error {
  background: #FDF0EF;
  border: 2px solid #D9887F;
  color: #8C3A31;
  font-size: 15px;
  text-align: center;
}

/* ---------- Footer ---------- */
footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 40px; }
footer h4 { color: var(--gold); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
footer a { color: rgba(255,255,255,.8); text-decoration: none; display: block; padding: 4px 0; font-size: 15px; }
footer a:hover { color: var(--gold); }
.copyright { text-align: center; font-size: 13.5px; color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
    box-shadow: 0 12px 20px rgba(0,0,0,.08);
  }
  .nav ul.open { display: flex; }
  .nav ul li { width: 100%; }
  .nav ul a { display: block; padding: 12px 0; font-size: 17px; }
  .nav-toggle { display: block; }
  section { padding: 56px 0; }
  .case-study { padding: 28px 22px; }
}
