*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #07080c; }
body {
  color: #fff;
  font-family: "Montserrat", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Full-screen photo on every device */
.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 22rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: #07080c;
  background-image: url("/.netlify/images?url=/img/hero.jpg&w=1920&fm=webp");
  background-size: cover;
  background-position: center;
}

/*
  Text lives only in the right half of the screen, as in the mockup.
  Sizes use container units (cqi = 1% of the half's width), so the block
  keeps the same condensed proportions at any screen size.
*/
.hero-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 0;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2% 16vh;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}
.hero-content p { margin: 0; }
h1 {
  margin: 0;
  font-weight: 700;
  font-size: 9.8cqi;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tagline {
  margin-top: 0.1em !important;
  font-weight: 300;
  font-size: 3.9cqi;
  letter-spacing: 0.03em;
}
.name {
  margin-top: 1.1em !important;
  font-weight: 500;
  font-size: 6.2cqi;
  line-height: 1.2;
  white-space: nowrap;
}
.roles {
  margin-top: 0.3em !important;
  font-weight: 400;
  font-size: 4.5cqi;
  line-height: 1.4;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
}
/* Service cards: one row of four, dark frosted glass with a teal-to-violet edge */
.services {
  list-style: none;
  width: 80%;
  margin: 4.5cqi auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.9cqi;
  text-shadow: none;
}
.service {
  position: relative;
  aspect-ratio: 285 / 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2cqi;
  padding: 1.6cqi 1cqi;
  border-radius: 1.3cqi;
  background: linear-gradient(160deg, rgba(22, 26, 38, 0.72), rgba(10, 12, 20, 0.6));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1.2cqi 3cqi -1cqi rgba(62, 230, 224, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(127, 243, 236, 0.75), rgba(199, 166, 255, 0.75));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.service svg {
  width: 45%;
  height: auto;
  fill: none;
  stroke: url(#glow);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 0.6cqi rgba(170, 200, 255, 0.7));
}
.service span {
  font-size: 2.1cqi;
  line-height: 1.3;
  color: #f2f4f8;
}

.reels {
  margin-top: 2.2cqi !important;
  font-weight: 300;
  font-size: 2.6cqi;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
}

/* Contact links pinned to the bottom of the right half, under the cards */
.contact {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(4vh, env(safe-area-inset-bottom));
  padding: 0 2%;
  font-style: normal;
  font-size: 4.1cqi;
  line-height: 1.55;
}
.contact a { color: inherit; text-decoration: none; }
.contact a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* Narrow right halves (phones): every line except the contact details stays on one line */
@container (max-width: 480px) {
  .tagline { font-size: 5.4cqi; }
  .name { font-size: 8cqi; }
  .roles { font-size: 5.8cqi; }
  .services { width: 84%; gap: 1.3cqi; }
  .service { aspect-ratio: auto; min-height: 25cqi; padding: 2.5cqi 0.8cqi; }
  .service span { font-size: max(0.42rem, 2.9cqi); }
  .reels { font-size: max(0.55rem, 3.6cqi); }
  .contact { font-size: max(0.72rem, 5.6cqi); }
  .contact p { overflow-wrap: anywhere; }
}

/*
  Wide right halves (desktop): phone and email share one line, separated by " / ",
  lifted clear of the "Powered by Netlify" badge in the lower-right corner.
  The phone and tablet blocks below switch back to stacked lines.
*/
@container (min-width: 481px) {
  .contact { bottom: max(4vh, 4.75rem); font-size: 2.8cqi; white-space: nowrap; }
  .contact p { display: inline; }
  .contact p + p::before { content: " / "; }
}

/* Phones: keep the camera in the left half and darken the right half for contrast */
@media (max-width: 800px) {
  .hero-bg {
    background-image:
      linear-gradient(to right, rgba(7, 8, 12, 0) 40%, rgba(7, 8, 12, 0.65) 75%),
      url("/.netlify/images?url=/img/hero.jpg&w=1000&fm=webp");
    background-position: center, 28% center;
  }
}

/*
  Phone layout (portrait): photo across the top with the camera centered, then the
  text stacked full-width below it. Cards become a 2×2 grid, and contact sits at the end.
  Placed after the right-half desktop rules so it overrides them. Applies to any
  screen 700px wide or narrower, so phone previews in a desktop browser match real phones.
*/
@media (max-width: 700px) {
  .hero {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }
  .hero-bg {
    bottom: auto;
    height: 64svh;
    background-image:
      linear-gradient(to bottom, rgba(7, 8, 12, 0) 38%, rgba(7, 8, 12, 0.6) 62%, rgba(7, 8, 12, 0.9) 85%, #07080c 100%),
      url("/.netlify/images?url=/img/hero.jpg&w=1000&fm=webp");
    background-size: cover;
    background-position: center, 12% center;
  }
  .hero-content {
    position: relative;
    inset: auto;
    flex: 1;
    justify-content: flex-start;
    padding: 40svh 1.25rem 0;
  }
  .tagline { font-size: 4.8cqi; }
  .name { margin-top: 1.4em !important; font-size: 7cqi; }
  .roles { margin-top: 0.4em !important; font-size: 5cqi; }
  .services {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 3cqi;
    margin-top: 9cqi;
  }
  .service {
    aspect-ratio: auto;
    min-height: 0;
    flex-direction: row;
    justify-content: flex-start;
    gap: 3cqi;
    padding: 3.5cqi 3cqi;
    border-radius: 3cqi;
    text-align: left;
  }
  .service svg { flex: none; width: 11cqi; }
  .service span { font-size: 3.6cqi; }
  .reels { margin-top: 6.5cqi !important; font-size: 3.6cqi; }
  .contact {
    position: static;
    margin-top: auto;
    padding: 10cqi 0 max(5.5rem, env(safe-area-inset-bottom));
    font-size: 5.4cqi;
    line-height: 1.7;
  }
  .contact { white-space: normal; }
  .contact p { display: block; }
  .contact p + p::before { content: none; }
}

/*
  Tablet layout (touch screens 701–1366px wide). The information is the priority: it
  spans the full width at large sizes, spread top to bottom, over a darkened photo.
  Title/tagline sit near the top, name/roles get their own band, the cards form a 2×2
  grid, and contact sits at the bottom. Content flows, so the page can scroll if needed.
  Desktops (hover-capable) and phones (≤700px) are unaffected.
*/
@media (min-width: 701px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) {
  .hero {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }
  .hero-bg {
    background-image:
      linear-gradient(to bottom, rgba(7, 8, 12, 0.35) 0%, rgba(7, 8, 12, 0.6) 40%, rgba(7, 8, 12, 0.85) 75%, #07080c 100%),
      url("/.netlify/images?url=/img/hero.jpg&w=1920&fm=webp");
    background-size: cover;
    background-position: center, 18% center;
  }
  .hero-content {
    position: relative;
    inset: auto;
    flex: 1;
    width: 100%;
    max-width: 62rem;
    margin: 0 auto;
    justify-content: flex-start;
    padding: 7svh 6% 0;
  }
  h1 { font-size: 10.2cqi; }
  .tagline { margin-top: 0.25em !important; font-size: 5.4cqi; }
  .name { margin-top: clamp(2.5rem, 9svh, 7rem) !important; font-size: 8.6cqi; }
  .roles { margin-top: 0.45em !important; font-size: 6.2cqi; }
  .services {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.2cqi;
    margin-top: clamp(2.5rem, 8svh, 6rem);
  }
  .service {
    aspect-ratio: auto;
    min-height: 0;
    flex-direction: row;
    justify-content: flex-start;
    gap: 3.5cqi;
    padding: 4.2cqi 4cqi;
    border-radius: 2.4cqi;
    text-align: left;
  }
  .service svg { flex: none; width: 12cqi; }
  .service span { font-size: 4.3cqi; line-height: 1.25; }
  .reels { margin-top: 4.5cqi !important; font-size: 3.9cqi; }
  .contact {
    position: static;
    margin-top: auto;
    padding: 6svh 0 max(6rem, env(safe-area-inset-bottom));
    font-size: 1.35rem;
  }
  .contact { white-space: normal; }
  .contact p { display: block; }
  .contact p + p::before { content: none; }
}

/* Landscape tablets are short, so trim the vertical spacing a little */
@media (min-width: 701px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .hero-content { max-width: 54rem; padding-top: 5svh; }
  .name { margin-top: 6svh !important; }
  .services { margin-top: 6svh; }
  .service { padding: 3cqi 3.5cqi; }
  .service svg { width: 10cqi; }
  .contact { padding-top: 4svh; }
}

/*
  Tablet-width service cards: 2×2 grid of the original upright cards at roughly double
  size, moved further below the name and roles. Only card rules change here.
*/
@media (min-width: 701px) and (max-width: 1100px) {
  .services {
    width: 80%;
    grid-template-columns: repeat(2, 1fr);
    gap: 3cqi;
    margin-top: 12cqi;
  }
  .service {
    aspect-ratio: 285 / 400;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    gap: 4.4cqi;
    padding: 3.5cqi 2cqi;
    border-radius: 2.6cqi;
    text-align: center;
  }
  .service svg { width: 45%; }
  .service span { font-size: 4.2cqi; line-height: 1.3; }
  .reels { margin-top: 4cqi !important; }
}

/* Landscape tablets are short: keep the 2×2 grid but use slightly squarer cards so everything fits */
@media (min-width: 701px) and (max-width: 1100px) and (orientation: landscape) {
  .hero-content { padding-bottom: 10vh; }
  .services { width: 62%; margin-top: 7cqi; }
  .service { aspect-ratio: 285 / 270; gap: 2.6cqi; }
  .service svg { width: 38%; }
  .service span { font-size: 3.4cqi; }
}
