/*
 * Mastro Media — homepage
 *
 * Direction, from Matteo's own brand documents and build feedback:
 *   premium, understated, timeless, cinematic, clean
 *   monochrome first: black, white, charcoal. No accent colour.
 *   clean sans-serif; restrained headlines over plain body copy
 *   minimal graphics, smooth purposeful motion, nothing gimmicky
 *   "premium through restraint, not decoration"
 */

:root {
  --black: #0a0a0a;
  --charcoal: #141414;
  --charcoal-2: #1c1c1c;
  --graphite: #3a3a3a;
  --grey: #8a8a8a;
  --grey-light: #b9b9b6;
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: rgba(10, 10, 10, 0.12);
  --white: #ffffff;
  --paper: #f3f3f1;      /* warm off-white for the light section */

  --font-head: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;

  --header-h: 76px;
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 11vw, 150px);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------ type */

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
}

/* Headings follow Matteo's reference (revision 1): a bold, tight, all-caps
   grotesk - Hanken Grotesk 800. Every main heading, the hero line included,
   shares one size (--h-main); sub-headings share a second (--h-sub). */
:root {
  --h-main: clamp(28px, 3vw, 40px);
  --h-sub: clamp(17px, 1.35vw, 19px);
}
.section-title,
.hero-title,
.video-title,
.why-item h3 {
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.06;
}
.section-title,
.hero-title { font-size: var(--h-main); }
.video-title,
.why-item h3 { font-size: var(--h-sub); line-height: 1.2; }

.section-title { margin: 0; }

p { margin: 0 0 1.1em; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  font: 600 15px/1 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { background: transparent; color: var(--white); }

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.45); }
.btn-ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.btn-small { padding: 11px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
/* Nav links sit over the hero footage while the header is transparent. The
   contrast fix lives in the hero (.hero-media::after) rather than as a
   background here: a scrim on a 76px box ended in a hard line across the
   video. The shadow is a second, invisible safety net. */
.site-header:not(.is-scrolled) .nav-links a:not(.btn) {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 10px rgba(0,0,0,0.55);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand img { height: 30px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--grey-light);
  transition: color 0.2s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--white); }

.nav-toggle { display: none; }

/* ------------------------------------------------------------ hero */

/* Desktop: a split, with the copy on the left and the footage standing tall on
   the right. The footage is vertical 9:16 because that is the format Mastro
   Media delivers, so it is shown in that shape rather than cropped flat. */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
}

.hero-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(44vw, calc(100vh * 0.5625));
  background: var(--charcoal);
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Eased over nearly half the panel so the footage melts into the black. At a
   shorter fade a bright sky left a visible seam. */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    var(--black) 0%, rgba(10,10,10,0.82) 14%, rgba(10,10,10,0.45) 30%, rgba(10,10,10,0) 48%);
  pointer-events: none;
}

/* Top scrim for the nav, tall and eased so it has no visible edge. */
.hero-media::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 240px;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(10,10,10,0.62) 0%, rgba(10,10,10,0.34) 38%, rgba(10,10,10,0.1) 72%, rgba(10,10,10,0) 100%);
  pointer-events: none;
}

.media-credit {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 14px;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero-inner { position: relative; z-index: 3; }

.hero-copy {
  max-width: 660px;
  padding: 80px 0 100px;
}

/* Matteo: the headline stays on one line. On desktop it is the shared heading
   size; on a narrow phone it scales with the screen so it still fits. */
.hero-title {
  margin: 0 0 26px;
  font-size: min(var(--h-main), 5.6vw);
  white-space: nowrap;
}

.hero-lede {
  max-width: 500px;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--grey-light);
  margin-bottom: 40px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------------------------------------ sections */

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
  /* The header is sticky, so without this every nav link lands with the
     section's heading hidden underneath it. */
  scroll-margin-top: var(--header-h);
}

.section-head { margin-bottom: 48px; }
.section-lede {
  max-width: 560px;
  margin: 18px 0 0;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--grey-light);
}

/* ------------------------------------------------------------ portfolio */

.portfolio { background: var(--black); }

/* Grouped by shoot (Matteo, revision 1: the mixed order read as scattered).
   Each .shoot holds one shoot's photos with a tight gap; shoots are separated
   by a wide gap, so the groups read at a glance.

   Rows are justified so every tile in a row is the same height and each photo
   keeps its own framing. A tile grows by its aspect ratio (--r). A shoot grows
   by the sum of its tiles' ratios (--s), with its inner gaps (--g of them) as
   the flex-basis - that keeps heights exactly equal across shoots with
   different numbers of photos. */
.portfolio { --gap-in: 8px; --gap-out: 44px; }

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap-out);
}
.gallery-row {
  display: flex;
  gap: var(--gap-out);
}
.shoot {
  display: flex;
  gap: var(--gap-in);
  flex: var(--s) 1 calc(var(--g) * var(--gap-in));
  min-width: 0;
}
.tile {
  position: relative;
  flex: var(--r, 0.6667) 1 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--charcoal);
  aspect-ratio: var(--r, 0.6667);
}
/* Flex-grow values that add up to less than 1 only share out part of the
   space, so a shoot of one (the video, 0.5625) must grow to fill it. */
.tile:only-child { flex-grow: 1; }
.tile img,
.tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.tile:hover img,
.tile:hover video { transform: scale(1.035); }

/* The video's own block: set apart from the photo grid by a rule and space.
   A short plain description sits beside it on desktop, and the video stays at
   its native 9:16 so nothing of the frame is lost. */
.portfolio-video {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(64px, 8vw, 110px);
  padding-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
.video-copy { max-width: 440px; justify-self: end; }
.video-title { margin: 0 0 14px; }
.video-copy p:last-child { margin: 0; color: var(--grey-light); }
.video-feature {
  position: relative;
  width: min(360px, 100%);
  margin: 0;
  overflow: hidden;
  background: var(--charcoal);
  aspect-ratio: 9 / 16;
}
.video-feature video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The video is someone talking, so the sound matters - it starts muted (as
   browsers require for autoplay) with a clear way to turn it on. */
.sound-toggle {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(10,10,10,0.6);
  color: var(--white);
  font: 500 12px/1 var(--font-body);
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sound-toggle:hover { background: rgba(10,10,10,0.8); }
.sound-toggle:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* ------------------------------------------------------------ how we work */

/* About us + how we work (layout B, chosen by Matteo): a centred intro with
   the title in a solid black box, then the four points as white cards on the
   light section, which keeps it distinct from the dark sections around it. */
.how {
  background: var(--paper);
  color: var(--black);
  border-top: 0;
}
.how .eyebrow { color: #6b6b68; }

.how-intro {
  max-width: 1000px;
  margin: 0 auto clamp(56px, 7vw, 90px);
  text-align: center;
}
.how-title {
  display: inline-block;
  margin-bottom: 24px;
  padding: 13px 26px 11px;
  background: var(--black);
  color: var(--white);
}
.how-lede {
  margin: 0;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: #2a2a28;
}

.how-label { margin: 0 0 24px; text-align: center; }

.why-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.why-item {
  padding: clamp(28px, 3vw, 44px);
  background: var(--white);
}
.why-num {
  display: block;
  margin-bottom: 28px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #8a8a86;
}
.why-item h3 { margin: 0 0 10px; }
.why-item p { margin: 0; color: #4a4a47; font-size: 16px; line-height: 1.6; }

/* ------------------------------------------------------------ review */

.review { background: var(--charcoal); }

.review-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}

.review-photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--charcoal-2);
}
/* The confirmed frame is landscape with Vojtech right of centre. It is framed
   here with object-position rather than being recropped as a file, so the
   original frame Matteo chose is what is served. */
.review-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 57% 30%;
}

.review-body { margin: 0; }
.review-source { display: flex; align-items: center; gap: 10px; }
.google-g { flex: none; }
.review-stars {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: #fbbc04;
}
/* Matteo, revision 1: the quote at the same size as the About Us card text,
   and the name set like a card title (the heading font, bold, in caps). */
.review-quote { margin: 0; }
.review-quote p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-light);
}
.review-quote p:last-child { margin-bottom: 0; }

.review-author { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; }
.review-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--h-sub);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--white);
}
.review-company { font-size: 14px; color: var(--grey); }

/* ------------------------------------------------------------ contact */

/* Centred layout from a reference Matteo supplied, in Mastro Media's own
   monochrome: heading, a tap-to-call button, then a two-column form on white
   fields with a full-width submit. */
.contact { background: var(--black); text-align: center; }
.contact-inner { max-width: 620px; margin: 0 auto; }

.contact-title { margin: 0 -140px 22px; }
.contact-title span { display: block; text-wrap: balance; }
.contact-lede {
  max-width: 560px;
  margin: 0 auto 34px;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--grey-light);
}

.contact-call {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 44px;
  padding: 16px 34px;
  border: 2px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  font: 700 17px/1 var(--font-head);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.contact-call:hover { background: var(--white); color: var(--black); }
.contact-call svg { width: 18px; height: 18px; fill: currentColor; }

.contact-form { text-align: left; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font: 700 15px/1.2 var(--font-head); color: var(--white); }
.field .req { margin-left: 3px; color: #e5484d; }

.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  font: 400 16px/1.4 var(--font-body);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field textarea:focus { outline: 2px solid var(--grey-light); outline-offset: 1px; }
.field.is-invalid input,
.field.is-invalid textarea { border-color: #e5484d; }

.contact-submit {
  width: 100%;
  margin-top: 4px;
  padding: 20px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font: 800 17px/1 var(--font-head);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}
.contact-submit:hover { opacity: 0.88; }

.form-status {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--graphite);
  font-size: 14px;
  color: var(--grey-light);
  text-align: center;
}
.form-status.is-sent { border-color: var(--grey-light); color: var(--white); }
.form-status.is-error { border-color: #e5484d; }
.contact-submit:disabled { opacity: 0.6; cursor: wait; }

/* ------------------------------------------------------------ footer */

.site-footer {
  padding: 56px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--black);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 40px;
}
.footer-logo { height: 24px; width: auto; opacity: 0.9; }
/* Phone and email carry icons so they read as links (tap to call, click to
   email); Instagram is its logo. */
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  color: var(--grey-light);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-link svg { flex: none; width: 16px; height: 16px; fill: currentColor; }
.footer-link:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-insta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  transition: transform 0.2s var(--ease);
}
.footer-insta svg { width: 20px; height: 20px; fill: currentColor; }
.footer-insta:hover { transform: scale(1.08); }
.footer-meta { margin: 0 0 0 auto; color: var(--grey); font-size: 13px; }

/* ------------------------------------------------------------ reveal */

/* Motion is slow and small: things settle into place, they don't fly in. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Never print or save a page with half its content faded out. */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-video { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tile img, .tile video { transition: none; }
  .tile:hover img, .tile:hover video { transform: none; }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 860px) {
  body { font-size: 16px; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .nav-toggle-bar {
    display: block;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s var(--ease);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-of-type { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 24px;
    background: rgba(10,10,10,0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav-links.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav-links li a:not(.btn) { display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 18px; width: 100%; }

  /* Phone: the vertical footage becomes the whole hero, the shape it was shot
     in. The sky sits at the top of the frame, so the copy is anchored low with
     a gradient behind it for legibility. */
  .hero {
    min-height: 100svh;
    align-items: flex-end;
  }
  .hero-media { width: 100%; left: 0; }
  .hero-media::before {
    background: linear-gradient(180deg,
      rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.05) 26%,
      rgba(10,10,10,0.55) 48%, rgba(10,10,10,0.96) 78%);
  }
  .hero .media-credit { top: 90px; bottom: auto; }
  .hero-copy { padding: 0 0 56px; }
  /* Over footage, the grey eyebrow landed on the sea at almost no contrast. */
  .hero .eyebrow { color: rgba(255,255,255,0.82); text-shadow: 0 1px 12px rgba(0,0,0,0.6); }
  .hero-lede { color: rgba(255,255,255,0.86); }

  .why-list { grid-template-columns: 1fr; }

  .review-grid { grid-template-columns: 1fr; }
  .contact-title { margin: 0 0 22px; }

  .review-photo { aspect-ratio: 1 / 1; max-width: 420px; }

  /* Phone: rows of shoots would be thumbnails, so each shoot stacks as its own
     two-column block. Portraits pair up at 2:3; landscapes run full width at
     their own shape; an odd one out (the third cafe photo) takes the
     full width at 4:5 so no block ends with a gap. */
  .portfolio { --gap-in: 6px; --gap-out: 28px; }
  .gallery-row { display: contents; }
  .shoot { display: grid; grid-template-columns: repeat(2, 1fr); }
  .tile { aspect-ratio: 2 / 3; }
  .tile-wide { grid-column: span 2; aspect-ratio: 3 / 2; }
  .tile:last-child:nth-child(odd):not(.tile-wide) { grid-column: span 2; aspect-ratio: 4 / 5; }
  .portfolio-video { grid-template-columns: 1fr; gap: 28px; }
  .video-copy { justify-self: start; }
  .video-feature { width: min(300px, 82%); margin: 0 auto; }

  .footer-meta { margin-left: 0; width: 100%; }
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }

  /* Stacked buttons of two different widths read as unfinished; full width
     reads as a deliberate stack and is a bigger tap target anyway. */
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
