@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #191919;
  --paper: #f4f3ef;
  --line: rgba(25,25,25,.22);
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --edge: clamp(18px, 2.25vw, 44px);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
html { background: #111; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font); font-weight: 300; -webkit-font-smoothing: antialiased; }
body.home-active { overflow: hidden; }
body.dialog-open { overflow: hidden; }
button, a { color: inherit; font: inherit; }
button { border: 0; padding: 0; background: none; cursor: pointer; }
img { display: block; width: 100%; }

.global-header { position: fixed; z-index: 30; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between; align-items: flex-start; padding: var(--edge); pointer-events: none; color: #fff; transition: color .45s ease; }
body:not(.home-active) .global-header { color: var(--ink); }
.identity, .language-toggle { pointer-events: auto; color: inherit; }
.identity { display: block; font-size: clamp(16px, 1.65vw, 27px); line-height: .88; letter-spacing: -.045em; font-weight: 400; text-align: left; }
.identity-full { display: flex; flex-direction: column; align-items: flex-start; }
.identity-short { display: none; font-family: var(--font); font-size: 2.44em; font-weight: 300; letter-spacing: -.09em; line-height: .8; }
body.home-active .identity-full { font-size: 1.2em; }
body[data-current-view="works"] .identity-full { display: none; }
body[data-current-view="works"] .identity-short { display: block; }
.language-toggle { display: flex; gap: 7px; font-size: 16.5px; letter-spacing: .08em; }
.language-toggle [data-lang-option] { opacity: .42; }
.language-toggle [data-lang-option].active { opacity: 1; }

.edge-nav { position: fixed; z-index: 25; inset: 0; pointer-events: none; color: #fff; transition: color .45s ease; }
body:not(.home-active) .edge-nav { color: var(--ink); }
.edge-link { position: absolute; top: 50%; width: 12vh; min-width: 86px; pointer-events: auto; color: inherit; font-size: clamp(18px, 1.7vw, 32px); line-height: 1; transition: opacity .35s ease; }
.edge-link:hover { opacity: .5; }
.edge-link--left { left: 0; transform: translate(-28%, -50%) rotate(-90deg); }
.edge-link--right { right: 0; transform: translate(28%, -50%) rotate(90deg); }

.view { min-height: 100svh; }
.home-view { position: fixed; inset: 0; z-index: 1; background: #333; visibility: visible; opacity: 1; transition: opacity .65s ease, visibility .65s; }
body:not(.home-active) .home-view { visibility: hidden; opacity: 0; }
.slideshow, .slides-track, .slide { width: 100%; height: 100%; }
.slideshow { overflow: hidden; touch-action: pan-y; }
.slides-track { position: relative; }
.slide { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #555; opacity: 0; pointer-events: none; transition: opacity 2s ease; will-change: opacity; }
.slide.is-active { z-index: 1; opacity: 1; pointer-events: auto; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(0,0,0,.1),transparent 30%,transparent 70%,rgba(0,0,0,.12)); pointer-events: none; }
.slide img { height: 100%; object-fit: cover; transform: scale(1.015); transition: transform 6s linear; }
.slide.is-active img { transform: scale(1.055); }
.slide-caption { position: fixed; z-index: 5; bottom: var(--edge); left: 50%; transform: translateX(-50%); color: #fff; font-size: clamp(20px, 1.7vw, 32px); line-height: 1; white-space: nowrap; transition: opacity .25s ease; text-shadow: 0 1px 18px rgba(0,0,0,.2); }
.slide-caption.is-changing { opacity: 0; }
.slide-counter { position: fixed; z-index: 5; bottom: var(--edge); left: var(--edge); display: flex; align-items: center; gap: 9px; color: #fff; font-size: 10px; letter-spacing: .06em; text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.counter-line { display: block; width: 34px; height: 1px; background: currentColor; opacity: .55; }
.play-pause { position: fixed; z-index: 5; right: var(--edge); bottom: var(--edge); width: 19px; height: 19px; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: #fff; }
.play-pause span, .play-pause span::after { position: absolute; top: 5px; width: 1px; height: 7px; background: currentColor; content: ""; }
.play-pause span { left: 7px; }.play-pause span::after { left: 4px; top: 0; }
.play-pause.is-paused span { top: 5px; left: 7px; width: 0; height: 0; background: transparent; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor; }
.play-pause.is-paused span::after { display: none; }

.panel-view { position: relative; z-index: 2; display: none; min-height: 100svh; padding: clamp(100px, 12vw, 190px) clamp(55px, 8.333vw, 160px); background: var(--paper); }
.panel-view.is-active { display: block; }
.panel-inner { max-width: 1500px; margin: 0 auto; }
.panel-number { display: none; }
.panel-view h1 { margin: 0 0 clamp(80px, 12vw, 190px); font-size: clamp(70px, 13vw, 220px); line-height: .78; letter-spacing: -.065em; font-weight: 300; }
.works-section { width: 46%; }
.works-section--progress { width: 100%; margin-top: clamp(100px, 14vw, 220px); }
.works-section-title { margin: 0 0 18px; font-size: clamp(14px, 1vw, 17px); line-height: 1.25; letter-spacing: .08em; font-weight: 400; text-transform: uppercase; }
.works-section-title--hero { margin: 0 0 clamp(80px, 12vw, 190px); font-size: clamp(70px, 13vw, 220px); line-height: .78; letter-spacing: -.065em; font-weight: 300; text-transform: none; }
.works-list { width: 100%; border-top: 1px solid var(--line); }
.works-section--progress .works-list { width: 46%; }
.works-list--progress:empty { min-height: 1px; }
.work-row { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 8px 16px; align-items: baseline; width: 100%; padding: clamp(22px, 2.5vw, 42px) 0; border-bottom: 1px solid var(--line); text-align: left; }
.work-row strong { font-size: clamp(28px, 3.1vw, 54px); line-height: .98; letter-spacing: -.045em; font-weight: 300; }
.work-row > span:last-of-type { grid-column: 2; font-size: clamp(14px, 1vw, 17px); line-height: 1.25; }
.work-index { font-size: clamp(17px, 1.2vw, 20px); line-height: 1; }
.work-row img { position: fixed; z-index: 5; top: 50%; right: clamp(55px, 8.333vw, 160px); width: min(39vw, 640px); aspect-ratio: 4 / 3; object-fit: cover; transform: translateY(-48%); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .28s ease, transform .45s cubic-bezier(.22,.61,.36,1), visibility .28s; }
.work-row:is(:hover,:focus-visible) img { transform: translateY(-50%); visibility: visible; opacity: 1; }
.work-row.is-touch-preview img { transform: translateY(-50%); visibility: visible; opacity: 1; }
.work-row[data-project="terreno"] img, .work-row[data-project="armadans"] img { width: auto; max-width: min(39vw, 640px); height: min(68vh, 720px); aspect-ratio: auto; object-fit: contain; }
.work-row[data-project="binicaubell"] img, .work-row[data-project="falco"] img { width: min(39vw, 640px); height: auto; max-height: min(68vh, 720px); aspect-ratio: auto; object-fit: contain; }

.studio-inner { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; }
.studio-inner > h1 { grid-column: 1 / -1; }
.studio-inner > .panel-number { grid-column: 1 / -1; }
.studio-intro { grid-column: 3 / 10; margin-bottom: clamp(80px, 12vw, 180px); }
.studio-intro p { margin: 0; font-size: clamp(36px, 5.2vw, 84px); line-height: 1.05; letter-spacing: -.04em; }
.studio-portrait { grid-column: 2 / 12; margin: 0 0 clamp(90px, 12vw, 180px); }
.studio-portrait img { aspect-ratio: 4 / 3; object-fit: cover; }
.studio-body { grid-column: 4 / 12; max-width: 980px; font-size: clamp(18px, 1.6vw, 25px); line-height: 1.55; }
.studio-body p { margin: 0 0 1.5em; }
.studio-process { grid-column: 2 / 12; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; margin-top: clamp(90px, 13vw, 200px); }
.studio-site { aspect-ratio: 4 / 3; margin: 0; overflow: hidden; }
.studio-site img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); }
.studio-site--antonia, .studio-site--joan { grid-column: auto; }
.studio-contact { grid-column: 3 / 11; display: grid; grid-template-columns: 1fr 2fr 2fr; gap: 40px; margin-top: clamp(100px, 15vw, 220px); padding-top: 25px; border-top: 1px solid var(--line); font-size: 14px; }
.studio-contact p { margin: 0; }
.studio-contact a { text-decoration: none; }
.studio-contact a:hover { opacity: .5; }
.contact-email { display: inline-block; margin-top: 18px; }
.instagram-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; transition: opacity .25s ease; }
.instagram-link svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.35; }
.instagram-link .instagram-dot { fill: currentColor; stroke: none; }
.label { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }

.project-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
.project-dialog::backdrop { background: rgba(0,0,0,.55); }
.dialog-header { position: sticky; z-index: 10; top: 0; display: flex; justify-content: space-between; padding: 20px var(--edge); background: rgba(244,243,239,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.dialog-identity, .dialog-close { font-size: clamp(12px, .8vw, 14px); letter-spacing: .055em; }
.project-intro { padding: clamp(80px, 12vw, 190px) clamp(28px, 8.333vw, 160px); }
.project-kicker { display: flex; justify-content: space-between; gap: 20px; margin-bottom: clamp(55px, 8vw, 120px); font-size: clamp(13px, .9vw, 16px); }
.project-intro h2 { margin: 0; font-size: clamp(72px, 14vw, 240px); line-height: .75; letter-spacing: -.07em; font-weight: 300; }
.project-subtitle { max-width: 900px; margin: clamp(45px, 6vw, 90px) 0 0 25%; font-size: clamp(32px, 5vw, 80px); line-height: 1; letter-spacing: -.04em; }
.project-sequence { padding: 0 clamp(20px, 4.166vw, 80px); }
.gallery-image { margin: 0 auto clamp(24px, 5vw, 90px); }
.gallery-image--wide { width: 100%; }.gallery-image--left { width: 66.666%; margin-left: 0; }.gallery-image--right { width: 58.333%; margin-right: 0; }
.gallery-image img { max-height: 95svh; object-fit: cover; }
.project-spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 3vw, 55px); align-items: center; margin: 0 0 clamp(70px, 9vw, 150px); }
.project-spread .gallery-image { width: 100%; margin: 0; }
.project-spread .gallery-image, .project-spread .project-text-block { grid-row: 1; }
.project-spread--image-left .gallery-image { grid-column: 1 / 9; }
.project-spread--image-left .project-text-block { grid-column: 10 / 13; }
.project-spread--image-right .gallery-image { grid-column: 5 / 13; }
.project-spread--image-right .project-text-block { grid-column: 1 / 4; }
.project-text-block p { margin: 0; font-size: clamp(17px, 1.5vw, 24px); line-height: 1.55; }
.project-credits { display: grid; grid-template-columns: 1fr 3fr; gap: 30px; margin-top: clamp(90px, 12vw, 180px); padding: 40px clamp(28px, 8.333vw, 160px) 100px; border-top: 1px solid var(--line); }
.project-credits h3 { margin: 0; font-size: clamp(12px, .8vw, 14px); text-transform: uppercase; letter-spacing: .09em; font-weight: 400; }
.credits-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 55px; font-size: clamp(16px, 1.05vw, 19px); }
.credits-list p { margin: 0; }.credits-list span { display: block; margin-bottom: 6px; color: #777; font-size: clamp(10px, .72vw, 12px); text-transform: uppercase; letter-spacing: .09em; }
.project-social { display: grid; grid-template-columns: 1fr 3fr; gap: 30px; align-items: start; padding: 0 clamp(28px, 8.333vw, 160px) clamp(70px, 8vw, 120px); }
.project-social p { margin: 3px 0 0; }
.project-contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; font-size: 14px; }
.project-contact-links > a { text-decoration: none; transition: opacity .25s ease; }
.project-contact-links > a:hover { opacity: .5; }
.project-social .instagram-link { width: fit-content; margin-top: 0; font-size: 14px; }

@media (max-width: 900px) {
  .works-section { width: 100%; }
  .works-list { width: 100%; }
  .works-section--progress .works-list { width: 100%; }
  .work-row { grid-template-columns: 28px minmax(0,1fr); }
  .work-row img { display: none; }
}

@media (max-width: 700px) {
  .identity { font-size: 17px; }
  .edge-link { font-size: 20px; }
  .slide-caption { bottom: 26px; }
  .slide-counter, .play-pause { bottom: 27px; }
  .panel-view { padding-left: 55px; padding-right: 55px; }
  .work-row { grid-template-columns: 28px minmax(0,1fr); }
  .studio-intro { grid-column: 1 / -1; }
  .studio-portrait { grid-column: 1 / -1; }
  .studio-body { grid-column: 1 / -1; }
  .studio-process { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .studio-site--antonia, .studio-site--joan { grid-column: auto; }
  .studio-site--joan { width: auto; margin: 0; }
  .studio-contact { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .project-subtitle { margin-left: 0; }
  .gallery-image--wide, .gallery-image--left, .gallery-image--right { width: 100%; }
  .project-spread { display: flex; flex-direction: column; align-items: stretch; gap: 38px; margin-bottom: 85px; }
  .project-spread .gallery-image, .project-spread .project-text-block { width: 100%; }
  .project-credits { grid-template-columns: 1fr; }
  .project-social { grid-template-columns: 1fr; gap: 18px; }
  .credits-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .slide img { transform: none !important; }
}
