/* ============================================================
   DONARD DIGITAL — HERO (concept)
   Headline left; right side shows real work in real devices: the
   Fisher & Fisher website (screen recording) on a MacBook and the
   Planning Permission Experts story ad on an iPhone.
   ============================================================ */

.hero-concept {
  min-height: 100vh;
  padding: calc(var(--nav-height) + 70px) 0 110px;
  background:
    radial-gradient(ellipse 70% 60% at 75% 35%, rgba(46, 101, 184, 0.35) 0%, rgba(46, 101, 184, 0) 70%),
    linear-gradient(180deg, var(--dark) 0%, var(--navy) 100%);
  color: var(--white);
}

.hv { position: relative; z-index: 1; }

.hv h1 {
  font-size: var(--h1-size, clamp(2.6rem, 5.6vw, 4.8rem));   /* js/hero.js may step this down to keep the devices aligned */
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.hv h1 span { display: block; color: var(--light-blue); }   /* second sentence always starts its own line */

.hv-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-blue);
  margin-bottom: 1.25rem;
}

.hv-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 34rem;
  margin-bottom: 2rem;
}

.hv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Round secondary button (from the RANE inspo) */
.hv-round {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1.5px solid var(--light-blue);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  transition: background var(--transition), border-color var(--transition);
}
.hv-round:hover,
.hv-round:focus-visible { background: var(--blue); border-color: var(--blue); }

/* --- Layout --- */
.hv-proof {
  width: min(1320px, 94vw);      /* a little wider than the site container: gives the headline room */
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: start;
}

/* Devices group: laptop + phone, sized from one height, --dev-h, which
   js/hero.js sets so the group runs from the top of the headline to the
   bottom of the "Get a Free Audit" button (on phones: fits the width).
   Laptop frame 1902x1074: 1.7709 wide per 1 high; its display (lid) is the
   top 93.67%, starting 9.25% in from the left (0.1638 of the height).
   Phone frame 984x1960: the full laptop height, so 0.5021 wide. Its
   top-left corner sits where the lid's left edge would meet it (0.1638
   in) and it reaches 0.0318 further over the lid: overlap 0.1956.
   Group width: 0.5021 + 1.7709 - 0.1956 = 2.0774 x height. */
.hv-devices {
  --dev-h: 300px;
  position: relative;
  display: flex;
  align-items: flex-start;
  width: calc(var(--dev-h) * 2.0774);
  height: var(--dev-h);
  margin-top: var(--dev-top, 0);
}

/* --- Devices: real content sits behind a device photo whose screen is cut
   out. Screen positions are percentages of each frame image. --- */
.device { position: relative; margin: 0; }
.device-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.device-screen {
  position: absolute;
  overflow: hidden;
  background: var(--white);
}

.device-video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--dark); }

.device-mac {
  order: 2;
  flex: none;
  width: calc(var(--dev-h) * 1.7709);
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.45));
}
.device-mac .device-screen { left: 11.36%; top: 4%; width: 77.29%; height: 85.66%; }
.device-mac .device-video { object-position: top; }

.device-phone {
  order: 1;
  flex: none;
  z-index: 2;
  width: calc(var(--dev-h) * 0.5021);
  margin-right: calc(var(--dev-h) * -0.1956);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5));
}
.device-phone .device-screen {
  left: 6.1%;
  top: 2.45%;
  width: 87.8%;
  height: 95.1%;
  background: var(--dark);
  container-type: inline-size;   /* story UI sizes itself to the phone (cqw units) */
}

/* --- Story ad on an Instagram story template (920x2000 image: status bar,
   "Send message" bar). Positions below are measured from that template:
   1cqw = 9.2px of it. --- */
.story {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0c1015 url('../images/hero/ig-story-template.webp') top / 100% 100% no-repeat;
}
.story-video {
  position: absolute;
  top: 15.43cqw;                /* template's story area: rows 142–1777 */
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 2cqw;
}
.story-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;          /* taps go through to the video / play button */
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;  /* matches Instagram, not our brand font */
}
.story-ui::before {            /* shade behind the header so it reads on any video */
  content: '';
  position: absolute;
  top: 15.43cqw;
  left: 0;
  right: 0;
  height: 26cqw;
  border-radius: 2cqw 2cqw 0 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0));
}
.story-progress {
  position: absolute;
  top: 17.2cqw;
  left: 2cqw;
  right: 2cqw;
  height: 0.5cqw;
  border-radius: 1cqw;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.story-progress span {
  display: block;
  height: 100%;
  width: calc(var(--story-progress, 0) * 100%);
  background: var(--white);
}
.story-head {
  position: absolute;
  top: 19.9cqw;
  left: 3cqw;
  right: 2.5cqw;
  display: flex;
  align-items: center;
  gap: 3cqw;
}
.story-avatar { width: 7.8cqw; height: 7.8cqw; border-radius: 50%; flex: none; }
.story-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.story-name strong { font-size: 3cqw; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-name span { font-size: 2.7cqw; opacity: 0.9; }
.story-icons { display: flex; align-items: center; gap: 4.5cqw; margin-left: auto; }
.story-icons svg { width: 4.8cqw; height: 4.8cqw; }
.story-video { cursor: pointer; }

/* Play button: the ad plays with sound, so it waits for a tap
   (browsers block autoplay with sound) */
.story-play {
  position: absolute;
  top: 104cqw;                  /* centre of the video */
  left: 50%;
  z-index: 3;
  width: 18cqw;
  height: 18cqw;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0.5cqw solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(13, 31, 66, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--white);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s ease;
}
.story-play svg { width: 8cqw; height: 8cqw; margin-left: 1cqw; }
.story-play:hover,
.story-play:focus-visible { background: var(--blue); transform: translate(-50%, -50%) scale(1.06); }
.story.is-playing .story-play { opacity: 0; pointer-events: none; }

.story-cta {                   /* the real "Learn more" button, near the foot of the video */
  position: absolute;
  left: 50%;
  bottom: 31cqw;
  width: 48cqw;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 0.6cqw 2cqw rgba(0, 0, 0, 0.3));
}

/* Video credit under the phone (sits below it so the bottoms stay aligned) */
.device-credit {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0.2rem;
  white-space: nowrap;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}
.device-credit a {
  color: var(--light-blue);
  font-weight: 600;
  border-bottom: 1px solid rgba(123, 159, 212, 0.4);
  transition: color var(--transition), border-color var(--transition);
}
.device-credit a:hover,
.device-credit a:focus-visible { color: var(--white); border-color: var(--white); }

/* Gentle entrance when the hero comes into view */
.hv-devices .device { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.hv-devices .device-phone { transition-delay: 0.25s; }
.hv-devices.is-in .device { opacity: 1; transform: none; }

/* --- Smaller screens --- */
@media (max-width: 1200px) {
  /* Stacked: headline and copy → devices + credit → buttons */
  .hv-proof { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
  .hv-copy { display: contents; }
  .hv-devices { order: 1; margin-top: 0.5rem; margin-bottom: 3.5rem; }
  .hv-actions { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .hv-devices .device { opacity: 1; transform: none; transition: none; }
}
