/* EK Pixora Studio — Home page only (loaded after title-card.css and glass.css; DESIGN.md decisions 31 and 35).
   The opening photograph fills the whole first screen, under the floating navigation; the headline rises over
   it and a smoked-glass plate carries the tagline and the two actions. Then the studio in a sentence beside two
   drifting photographs, Selected work, the stories, the services on a glass sheet over a photograph, how it
   works and the invitation. Theme, type and the scroll motion shared by every page are in title-card.css. */

/* Tighter space between the sections of Home (decision 40: the studio found too much empty space between them on a
   laptop). The opening photograph still fills the first screen. */
.home { --section-pad: clamp(56px, 2rem + 4.5vw, 120px); }

/* ---------- Hero: the photograph alone fills the first screen, the navigation floats over it ---------- */
.home .site-header { margin-bottom: calc(-1 * (var(--header-h) + env(safe-area-inset-top, 0px))); }
.home .hero {
  height: 100svh;
  min-height: 560px;
  max-height: 1200px;
  background: var(--cine);
  color: var(--ivory);
}
.home .hero__frame { position: absolute; inset: 0; overflow: clip; }
.home .hero__media img { object-position: 42% 28%; }   /* a focus point set in the dashboard takes over */

/* Shade: a gentle darkening at the top edge (for the navigation) and under the words. Its strength follows the
   photograph: glass.js measures how bright it is where the words sit and sets --top-shade and --shade. */
.home .hero__shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.home .hero__shade::before, .home .hero__shade::after { content: ""; position: absolute; left: 0; right: 0; }
.home .hero__shade::before { content: none; }   /* no shade at the top: the navigation shows its glass there */
.home .hero__shade::after {
  bottom: 0;
  height: 100%;
  background: linear-gradient(0deg, rgb(9 8 7) 0%, rgb(9 8 7) var(--shade-hold, 26%), rgb(9 8 7 / 0.5) var(--shade-mid, 46%), rgb(9 8 7 / 0) var(--shade-end, 68%));
  opacity: var(--shade, 0.6);
  will-change: opacity;
}

.home .hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  padding: 0 max(var(--gutter), calc(env(safe-area-inset-left, 0px) + 18px)) calc(clamp(24px, 6vh, 72px) + env(safe-area-inset-bottom, 0px));
  max-width: 1440px;
  margin-inline: auto;
  background: none;
  color: var(--ivory);
}
.home .hero__content .label, .home .hero__label { color: var(--ivory); text-shadow: 0 1px 2px rgb(0 0 0 / 0.35); }
.home .hero__headline {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: calc(clamp(3.1rem, 1.1rem + 7vw, 7.25rem) * var(--hs, 1));
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--ivory);
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.25);
}
.home .hero__headline .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.home .hero__headline .accent-word { font-weight: 400; color: var(--color-saffron); }

.home .hero__plate {
  display: grid;
  gap: 18px;
  padding: 22px 24px 24px;
  justify-self: start;
  width: min(100%, 420px);
}
.home .hero__tagline { font-family: var(--font-display); font-style: italic; font-size: calc(clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem) * var(--hs, 1)); line-height: 1.3; color: var(--ivory); }
.home .hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.home .hero__actions .link-arrow { color: var(--ivory); }
@media (min-width: 900px) {
  .home .hero__content { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); align-items: end; column-gap: clamp(32px, 4vw, 64px); padding-bottom: clamp(40px, 8vh, 96px); }
  .home .hero__plate { justify-self: end; margin-bottom: 0.6rem; }
}
@media (max-width: 639px) {
  .home .hero { display: block; height: 100svh; min-height: 620px; max-height: 980px; }
  .home .hero__media { position: absolute; top: 0; height: 100%; }
  .home .hero__content { position: absolute; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); gap: 18px; }
  .home .hero { --shade-hold: 40%; --shade-mid: 56%; --shade-end: 78%; }
  .home .hero__plate { width: 100%; padding: 18px 18px 20px; }
  .home .hero__actions .btn { flex: 1 1 auto; }
}

/* ---------- Opening: the studio in one sentence beside two photographs that drift apart ---------- */
.home .opening { overflow-x: clip; }
.home .opening__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: clamp(40px, 6vw, 72px); align-items: center; }
.home .opening__text { grid-column: 1 / -1; display: grid; gap: var(--space-5); justify-items: start; }
.home .opening__label { color: var(--accent); }
.home .opening__lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: calc(clamp(1.6rem, 1.15rem + 1.35vw, 2.4rem) * var(--hs, 1));
  line-height: 1.18;
  letter-spacing: -0.005em;
  max-width: 26ch;
  text-wrap: balance;
}
.home .opening__more { color: var(--text-muted); max-width: 38ch; }
.home .opening__pics { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.home .opening__pics > figure { font-size: var(--t-body); }
.home .opening__pics .ph { aspect-ratio: 4 / 5; }
.home .opening__a { grid-column: 1 / 9; grid-row: 1; }
.home .opening__b { grid-column: 7 / 13; grid-row: 1; margin-top: 62%; position: relative; z-index: 1; }
@media (min-width: 900px) {
  .home .opening__text { grid-column: 1 / 7; }
  .home .opening__pics { grid-column: 7 / 13; }
  .home .opening__a { grid-column: 1 / 9; }
  .home .opening__b { grid-column: 8 / 13; margin-top: 46%; }
}

/* ---------- Selected work: a large photograph, a tall one beside it, a third below, a wide close ---------- */
.home .selected-work { overflow-x: clip; }
.home .work__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: clamp(48px, 6vw, 112px); align-items: start; }
.home .work__grid .ph { aspect-ratio: var(--ar); }
.home .work__back { grid-column: 1 / 13; }
.home .work__detail { grid-column: 4 / 13; }
.home .work__front { grid-column: 1 / 10; }
.home .work__wide { grid-column: 1 / 13; }
.home .work__wide .ph { aspect-ratio: 2.2 / 1; }
/* A row of three upright photographs before the wide strip (decision 40), the middle one a little lower. */
.home .work__more .ph { aspect-ratio: 4 / 5; }
.home .work__more--1 { grid-column: 1 / 7; }
.home .work__more--2 { grid-column: 7 / 13; margin-top: 18%; }
.home .work__more--3 { grid-column: 3 / 11; }
@media (min-width: 720px) {
  .home .work__back { grid-column: 1 / 9; }
  .home .work__detail { grid-column: 9 / 13; margin-top: 24%; }
  .home .work__front { grid-column: 3 / 8; margin-top: clamp(-160px, -8vw, -40px); }
  .home .work__wide { grid-column: 1 / 13; }
  .home .work__more--1 { grid-column: 1 / 5; grid-row: auto; }
  .home .work__more--2 { grid-column: 5 / 9; margin-top: 14%; }
  .home .work__more--3 { grid-column: 9 / 13; margin-top: 4%; }
}
@media (max-width: 719px) { .home .work__wide .ph { aspect-ratio: 4 / 3; } }
/* Photographs on this page fade in (decision 18): a plain fade, no wipe and no zoom. They still slide
   inside their frames and drift as you scroll (title-card.js). */
.js-motion .home .reveal-img.ph img { transform: none; }

/* ---------- Services: a glass sheet over a photograph from the services ---------- */
.home .services--glass { position: relative; overflow: clip; isolation: isolate; padding-block: clamp(96px, 12vw, 200px); }
.home .services__photo { position: absolute; inset: 0; z-index: -1; overflow: clip; background: var(--ph-bg, var(--cine)); }
.home .services__photo picture, .home .services__photo img { width: 100%; height: 100%; }
.home .services__photo img { object-fit: cover; }
/* The photograph behind the services joins the night page: it fades into the Ink at its top and foot and is
   dimmed a little throughout, so a bright studio backdrop never stands as a white band between the plates
   (decision 47). glass.js still fits the sheet from the photograph itself, so its words only gain contrast. */
.home .services__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--color-ink) 0%, color-mix(in srgb, var(--color-ink) 46%, transparent) 16%, color-mix(in srgb, var(--color-ink) 26%, transparent) 50%, color-mix(in srgb, var(--color-ink) 52%, transparent) 84%, var(--color-ink) 100%);
}
.home .services__sheet { padding: clamp(28px, 4vw, 56px) clamp(22px, 4vw, 56px) clamp(20px, 3vw, 40px); }
.home .services__sheet .section-head { margin-bottom: clamp(24px, 3vw, 48px); }
.home .services__sheet .label { color: var(--pale-gold); }
.home .services__sheet .work__title { color: var(--ivory); }
.home .services__sheet .link-arrow { color: var(--ivory); }
@media (min-width: 1024px) { .home .services__sheet { max-width: 1100px; } }
.home .credits { display: grid; gap: 0 clamp(32px, 5vw, 96px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .home .credits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home .credits > li { display: grid; gap: var(--space-2); align-content: start; padding-block: var(--space-5) var(--space-6); border-top: 1px solid var(--rule); }
.home .credits h3 { font-family: var(--font-display); font-weight: 400; font-size: calc(clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem) * var(--hs, 1)); line-height: 1.2; }
.home .credits p { max-width: 44ch; color: var(--text-muted); }
.home .services__sheet .credits p { color: rgb(246 242 234 / 0.82); }
.home .services__sheet .credits > li { border-top-color: rgb(246 242 234 / 0.18); }

/* ---------- Invitation ---------- */
.home .invite { justify-items: start; }
/* The invitation closes the page as one composed line: the words on the left, the ways to reach the studio on
   the right, resting on the same baseline (decision 47). */
@media (min-width: 900px) {
  .home .invite { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-8); align-items: end; }
  .home .invite > .invite__line { grid-row: 1 / span 2; }
  .home .invite > .invite__row { grid-column: 2; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .home .invite > .muted { grid-column: 2; max-width: 30ch; }
}
