@font-face {
  font-family: Geist;
  src: url("./assets/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("./assets/instrument-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0b0908;
  --paper: #f7f2eb;
  --orange: #F16720;
  --light-orange: #FA8648;
  --line: #332b26;
  --edge: clamp(14px, 4vw, 60px);
  --serif: "Instrument Serif", Georgia, serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  font-family: Geist, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden], .symbols { display: none !important; }
h1, h2, ul { margin: 0; }
:focus-visible { outline: 2px solid var(--light-orange); outline-offset: 5px; }
a svg, button svg {
  display: block; width: 20px; height: 20px; fill: none;
  stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.shell { width: min(calc(100% - var(--edge) * 2), 1240px); margin-inline: auto; }
.skip {
  position: fixed; z-index: 5; top: 12px; left: 12px; padding: 14px;
  background: var(--paper); color: var(--ink); transform: translateY(-160%);
}
.skip:focus { transform: none; }

.top {
  position: absolute; z-index: 2; inset: 0 0 auto;
  min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; min-height: 44px; align-items: center; width: fit-content; }
.brand img { height: auto; }
.top-cta {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px;
  padding: 0 14px; border: 1px solid var(--line); border-radius: 100px;
  background: #0b0908bd;
  font-size: .78rem; font-weight: 650; transition: border-color .22s, color .22s;
}
.top-cta svg { width: 15px; height: 15px; color: var(--light-orange); }
.top-cta:hover { border-color: var(--orange); color: var(--light-orange); }

.hero {
  position: relative; display: grid; place-items: center; isolation: isolate; overflow: clip;
  min-height: 100vh;
  min-height: 100dvh;
  background: #23140d;
}
.hero-media, .hero-media::after, .hero-media video, .hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media {
  z-index: -2; background: #24130e url("./assets/zyon-abertura.jpg") 52% 34% / cover no-repeat;
  transform: scale(1.02);
}
.hero-media video {
  object-fit: cover; object-position: 52% 34%; filter: saturate(.78) contrast(1.08);
}
.hero-media::after {
  content: "";
  background:
    radial-gradient(ellipse at 50% 51%, #160d09bd 0%, #160d0977 53%, transparent 89%),
    linear-gradient(0deg, #110906ed 0%, #11090645 36%, #1d100739 68%, #110906d9);
}
.hero-grid { z-index: -1; pointer-events: none; }
.hero-grid::after {
  content: ""; position: absolute; inset: 81px 15px 15px; opacity: .4;
  background:
    linear-gradient(var(--paper) 0 0) left top / 18px 1px,
    linear-gradient(var(--paper) 0 0) left top / 1px 18px,
    linear-gradient(var(--paper) 0 0) right bottom / 18px 1px,
    linear-gradient(var(--paper) 0 0) right bottom / 1px 18px;
  background-repeat: no-repeat;
}
.hero-content { width: 100%; padding: 76px 12px; text-align: center; }
h1, h2 { font-weight: 670; letter-spacing: -.085em; }
h1 { font-size: clamp(2.35rem, 14.6vw, 7.8rem); line-height: .9; }
.title-line { display: block; white-space: nowrap; }
.title-accent, h2 em { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; }
.title-accent { color: var(--orange); font-size: 1.31em; line-height: .86; margin-top: .015em; }
.letter { display: inline-block; }
.hero-action { margin-top: clamp(25px, 5vw, 38px); }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 15px;
  min-height: 56px; padding: 6px 6px 6px 19px; border-radius: 100px;
  background: var(--orange); color: var(--ink); font-size: .92rem; font-weight: 760;
  box-shadow: inset 0 1px #ffe4c58c, 0 8px 36px #f1672038;
  transition: background .22s, box-shadow .25s, transform .25s var(--ease-out);
}
.cta-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 50%; color: var(--paper); background: var(--ink);
}
.cta-icon svg { width: 19px; height: 19px; transition: transform .35s var(--ease-out); }
.cta:hover { transform: translateY(-3px); background: var(--light-orange); box-shadow: inset 0 1px #ffe4c5, 0 8px 36px #f1672065; }
.cta:hover svg { transform: rotate(-10deg) scale(1.11); }
.cta:active { transform: translateY(1px); }

.connections { scroll-margin-top: 18px; padding: clamp(64px, 11vw, 127px) 0 clamp(54px, 9vw, 100px); }
.section-header, .work-header { text-align: center; }
h2 { font-size: clamp(2.65rem, 10vw, 6.1rem); line-height: .98; }
h2 em { color: var(--orange); font-size: 1.12em; }
#links-title em { margin-inline-start: .12em; }
.links-grid {
  width: min(100%, 1050px); margin: clamp(23px, 4vw, 42px) auto 0;
  display: grid; gap: 12px;
}
.tile {
  position: relative; isolation: isolate; display: flex; align-items: center;
  overflow: hidden; min-height: clamp(158px, 38vw, 246px); padding: clamp(18px, 4vw, 34px);
  border: 1px solid #62402d; border-radius: 14px; background: #20130e;
  transition: border-color .25s, box-shadow .25s;
}
.tile-cover, .tile::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-cover { z-index: -2; object-fit: cover; object-position: 58% 50%; transition: transform .55s var(--ease-out); }
.tile::after {
  z-index: -1; content: "";
  background: linear-gradient(90deg, #100b09f7 0%, #100b09ed 29%, #100b0999 58%, #100b0918 100%);
}
.tile-content { display: grid; justify-items: start; gap: 8px; max-width: 72%; }
.tile-label, .case-tag {
  color: var(--light-orange); font: 550 .69rem/1.25 monospace;
  letter-spacing: .07em; text-transform: uppercase;
}
.tile-label { display: inline-flex; align-items: center; gap: 6px; }
.tile-label svg { width: 14px; height: 14px; }
.tile-title {
  font-size: clamp(1.55rem, 5.4vw, 3rem); font-weight: 660;
  letter-spacing: -.065em; line-height: 1; text-wrap: balance;
}
.tile-action {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
  min-height: 32px; padding: 6px 10px; border-radius: 100px;
  background: #1b100dec; color: var(--paper); border: 1px solid #a16b4d;
  font-size: .75rem; font-weight: 650;
}
.tile-action svg { width: 12px; height: 12px; }
.tile-contact .tile-action { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.tile:hover, .tile:focus-visible { border-color: var(--light-orange); box-shadow: 0 0 26px #f167202b; }
.tile:hover .tile-cover { transform: scale(1.055); }

.work { padding: clamp(44px, 8vw, 86px) 0 clamp(48px, 7vw, 76px); border-top: 1px solid var(--line); }
.work-header { margin-bottom: clamp(18px, 3vw, 30px); }
.section-intro { margin: 12px auto 0; max-width: 38ch; color: #c8b9ad; font-size: 1rem; line-height: 1.5; }
.work-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 10px; }
.track-controls { display: flex; gap: 6px; }
.track-controls button, .back, .film-close {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--ink); transition: background .22s, color .22s, border-color .22s;
}
.track-controls button:hover, .back:hover, .film-close:hover {
  background: var(--paper); color: var(--ink); border-color: var(--paper);
}
.work-track, .feedback-grid { display: grid; gap: 12px; padding: 0; list-style: none; }
.work-track {
  position: relative;
  grid-auto-flow: column; grid-auto-columns: 86%;
  overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory;
  padding: 6px 5px; margin-inline: -5px; scroll-padding-inline: 5px;
  scrollbar-width: none;
}
.work-track::-webkit-scrollbar { display: none; }
.work-track li { min-width: 0; scroll-snap-align: start; }
.track-dots { display: flex; justify-content: center; margin: 10px auto 0; }
.track-dots button {
  display: grid; place-items: center; width: 36px; height: 40px; padding: 0;
  border: 0; border-radius: 100px; background: transparent; color: #8d7668;
}
.track-dots button::before {
  content: ""; width: 8px; height: 8px; border-radius: 100px; background: currentColor;
  transition: width .22s, color .22s;
}
.track-dots button[aria-current="true"] { color: var(--orange); }
.track-dots button[aria-current="true"]::before { width: 20px; }
.case {
  display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line); border-radius: 14px; background: #171310;
}
.case-media {
  position: relative; display: block; overflow: hidden; border-radius: 13px 13px 0 0;
  aspect-ratio: 1.52; background: #261911;
}
.case-media img, .case-preview { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease-out); }
.case-preview { display: block; pointer-events: none; }
.work-track .case { position: relative; }
.work-track .case-media { aspect-ratio: 9 / 16; border-radius: 13px; }
.work-track .case-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, #090706 0%, #090706e8 16%, #090706a6 29%, #09070636 46%, transparent 65%);
}
.work-track .case-media:focus-visible { outline-offset: -4px; }
.case-arrow {
  position: absolute; z-index: 1; display: grid; place-items: center;
  width: 52px; height: 52px; top: 50%; left: 50%; translate: -50% -50%;
  background: var(--orange); color: var(--ink); border-radius: 50%;
  box-shadow: 0 5px 18px #0008; transition: background .2s, transform .25s;
}
.case-arrow svg { width: 22px; height: 22px; }
.case-media:hover :is(img, video) { transform: scale(1.045); }
.case-media:hover .case-arrow { background: var(--light-orange); transform: scale(1.08); }
.case-copy { padding: 17px 16px 19px; }
.work-track .case-copy {
  position: absolute; z-index: 2; inset: auto 0 0; pointer-events: none;
  padding: clamp(14px, 2vw, 23px);
}
.work-track .case-description { color: #eee2d9; }
.case-tag, .case-description, .case h3 { margin: 0; }
.case h3 {
  margin-top: 7px; font-size: clamp(1.2rem, 3.4vw, 1.65rem);
  font-weight: 650; letter-spacing: -.05em; line-height: 1.08;
}
.case-description { margin-top: 8px; color: #cfc2b7; font-size: .88rem; line-height: 1.5; }
.feedback-grid { grid-template-columns: minmax(0, 1fr); }
.feedback-grid .case-media { aspect-ratio: 1.7; }
.feedback-grid .case-media img { object-position: center 30%; }
.all-cases { display: flex; width: fit-content; margin: clamp(20px, 4vw, 34px) auto 0; }
.film-dialog {
  width: min(calc(100% - 24px), 860px); max-height: calc(100% - 24px);
  border: 1px solid #654734; border-radius: 14px; padding: 0;
  background: #100d0b; color: var(--paper); overscroll-behavior: contain;
}
.film-dialog::backdrop { background: #080604e8; }
.film-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; }
.film-header h2 { font-size: clamp(1.2rem, 4.3vw, 1.8rem); letter-spacing: -.045em; }
.film-header form { margin: 0; }
.film-player {
  display: block; width: 100%; height: min(64vh, 530px); height: min(64dvh, 530px);
  object-fit: contain; background: #050403;
}
.footer {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 77px; border-top: 1px solid var(--line);
}
.back svg { width: 15px; height: 15px; }
.scroll-progress { display: none; }

@media (min-width: 540px) {
  .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: clamp(160px, 25vw, 246px); }
  .work-track { grid-auto-columns: calc((100% - 12px) / 2); }
}
@media (min-width: 760px) {
  .top { min-height: 79px; }
  .top .brand img { width: 123px; }
  .hero-grid::after { inset: 92px 21px 21px; }
  h1 { font-size: clamp(5rem, 10.7vw, 9.3rem); }
  .title-accent { font-size: 1.24em; }
  .work-track { grid-auto-columns: calc((100% - 24px) / 3); }
  .feedback-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-height: 460px) and (orientation: landscape) {
  .hero-content { padding-block: 80px 32px; }
  .hero h1 { font-size: clamp(2rem, 16vh, 4rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .title-line {
    clip-path: inset(-30% -8% -30%);
    perspective: 500px;
    --line-delay: 200ms;
  }
  .title-accent { --line-delay: 510ms; }
  .letter {
    transform-origin: 50% 85%;
    animation: letter-in .92s var(--ease-out) both;
    animation-delay: calc(var(--line-delay) + var(--letter) * 40ms);
  }
  .hero-action { animation: action-in .65s 900ms var(--ease-out) both; }

  .links-grid.is-in-view .tile {
    animation: tile-step .6s ease-in-out;
  }
  .links-grid.is-in-view .tile:nth-child(2) { animation-delay: .11s; }
  .links-grid.is-in-view .tile:nth-child(3) { animation-delay: .22s; }
  .links-grid.is-in-view .tile:nth-child(4) { animation-delay: .33s; }

  .work-track li.is-in-view .case-preview {
    animation: case-settle .72s ease-in-out;
  }
  @media (min-width: 760px) {
    .work-track li:nth-child(2).is-in-view .case-preview { animation-delay: .1s; }
    .work-track li:nth-child(3).is-in-view .case-preview { animation-delay: .2s; }
  }

  @keyframes tile-step {
    0%, 100% { translate: 0 0; }
    42% { translate: 0 -10px; }
  }
  @keyframes case-settle {
    0%, 100% { scale: 1; }
    45% { scale: 1.075; }
  }
  @keyframes letter-in {
    0% { transform: translate3d(-.18em, 92%, 0) rotateX(-76deg) skewX(-14deg); opacity: 0; filter: blur(7px); }
    58% { opacity: 1; }
    100% { transform: none; opacity: 1; filter: none; }
  }
  @keyframes action-in {
    from { opacity: 0; transform: translateY(18px) scale(.95); }
    to { opacity: 1; transform: none; }
  }
  @supports (animation-timeline: view()) {
    .scroll-progress {
      display: block; pointer-events: none; position: fixed; z-index: 3; inset: 0 0 auto;
      height: 2px; background: var(--orange); transform-origin: left; box-shadow: 0 0 12px var(--orange);
      animation: read-progress linear both;
      animation-timeline: scroll(root block);
    }
    .hero-media {
      animation: reel-travel linear both;
      animation-timeline: view(block);
      animation-range: exit 0% exit 100%;
    }
    .hero-content {
      animation: type-travel linear both;
      animation-timeline: view(block);
      animation-range: exit 0% exit 100%;
    }
    @keyframes read-progress { from { scale: 0 1; } to { scale: 1 1; } }
    @keyframes reel-travel {
      from { transform: scale(1.02); }
      to { transform: translateY(18%) scale(1.27) rotate(-3deg); }
    }
    @keyframes type-travel { from { translate: 0 0; opacity: 1; } to { translate: 0 -18%; opacity: .2; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
