:root {
  --folio-gap: clamp(1rem, 2vw, 2rem);
  --folio-section: clamp(3rem, 5vw, 5rem);
}

body > header,
#view-inicio > :is(.section, .work-together, .about),
body:has(#view-inicio:not([hidden])) :is(#contacto, footer) {
  padding-inline: var(--folio-edge);
}
#view-inicio > :is(.home-follow, .home-photos, .work-together, .about),
body:has(#view-inicio:not([hidden])) #contacto {
  padding-block: var(--folio-section);
}

#view-inicio .cinematic-hero {
  margin-inline: var(--folio-edge);
  min-height: clamp(31rem, 48vw, 45rem);
}
.cinematic-hero .hero-copy {
  padding: clamp(1.25rem, 4vw, 4rem);
}
.cinematic-hero .intro {
  display: block;
  margin: 0;
}
.cinematic-hero .intro h1 {
  display: block;
  margin: 0 0 clamp(.75rem, 1.6vw, 1.4rem);
  font-size: clamp(3.25rem, 7.25vw, 7.65rem);
  line-height: .98;
}
.cinematic-hero .intro h1 > span { display: block; }
.cinematic-hero .hero-introduction {
  display: grid;
  width: min(100%, clamp(15rem, 20vw, 17.5rem));
  container-type: inline-size;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  row-gap: .625rem;
}
.cinematic-hero .hero-introduction > .hero-services-button { margin: 0; }
.cinematic-hero .intro .service-line {
  text-wrap: balance;
  margin: 0;
  max-width: 38ch;
  color: white;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  line-height: 1.35;
}
.cinematic-hero .intro p.hero-base {
  margin: 0;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--paper);
}
.cinematic-hero .hero-shade {
  background: linear-gradient(90deg, rgba(18,14,30,.65), rgba(18,14,30,.15) 62%, transparent), linear-gradient(0deg, rgba(18,14,30,.78), transparent 70%);
}
.cinematic-hero .hero-motion { right: clamp(.85rem, 2vw, 2rem); }
.hero-services-button,
.work-together-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: .9rem;
  padding: .65rem 1.35rem;
  border-radius: 2rem;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.015em;
}
.hero-services-button { background: var(--lime); color: var(--ink); }
.hero-services-button:hover { background: #ffc095; }
.hero-services-button:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.work-together-button { background: var(--ink); color: var(--paper); }
.work-together-button:hover { background: #503a80; }
.work-together-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

#destacados, .work-together { scroll-margin-top: 1rem; }
#view-inicio :is(.home-follow .projects, .home-photos .album-grid) { column-gap: var(--folio-gap); }
#view-inicio :is(.home-follow, .home-photos) .section-title {
  display: block;
  margin: 0 0 clamp(1.25rem, 2.5vw, 2rem);
}
#view-inicio .eyebrow,
body:has(#view-inicio:not([hidden])) #contacto > .eyebrow {
  display: block;
  font-size: .75rem;
  line-height: 1.3;
  letter-spacing: .12em;
}
#view-inicio .section-title h2 {
  font-size: clamp(2.1rem, 3.3vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.07;
  margin: .6rem 0 0;
}

.work-together { background: var(--lime); color: var(--ink); }
.work-together-inner,
#sobre-mi,
body:has(#view-inicio:not([hidden])) #contacto {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--folio-gap);
  row-gap: .6rem;
  align-items: start;
}
.work-together-inner > .eyebrow,
#sobre-mi > .eyebrow { grid-column: 1 / -1; }
.work-together .section-title { display: block; margin: 0; }
#view-inicio .work-together-title h2 { margin: 0; max-width: 16ch; }
.work-together h2 em {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -.055em;
}
.work-together-offer {
  display: grid;
  width: min(100%, 24rem);
  gap: 1rem;
}
.work-together-offer p {
  margin: 0;
  font-size: clamp(1.125rem, 1.55vw, 1.5rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.work-together-offer .work-together-button {
  width: 100%;
  margin: 0;
  text-align: center;
}

#sobre-mi { row-gap: 1.6rem; }
#sobre-mi .about-portrait {
  width: min(100%, 32rem);
  max-width: none;
  margin: 0;
  padding: clamp(.75rem, 1.4vw, 1.25rem);
  justify-self: start;
}
#sobre-mi .about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  object-fit: cover;
}
#sobre-mi .about-copy { max-width: 39rem; }
#sobre-mi .about-copy h2 { margin-top: 0; }
#sobre-mi .about-details { max-width: 35rem; }
body:has(#view-inicio:not([hidden])) #contacto { row-gap: 1rem; }

@media (min-width: 701px) {
  .cinematic-hero .intro {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
    align-items: last baseline;
    gap: var(--folio-gap);
  }
  .cinematic-hero .hero-copy { width: 100%; max-width: none; box-sizing: border-box; }
  .cinematic-hero .hero-introduction {
    grid-area: 1 / 2;
    justify-self: end;
  }
  .cinematic-hero .intro h1 { display: grid; align-content: space-between; grid-area: 1 / 1; justify-self: start; text-align: left; margin: 0; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  header > .portfolio-nav { flex-wrap: wrap; gap: .5rem 1rem; }
}

@media (max-width: 700px) {
  /* Keep text and controls outside the mobile film's upper safe area. */
  body:has(#view-inicio:not([hidden])) > header {
    position: relative;
    inset: auto;
    padding: .9rem var(--folio-edge) .65rem;
    background: var(--paper);
    color: var(--ink);
  }
  body:has(#view-inicio:not([hidden])) > header :is(.brand, nav > a) {
    color: var(--ink);
    text-shadow: none;
  }
  header > .portfolio-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: clamp(.65rem, 2.5vw, 1.05rem);
    row-gap: 0;
    margin-top: .35rem;
  }
  header > .portfolio-nav > a { min-height: 38px; }
  body:has(#view-inicio:not([hidden])) > header .language-switch { top: .8rem; right: var(--folio-gutter); }
  body:has(#view-inicio:not([hidden])) > header .language-switch a { color: var(--ink); background: transparent; border-color: #24204466; }
  body:has(#view-inicio:not([hidden])) > header .language-switch a[aria-current] { color: var(--paper); background: var(--ink); }
  #view-inicio .cinematic-hero { min-height: 0; }
  .cinematic-hero .hero-copy { position: absolute; inset: auto 0 0; padding: 1.15rem; }
  .cinematic-hero .intro h1 { font-size: clamp(2.75rem, 10.2vw, 4.25rem); }
  .cinematic-hero .hero-motion { top: .75rem; right: .75rem; }
  .cinematic-hero .hero-shade { background: linear-gradient(180deg, transparent 30%, rgba(21,17,40,.5) 58%, rgba(21,17,40,.94)); }
  .cinematic-hero .intro .service-line { max-width: 30ch; }
  .work-together-inner, #sobre-mi, body:has(#view-inicio:not([hidden])) #contacto { grid-template-columns: minmax(0, 1fr); }
  .work-together-offer { margin-top: .65rem; }
  #sobre-mi { row-gap: 1.5rem; }
  #sobre-mi .about-portrait { width: min(100%, 28rem); }
}
@media (max-width: 700px) and (orientation: landscape) {
  .cinematic-hero .hero-film { aspect-ratio: 16/10; min-height: 22rem; }
  .cinematic-hero .hero-film video { object-fit: cover; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* The service lines, button and location share the same two edges. */
.cinematic-hero .hero-introduction .service-line {
  max-width: none;
  font-size: max(1rem, 8.1cqi);
  line-height: 1.2;
  text-wrap: wrap;
}
.cinematic-hero .hero-introduction .service-line > span {
  display: block;
  text-align: justify;
  text-align-last: justify;
}
.cinematic-hero .hero-introduction .hero-services-button {
  width: 100%;
  text-align: center;
}
.cinematic-hero .intro .hero-introduction .hero-base {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .15em;
  font-size: max(.8125rem, 5.4cqi);
  line-height: 1.4;
}
