/* HandyAce responsive pass — V4
   Loaded after home-v3.css. Keeps the V3 visual direction while correcting
   container math, typography scale, form sizing and breakpoints. */

.home-v3,
.home-v3 * { box-sizing: border-box; }

.home-v3 img,
.home-v3 video,
.home-v3 svg { max-width: 100%; }

.home-v3 .ha-shell {
  width: min(1440px, calc(100% - 64px));
}

.home-v3 .ha-header .ha-shell,
.home-v3 .ha-utility .ha-shell {
  width: min(1440px, calc(100% - 64px));
}

/* Wide desktop: use the screen instead of leaving the composition cramped. */
.v3-hero-inner {
  grid-template-columns: minmax(0, .92fr) minmax(460px, 1.08fr);
  gap: clamp(38px, 4vw, 72px);
  min-height: 640px;
  padding-block: clamp(58px, 5vw, 82px);
}

.v3-title {
  max-width: 680px;
  font-size: clamp(48px, 4.55vw, 74px);
  line-height: .98;
  text-wrap: balance;
}

.v3-copy {
  max-width: 640px;
  font-size: clamp(17px, 1.25vw, 20px);
}

.v3-actions {
  gap: 10px;
}

.v3-actions .ha-primary-btn,
.v3-actions .ha-secondary-btn {
  white-space: nowrap;
}

.v3-mini-proof {
  max-width: 680px;
  margin-top: 30px;
}

.v3-mini-proof > div {
  min-width: 0;
}

.v3-visual {
  width: 100%;
  min-height: clamp(470px, 36vw, 590px);
  max-height: 620px;
}

.v3-visual-card {
  left: clamp(16px, 2vw, 26px);
  right: clamp(16px, 2vw, 26px);
  bottom: clamp(16px, 2vw, 26px);
  padding: clamp(20px, 2.1vw, 28px);
}

.v3-visual-card h2 {
  font-size: clamp(24px, 2vw, 30px);
}

.v3-trust-item {
  min-width: 0;
}

.v3-trust-item span:last-child,
.v3-section-copy,
.v3-service p,
.v3-big-card p,
.v3-side-card,
.v3-step p,
.v3-estimate-copy p,
.v3-resource p {
  overflow-wrap: anywhere;
}

/* Section rhythm and content proportions. */
.v3-section {
  padding-block: clamp(78px, 7vw, 108px);
}

.v3-section-head {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 60px);
}

.v3-heading {
  font-size: clamp(34px, 3.55vw, 56px);
  text-wrap: balance;
}

.v3-service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v3-service {
  min-width: 0;
  min-height: clamp(300px, 22vw, 340px);
}

.v3-split {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  gap: clamp(16px, 2vw, 26px);
}

.v3-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Estimate section: the form gets more room on desktop, but does not become
   excessively wide on ultrawide screens. */
.v3-estimate-wrap {
  grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.v3-estimate-copy {
  max-width: 500px;
}

.v3-estimate-copy h2 {
  font-size: clamp(38px, 3.8vw, 58px);
  text-wrap: balance;
}

.v3-estimate-box {
  width: 100%;
  max-width: 880px;
  justify-self: end;
  padding: clamp(24px, 2.5vw, 36px);
}

.v3-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-v3 .ha-input {
  width: 100%;
  max-width: 100%;
}

.home-v3 input[type="file"].ha-input {
  min-height: 56px;
  padding: 8px 10px;
  line-height: 36px;
}

.home-v3 input[type="file"].ha-input::file-selector-button {
  min-height: 36px;
  margin-right: 12px;
  padding: 0 14px;
  border: 1px solid rgba(255,183,125,.28);
  border-radius: 8px;
  background: rgba(255,183,125,.08);
  color: #e8d8cc;
  font: 700 11px/1 'JetBrains Mono', monospace;
  cursor: pointer;
}

/* 1280-ish laptops: still two-column hero, smaller type, two-column services. */
@media (max-width: 1279px) {
  .home-v3 .ha-shell,
  .home-v3 .ha-header .ha-shell,
  .home-v3 .ha-utility .ha-shell {
    width: min(1180px, calc(100% - 48px));
  }

  .v3-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(400px, .95fr);
    gap: 38px;
    min-height: 600px;
  }

  .v3-title {
    max-width: 620px;
    font-size: clamp(46px, 5vw, 64px);
  }

  .v3-visual {
    min-height: 500px;
  }

  .v3-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v3-service {
    min-height: 280px;
  }
}

/* Tablet / small laptop: stack big visual sections before they become cramped. */
@media (max-width: 1023px) {
  .home-v3 .ha-shell,
  .home-v3 .ha-header .ha-shell,
  .home-v3 .ha-utility .ha-shell {
    width: min(920px, calc(100% - 40px));
  }

  .v3-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 42px;
    padding-block: 54px 64px;
  }

  .v3-title {
    max-width: 780px;
    font-size: clamp(48px, 7vw, 68px);
  }

  .v3-copy {
    max-width: 760px;
  }

  .v3-visual {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: none;
  }

  .v3-section-head,
  .v3-split,
  .v3-estimate-wrap {
    grid-template-columns: 1fr;
  }

  .v3-section-head {
    gap: 18px;
  }

  .v3-section-copy {
    max-width: 760px;
  }

  .v3-estimate-copy {
    position: static;
    max-width: 760px;
  }

  .v3-estimate-box {
    max-width: none;
    justify-self: stretch;
  }

  .v3-resource-row {
    grid-template-columns: 1fr 1fr;
  }

  .v3-resource:first-child {
    grid-column: 1 / -1;
  }
}

/* Tablets / large phones. */
@media (max-width: 767px) {
  .home-v3 main {
    padding-top: 92px;
  }

  .home-v3 .ha-utility {
    height: 28px;
    font-size: 8px;
  }

  .home-v3 .ha-utility .ha-shell {
    height: 28px !important;
    width: calc(100% - 28px);
    justify-content: center !important;
  }

  .home-v3 .ha-utility .ha-shell > span:first-child {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .home-v3 .ha-header {
    top: 28px !important;
  }

  .home-v3 .ha-header .ha-shell {
    height: 64px !important;
    width: calc(100% - 28px);
  }

  .home-v3 .ha-shell {
    width: calc(100% - 28px);
  }

  .home-v3 .ha-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 21px !important;
  }

  .home-v3 .ha-brand strong {
    font-size: 18px;
  }

  .home-v3 .ha-brand small {
    display: none;
  }

  .home-v3 .ha-menu-btn {
    width: 44px;
    height: 44px;
  }

  .v3-hero-inner {
    gap: 32px;
    padding-block: 40px 50px;
  }

  .v3-eyebrow {
    font-size: 9px;
    letter-spacing: .11em;
    line-height: 1.45;
  }

  .v3-eyebrow::before {
    width: 20px;
  }

  .v3-title {
    max-width: none;
    font-size: clamp(40px, 11.5vw, 56px);
    line-height: .98;
    letter-spacing: -.045em;
  }

  .v3-copy {
    font-size: 16px;
    line-height: 1.58;
  }

  .v3-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  .v3-actions .ha-primary-btn {
    grid-column: 1 / -1;
  }

  .v3-actions .ha-primary-btn,
  .v3-actions .ha-secondary-btn {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    padding-inline: 12px;
    white-space: normal;
    text-align: center;
  }

  .v3-subnote {
    font-size: 12px;
  }

  .v3-mini-proof {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 26px;
  }

  .v3-mini-proof > div {
    min-height: 0;
    padding: 14px 15px;
  }

  .v3-visual {
    aspect-ratio: 4 / 5;
    min-height: 0;
    border-radius: 18px;
  }

  .v3-visual-badge {
    top: 12px;
    left: 12px;
    padding: 8px 10px;
    font-size: 8px;
  }

  .v3-visual-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 17px;
    border-radius: 14px;
  }

  .v3-visual-card h2 {
    font-size: 22px;
  }

  .v3-visual-card p {
    font-size: 13px;
  }

  .v3-visual-list {
    gap: 6px;
    margin-top: 13px;
  }

  .v3-visual-list span {
    padding: 6px 8px;
    font-size: 10px;
  }

  .v3-trust-row {
    grid-template-columns: 1fr 1fr;
  }

  .v3-trust-item {
    min-height: 62px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 11px;
    line-height: 1.35;
  }

  .v3-section {
    padding-block: 68px;
  }

  .v3-heading {
    font-size: clamp(32px, 9vw, 44px);
  }

  .v3-section-copy {
    font-size: 16px;
  }

  .v3-service-grid,
  .v3-steps,
  .v3-resource-row {
    grid-template-columns: 1fr;
  }

  .v3-resource:first-child {
    grid-column: auto;
  }

  .v3-service {
    min-height: 250px;
    padding: 22px;
  }

  .v3-service h3 {
    font-size: 22px;
  }

  .v3-big-card,
  .v3-side-card,
  .v3-step {
    padding: 24px;
  }

  .v3-step {
    min-height: 200px;
  }

  .v3-step h3 {
    margin-top: 34px;
  }

  .v3-estimate-copy h2 {
    font-size: clamp(36px, 10vw, 48px);
  }

  .v3-estimate-box {
    padding: 20px;
    border-radius: 18px;
  }

  .v3-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .v3-form-grid .full {
    grid-column: auto;
  }

  .home-v3 .ha-input,
  .home-v3 select.ha-input,
  .home-v3 textarea.ha-input {
    font-size: 16px; /* Prevent iOS Safari zoom-on-focus. */
  }

  .v3-faq .faq-toggle {
    padding: 20px 0;
  }

  .v3-faq .faq-toggle span:first-child {
    font-size: 16px;
    line-height: 1.35;
  }
}

/* Small phones. */
@media (max-width: 479px) {
  .home-v3 .ha-shell,
  .home-v3 .ha-header .ha-shell,
  .home-v3 .ha-utility .ha-shell {
    width: calc(100% - 22px);
  }

  .home-v3 .ha-brand {
    gap: 8px;
  }

  .home-v3 .ha-brand strong {
    font-size: 17px;
  }

  .v3-title {
    font-size: clamp(38px, 12.2vw, 48px);
  }

  .v3-actions {
    grid-template-columns: 1fr;
  }

  .v3-actions .ha-primary-btn {
    grid-column: auto;
  }

  .v3-trust-row {
    grid-template-columns: 1fr;
  }

  .v3-trust-item {
    border-right: 0;
    min-height: 54px;
  }

  .v3-visual {
    aspect-ratio: 3 / 4;
  }

  .v3-visual-card .kicker {
    font-size: 8px;
  }

  .v3-visual-card h2 {
    font-size: 20px;
  }

  .v3-visual-list span:nth-child(n+5) {
    display: none;
  }

  .v3-section {
    padding-block: 58px;
  }

  .v3-heading {
    font-size: 34px;
  }

  .v3-big-card h3 {
    font-size: 30px;
  }

  .v3-estimate-box {
    padding: 16px;
  }

  .home-v3 input[type="file"].ha-input {
    line-height: 1.25;
    padding: 8px;
  }

  .home-v3 input[type="file"].ha-input::file-selector-button {
    width: 100%;
    margin: 0 0 8px;
  }
}

/* Short landscape screens: avoid hero looking vertically oversized. */
@media (min-width: 768px) and (max-height: 760px) {
  .v3-hero-inner {
    min-height: auto;
    padding-block: 42px;
  }

  .v3-visual {
    min-height: 430px;
  }

  .v3-mini-proof {
    margin-top: 24px;
  }
}
