/* Focused homepage polish: static services, reusable project devices, audit, and contact. */
.agency-home {
  overflow-x: clip;
}

/* Static, admin-backed service rail. */
.agency-service-rail {
  border-bottom: 1px solid var(--line);
  background: #071125;
}

.agency-service-rail-list {
  width: min(var(--shell), calc(100% - 64px));
  min-height: 72px;
  margin-inline: auto;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: stretch;
}

.agency-service-rail-item {
  min-width: 0;
  flex: 1 1 0;
  display: flex;
  align-items: center;
}

.agency-service-rail-item:not(:last-child)::after {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(200, 255, 0, .32);
}

.agency-service-rail a {
  min-height: 72px;
  flex: 1;
  padding: 0 clamp(.8rem, 2vw, 1.75rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5f86ff;
  font-family: var(--font-display);
  font-size: clamp(.84rem, 1.2vw, 1.05rem);
  font-weight: 700;
  letter-spacing: .035em;
  text-align: center;
  text-transform: uppercase;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.agency-service-rail a:hover,
.agency-service-rail a:focus-visible {
  color: #91adff;
  background: rgba(79, 127, 255, .08);
  outline: none;
}

.agency-service-rail a:focus-visible {
  box-shadow: inset 0 0 0 2px var(--lime);
}

/* Project device system. */
.agency-project-media {
  padding: 0;
  isolation: isolate;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 38% 32%, rgba(25, 88, 255, .64), transparent 37%),
    linear-gradient(145deg, #0b2b76 0%, #07152f 57%, #050b18 100%);
}

.agency-project-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .2;
  background-image:
    linear-gradient(rgba(119, 149, 220, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 149, 220, .22) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(135deg, #000, transparent 78%);
}

.project-device-showcase {
  position: relative;
  width: min(90%, 820px);
  aspect-ratio: 1.48;
  display: grid;
  place-items: center;
}

.project-device-showcase.browser-only {
  width: min(88%, 790px);
}

.browser-mockup {
  position: relative;
  z-index: 1;
  width: 88%;
  aspect-ratio: 16 / 10;
  padding: 32px 8px 8px;
  border: 1px solid #61759e;
  border-radius: 16px;
  background: #050b18;
  box-shadow:
    0 34px 74px rgba(0, 0, 0, .52),
    0 18px 55px rgba(22, 80, 226, .22),
    inset 0 1px 0 rgba(255, 255, 255, .09);
  overflow: hidden;
}

.browser-mockup-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(115, 139, 188, .24);
  background: #0a1222;
}

.browser-mockup-toolbar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #50617f;
}

.browser-mockup-toolbar span:first-child { background: #c8ff00; }
.browser-mockup-toolbar span:nth-child(2) { background: #4f7fff; }
.browser-mockup-toolbar i {
  width: 42%;
  height: 8px;
  margin-left: auto;
  border: 1px solid rgba(111, 137, 189, .3);
  border-radius: 999px;
  background: rgba(69, 89, 130, .18);
}

.browser-mockup-screen {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(134, 157, 204, .18);
  border-radius: 7px;
  overflow: hidden;
  background: #07101f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.browser-mockup-screen img,
.phone-mockup-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone-mockup {
  position: absolute;
  z-index: 3;
  width: 22.5%;
  aspect-ratio: 9 / 19.5;
  right: 1.5%;
  bottom: 1.5%;
  padding: 8px;
  border: 1px solid #7d8aa2;
  border-radius: clamp(20px, 2.2vw, 30px);
  background: #030712;
  box-shadow:
    0 28px 55px rgba(0, 0, 0, .62),
    0 15px 35px rgba(21, 87, 255, .2),
    inset 0 1px 0 rgba(255, 255, 255, .15);
}

.phone-mockup-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: clamp(15px, 1.7vw, 23px);
  background: #07101f;
}

.phone-mockup-island {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 50%;
  width: 32%;
  height: 10px;
  border-radius: 999px;
  background: #02050b;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .035);
}

.project-device-line {
  position: absolute;
  z-index: 0;
  height: 2px;
  background: #4f7fff;
  box-shadow: 0 0 14px rgba(79, 127, 255, .42);
  pointer-events: none;
}

.project-device-line-one {
  width: 46%;
  top: 14%;
  right: -7%;
  transform: rotate(-18deg);
}

.project-device-line-two {
  width: 33%;
  left: -4%;
  bottom: 12%;
  opacity: .62;
  transform: rotate(-18deg);
}

/* Free website audit. */
.agency-audit {
  position: relative;
  background: linear-gradient(118deg, #1556ff 0%, #063bd7 52%, #0223a5 100%);
}

.agency-audit::after {
  content: "";
  position: absolute;
  width: 52vw;
  height: 2px;
  right: -12vw;
  bottom: 16%;
  background: rgba(118, 163, 255, .58);
  box-shadow: 0 -42px 0 rgba(118, 163, 255, .28);
  transform: rotate(-15deg);
  pointer-events: none;
}

.audit-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, .92fr) minmax(410px, .78fr);
  gap: clamp(4rem, 8vw, 8rem);
}

.agency-audit h2 {
  max-width: 11ch;
  margin-bottom: 1.35rem;
}

.agency-audit .audit-copy > p:not(.agency-kicker) {
  max-width: 50ch;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, .88);
}

.audit-checklist {
  margin: 0 0 2.25rem;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem !important;
}

.agency-audit li {
  min-width: 0;
  font-size: .98rem;
}

.audit-copy .agency-btn {
  min-height: 56px;
  padding-inline: 1.45rem;
  box-shadow: 0 16px 34px rgba(2, 12, 45, .24);
}

.audit-report-stack {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
}

.audit-report-backdrop {
  position: absolute;
  inset: 20px -18px -18px 24px;
  border: 1px solid rgba(181, 204, 255, .24);
  border-radius: 18px;
  background: rgba(6, 16, 42, .46);
  transform: rotate(2deg);
  box-shadow: 0 30px 70px rgba(0, 12, 55, .28);
}

.audit-report {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid rgba(170, 196, 255, .34);
  border-radius: 18px;
  background: #071329;
  color: #fff;
  box-shadow: 0 34px 80px rgba(0, 9, 38, .44), inset 0 1px 0 rgba(255, 255, 255, .07);
  transform: rotate(-1.2deg);
}

.audit-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(135, 164, 226, .22);
}

.audit-report-label {
  margin: 0 0 .45rem;
  color: #8caaff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.audit-report-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.15;
}

.audit-score {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--lime) 0 82%, rgba(92, 119, 177, .22) 82% 100%);
  box-shadow: 0 0 32px rgba(200, 255, 0, .12);
}

.audit-score-inner {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: #071329;
}

.audit-score strong { font-size: 1.55rem; line-height: 1; }
.audit-score small { margin-top: .25rem; color: #9fb0cf; font-size: .58rem; text-transform: uppercase; }

.audit-metrics {
  margin: 1.25rem 0;
  display: grid;
  gap: .9rem;
}

.audit-metric {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
}

.audit-metric-name { color: #dbe5fa; font-size: .76rem; font-weight: 650; }
.audit-progress { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(112, 139, 192, .2); }
.audit-progress span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.audit-metric.is-warning .audit-progress span { background: #ffb45c; }
.audit-status { padding: .24rem .46rem; border-radius: 99px; background: rgba(200, 255, 0, .11); color: var(--lime); font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.audit-metric.is-warning .audit-status { background: rgba(255, 180, 92, .13); color: #ffc477; }

.audit-recommendation {
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  border: 1px solid rgba(255, 180, 92, .24);
  border-radius: 10px;
  background: rgba(255, 180, 92, .075);
}

.audit-priority {
  align-self: start;
  padding: .3rem .45rem;
  border-radius: 4px;
  background: #ffb45c;
  color: #071329;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.audit-recommendation strong,
.audit-recommendation span { display: block; }
.audit-recommendation strong { margin-bottom: .25rem; font-size: .8rem; }
.audit-recommendation span { color: #aebfdd; font-size: .7rem; line-height: 1.45; }

/* Contact labels and inline validation. */
.form-required-note {
  grid-column: 1 / -1;
  margin: 0 0 .15rem;
  color: #c8d2e4;
  font-size: .78rem;
}

.form-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.form-label {
  display: inline-flex !important;
  align-items: baseline;
  align-self: flex-start;
  gap: .2rem !important;
  color: #d6dfef !important;
  line-height: 1.25;
}

.required-marker {
  color: var(--lime);
  font-size: .9em;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.field-error {
  min-height: 1em;
  margin: -.15rem 0 0;
  color: #ff9a9a;
  font-size: .78rem;
  line-height: 1.35;
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"],
.form-field select[aria-invalid="true"] {
  border-color: #ff8e8e;
}

@media (max-width: 1180px) {
  .audit-grid { grid-template-columns: minmax(0, 1fr) minmax(390px, .8fr); }
  .audit-report-stack { max-width: 440px; }
}

@media (max-width: 900px) {
  .agency-project-copy { order: 0 !important; }
  .agency-project-media { order: 1; min-height: clamp(430px, 64vw, 560px); }
  .project-device-showcase { width: min(88%, 760px); }
  .audit-grid { grid-template-columns: 1fr; gap: 4rem; }
  .audit-report-stack { max-width: 560px; margin-inline: auto; }
}

@media (max-width: 720px) {
  .agency-home .hero-showcase-lines {
    inset-inline: 0 !important;
    width: 100% !important;
    max-width: 100%;
  }

  .agency-service-rail { overflow: hidden; }
  .agency-service-rail-list {
    width: 100%;
    min-height: 64px;
    padding: 0 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .agency-service-rail-list::-webkit-scrollbar { display: none; }
  .agency-service-rail-item { min-width: max-content; flex: 0 0 auto; scroll-snap-align: start; }
  .agency-service-rail a { min-height: 64px; padding: 0 1.15rem; font-size: .8rem; white-space: nowrap; }
  .agency-service-rail-item:first-child a { padding-left: .25rem; }
  .agency-service-rail-item:last-child a { padding-right: .25rem; }
  .agency-service-rail-item:not(:last-child)::after { width: 4px; height: 4px; flex-basis: 4px; }

  .agency-project-media { min-height: 330px; padding: 0; }
  .project-device-showcase { width: 96%; aspect-ratio: 1.38; }
  .project-device-showcase.browser-only { width: 94%; }
  .browser-mockup { width: 91%; padding: 25px 6px 6px; border-radius: 10px; }
  .browser-mockup-toolbar { height: 25px; padding-inline: 8px; gap: 4px; }
  .browser-mockup-toolbar span { width: 5px; height: 5px; }
  .phone-mockup { width: 24%; right: 1%; bottom: 1%; padding: 5px; border-radius: 17px; }
  .phone-mockup-screen { border-radius: 13px; }
  .phone-mockup-island { top: 8px; height: 6px; }
  .project-device-line-one { right: -2%; }
  .project-device-line-two { left: 0; }

  .agency-audit { padding: 5rem 0; }
  .agency-audit::after { display: none; }
  .agency-audit h2 { font-size: clamp(2.8rem, 13vw, 4.25rem); }
  .audit-grid { gap: 3.25rem; }
  .audit-checklist { grid-template-columns: 1fr; gap: .85rem !important; }
  .audit-copy .agency-btn { width: 100%; }
  .audit-report-stack { width: calc(100% - 6px); }
  .audit-report-backdrop { inset: 12px -6px -12px 12px; transform: none; }
  .audit-report { padding: 1.25rem; transform: none; }
  .audit-report-header { gap: 1rem; }
  .audit-report-title { font-size: 1.1rem; }
  .audit-score { width: 74px; height: 74px; flex-basis: 74px; }
  .audit-score-inner { width: 60px; height: 60px; }
  .audit-metric { grid-template-columns: 68px minmax(0, 1fr) auto; gap: .55rem; }
  .audit-status { font-size: .52rem; }

  .agency-form { grid-template-columns: 1fr; }
  .form-required-note,
  .form-field.form-wide,
  .agency-form .agency-btn.form-wide,
  .agency-form .form-result.form-wide { grid-column: auto; }
  .agency-form input,
  .agency-form select { min-height: 48px; }
  .agency-form textarea { min-height: 180px; }
  .agency-form .agency-btn { width: 100%; }
}

@media (max-width: 390px) {
  .agency-project-media { min-height: 300px; }
  .project-device-showcase { width: 98%; }
  .phone-mockup { width: 25%; right: .5%; }
  .audit-report { padding: 1.05rem; }
  .audit-report-header { align-items: flex-start; }
  .audit-score { width: 68px; height: 68px; flex-basis: 68px; }
  .audit-score-inner { width: 55px; height: 55px; }
  .audit-score strong { font-size: 1.25rem; }
  .audit-metric { grid-template-columns: 62px minmax(0, 1fr); }
  .audit-metric .audit-status { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .agency-service-rail-list { scroll-behavior: auto; }
  .agency-service-rail a { transition: none; }
}
