/*
 * Homepage layout for code3concepts.com.
 * Loaded after style.css on index.html only (body class "home"). Other pages are not affected.
 */
.home { --band: #0c110f; --band-ink: #f1f4f2; --band-muted: #b4c0b9; --band-rule: #26302b; --cond: "Barlow Condensed", "Arial Narrow", sans-serif; }

.home section { border-top: 0; padding: clamp(72px, 9vw, 128px) 0; }
.home main h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 0; }
.home .kicker { font-family: var(--cond); font-size: 16px; letter-spacing: 0.14em; margin-bottom: 12px; }
.home .btn { border-radius: 6px; padding: 15px 28px; font-size: 15px; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.home .btn:hover { transform: translateY(-1px); }
.home .nav .nav-cta { border-radius: 6px; }

/* Header tightens once the page scrolls */
.home .site-header .wrap { transition: min-height .25s ease; }
.home .brand img { transition: height .25s ease; }
.home .site-header.is-stuck .wrap { min-height: 60px; }
.home .site-header.is-stuck .brand img { height: 30px; }
.home .site-header.is-stuck { box-shadow: 0 6px 24px rgba(10, 20, 15, .08); }

/* Hero: photo edge to edge, text on top */
.home .hx-hero { position: relative; padding: 0; background: var(--band); color: var(--band-ink); overflow: hidden; min-height: min(calc(100vh - 80px), 840px); display: flex; flex-direction: column; justify-content: flex-end; }
.hx-hero-bg { position: absolute; inset: 0; margin: 0; }
.hx-hero-bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 22% 50%; animation: push-in 18s cubic-bezier(.2,.6,.2,1) both; }
.hx-hero-bg::after { content: ""; position: absolute; inset: 0; background: rgba(8, 12, 10, .6); }
.hx-hero-in { position: relative; z-index: 1; width: 100%; padding-top: clamp(56px, 9vh, 120px); padding-bottom: clamp(36px, 6vh, 64px); }
.hx-hero h1 { color: #fff; font-size: clamp(38px, 6.2vw, 78px); line-height: 1.03; letter-spacing: -0.025em; max-width: 15ch; }
.hx-hero .rotator { margin-top: .08em; }
.hx-hero .lead { color: #d6ddd9; font-size: clamp(17px, 1.5vw, 20px); max-width: 56ch; margin-top: 26px; }
.hx-hero .btns { align-items: center; gap: 14px 28px; margin-top: 30px; }
.hx-hero .btn-solid { background: #12844a; border-color: #12844a; }
.hx-hero .btn-solid:hover { background: #179956; border-color: #179956; }
.hx-hero a:focus-visible { outline-color: var(--brand); }
.hx-hero > .wrap { width: 100%; }
.hx-facts { position: relative; z-index: 1; list-style: none; margin: 0; padding: 22px 0 26px; display: flex; flex-wrap: wrap; gap: 10px 32px; border-top: 1px solid rgba(255, 255, 255, .2); font-family: var(--cond); font-weight: 700; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: #e3e9e5; }
.hx-facts li { display: flex; align-items: center; gap: 12px; }
.hx-facts a { color: inherit; text-decoration: none; transition: color .2s; }
.hx-facts a:hover { color: var(--brand); }
.hx-facts li::before { content: ""; width: 16px; height: 3px; background: var(--brand); flex: none; }

/* Text links with an arrow */
.hx-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding-bottom: 4px; font: 700 15px var(--head); color: var(--accent); text-decoration: none; border-bottom: 2px solid currentColor; }
.hx-link::after { content: "\2192"; transition: transform .2s; }
.hx-link:hover::after { transform: translateX(5px); }
.hx-hero .hx-link, .hx-band .hx-link { color: #fff; border-bottom-color: var(--brand); margin-top: 0; }
.hx-hero .hx-link:hover, .hx-band .hx-link:hover { color: var(--brand); }

/* Section heading */
.hx-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 76px); }
.hx-head p { font-size: 19px; color: var(--muted); margin: 18px 0 0; }

/* Photo and text rows */
.hx-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hx-feature + .hx-feature { margin-top: clamp(64px, 9vw, 120px); }
.hx-feature.flip .hx-media { order: 2; }
.hx-media { margin: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 2; background: var(--tint); }
.hx-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.6,.2,1); }
.hx-feature:hover .hx-media img { transform: scale(1.04); }
.hx-copy h3 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.12; margin-bottom: 10px; }
.hx-meta { font-family: var(--cond); font-weight: 700; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.hx-copy p { font-size: 18px; color: var(--muted); max-width: 52ch; }
.hx-copy .hx-meta { font-size: 16px; color: var(--accent); }

/* Dark band: the two apps */
.home .hx-band { background: var(--band); color: var(--band-ink); }
.hx-band h2, .hx-band h3 { color: #fff; }
.hx-band .kicker, .hx-band .hx-copy .hx-meta { color: var(--brand); }
.hx-band .hx-head p, .hx-band .hx-copy p { color: var(--band-muted); }
.hx-band .btn-solid { background: #12844a; border-color: #12844a; }
.hx-band .btn-solid:hover { background: #179956; border-color: #179956; }
.hx-band .btn-line { color: #fff; border-color: rgba(241, 244, 242, .55); }
.hx-band .btn-line:hover { background: #fff; border-color: #fff; color: var(--band); }
.hx-band ul.checks { margin-top: 22px; }
.hx-band ul.checks li, .hx-band ul.checks li:first-child { border: 0; padding: 7px 0 7px 30px; }
.hx-band ul.checks li::before { top: 15px; border-color: var(--brand); }
.hx-band ul.checks span { color: #dfe6e2; font-size: 17px; }
.hx-band a:focus-visible { outline-color: var(--brand); }
.hx-app { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hx-app + .hx-feature { margin-top: clamp(80px, 11vw, 150px); }
.hx-shots { display: flex; justify-content: center; align-items: flex-start; gap: clamp(10px, 1.6vw, 20px); padding: 34px 0; }
.hx-shots img { display: block; width: 31%; height: auto; border-radius: clamp(14px, 2vw, 24px); box-shadow: 0 0 0 1px #2c322f, 0 22px 44px rgba(0, 0, 0, .5); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.hx-shots img:nth-child(1), .hx-shots img:nth-child(3) { transform: translateY(26px); }
.hx-shots img:nth-child(2) { transform: translateY(-26px); }
.hx-feature:hover .hx-shots img:nth-child(1), .hx-feature:hover .hx-shots img:nth-child(3) { transform: translateY(16px); }
.hx-feature:hover .hx-shots img:nth-child(2) { transform: translateY(-34px); }

/* Three plain columns */
.hx-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
.hx-more > div::before { content: ""; display: block; width: 44px; height: 4px; background: var(--brand); margin-bottom: 22px; }
.hx-more h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 12px; }
.hx-more p { color: var(--muted); font-size: 17px; }

/* Closing band */
.home .hx-cta { background: #065a2c; color: #fff; padding: clamp(64px, 8vw, 104px) 0; }
.hx-cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hx-cta h2 { color: #fff; max-width: 16ch; }
.hx-cta p { color: #d3e6da; font-size: 19px; margin: 14px 0 0; }
.hx-cta .btn { background: #fff; border-color: #fff; color: #065a2c; padding: 18px 34px; font-size: 16px; }
.hx-cta .btn:hover { background: #e8f3ec; border-color: #e8f3ec; color: #065a2c; }
.hx-cta a:focus-visible { outline-color: #fff; }

/* Sections ease in as they scroll into view (only when scripts run) */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv.d1 { transition-delay: .12s; }
.js .rv.d2 { transition-delay: .24s; }

@media (max-width: 860px) {
  .home .hx-hero { min-height: 0; }
  .hx-facts { gap: 8px 28px; font-size: 14px; }
  .hx-feature, .hx-app { grid-template-columns: 1fr; }
  .hx-feature.flip .hx-media { order: 0; }
  .hx-app .hx-phone { justify-self: center; }
  .hx-more { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .hx-hero .rotator { white-space: normal; }
  .hx-copy p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-hero-bg img { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .hx-media img, .hx-shots img, .home .btn, .hx-link::after, .home .site-header .wrap, .home .brand img { transition: none; }
}
/* Shorter screens: keep the service links in view under the hero text */
@media (max-height: 800px) and (min-width: 861px) {
  .hx-hero h1 { font-size: clamp(38px, 4.6vw, 58px); }
  .hx-hero-in { padding-top: 44px; padding-bottom: 32px; }
  .hx-hero .lead { margin-top: 18px; }
  .hx-hero .btns { margin-top: 22px; }
}

/* Tools band: heading sits beside the phone, tighter spacing between the two apps */
.home .hx-band { padding: clamp(56px, 6vw, 88px) 0; }
.hx-app { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.hx-app .hx-head { margin-bottom: clamp(28px, 3.5vw, 44px); }
.hx-app .hx-copy p { max-width: 56ch; }
.hx-app .hx-phone { justify-self: center; }
.hx-app + .hx-feature { margin-top: clamp(40px, 5vw, 72px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.hx-band .hx-feature .hx-copy { order: -1; }
.hx-shots { padding: 26px 0; }
@media (min-width: 861px) { .hx-app .app-frame { zoom: .84; } }
@media (max-width: 860px) { .hx-app, .hx-app + .hx-feature { grid-template-columns: 1fr; } .hx-band .hx-feature .hx-copy { order: 0; } }

/* Hero text on the right on wider screens so the car stays clear */
@media (min-width: 861px) {
  .hx-hero-in > * { width: min(100%, 600px); max-width: none; margin-left: auto; margin-right: 0; }
  .hx-hero h1 { font-size: clamp(38px, 4.6vw, 64px); }
  .hx-hero .lead { max-width: none; }
  .hx-hero-bg::after { background: linear-gradient(90deg, rgba(8, 12, 10, .3) 0%, rgba(8, 12, 10, .5) 45%, rgba(8, 12, 10, .82) 100%); }
}
