/* Tessaro Pictures: the curtain menu */
:root {
  --page: #0e0d0c;           /* behind the film still */
  --on-photo: #f6f3ec;       /* words over the photo */
  --paper: #f2efe7;          /* the curtain */
  --ink: #141312;            /* words on the curtain */
  --muted: #7d786f;          /* small words on the curtain */
  --line: rgba(20, 19, 18, 0.12); /* thin rules */
  --accent: #d43f28;         /* tally red: brackets, the italic twins, the contact fill */
  --sans: "Archivo Variable", "Archivo", system-ui, sans-serif;
  --serif: "Newsreader Variable", "Newsreader", Georgia, serif;
  --pad: clamp(14px, min(3.2vw, 4.4vh), 40px);
  --link: clamp(26px, min(11.5vw, 9vh), 104px); /* the size of a menu link: on width AND height */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--page);
  color: var(--on-photo);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* ------------------------------------------------------------------ the page under the menu */
.page { position: fixed; inset: 0; overflow: hidden; }

.still { position: absolute; inset: 0; }
.still img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  filter: contrast(1.06) brightness(0.86);
  display: block;
}
.still__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.5) 0%, rgba(10, 9, 8, 0) 26%, rgba(10, 9, 8, 0) 50%, rgba(10, 9, 8, 0.72) 100%);
}
.still__shade::after { /* the darkening while the curtain falls */
  content: ""; position: absolute; inset: 0;
  background: #000;
  opacity: var(--dim, 0);
}
.still__grain {
  position: absolute; inset: -50%;
  opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}

.bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--pad);
  z-index: 2;
}

.logo { display: inline-flex; align-items: baseline; gap: 0.5em; line-height: 1; }
.logo__word {
  display: inline-flex;
  font-weight: 760;
  font-variation-settings: "wdth" 112;
  font-size: clamp(13px, min(1.5vw, 2.6vh), 18px);
  letter-spacing: 0.14em;
}
.logo__l { display: inline-block; transform-origin: 50% 75%; }
.logo__sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(12px, min(1.4vw, 2.4vh), 17px);
  opacity: 0.8;
}

/* the toggle: [ Menu ] that rolls to [ Close ] */
.tog { position: relative; padding: 6px 0; }
.tog::after { content: ""; position: absolute; inset: -10px; } /* a larger hit area, as on the site */
.tog__face {
  display: inline-flex; align-items: center;
  font-weight: 640;
  font-variation-settings: "wdth" 100;
  font-size: clamp(12px, min(1.25vw, 2.3vh), 15px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.tog:active .tog__face { transform: scale(0.94); transition-duration: 0.08s; }
.tog__br { display: inline-block; transition: transform 0.48s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s; }
.tog__br--l { margin-right: 0.36em; }
.tog__br--r { margin-left: 0.36em; }
.tog__words { position: relative; display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2em; white-space: nowrap; vertical-align: top; }
.tog__w { display: block; white-space: nowrap; }
.tog__w--b { position: absolute; left: 0; top: 0; }
.tog__ch { display: inline-block; }

@media (hover: hover) {
  .tog:hover .tog__br--l { transform: translateX(-0.34em); color: var(--accent); }
  .tog:hover .tog__br--r { transform: translateX(0.34em); color: var(--accent); }
}

.hero {
  position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--pad) * 1.6);
  max-width: 980px;
}
.hero__kicker, .hero__note, .caption {
  font-size: clamp(11px, min(1.15vw, 2.1vh), 14px);
  font-weight: 520;
  letter-spacing: 0.01em;
  opacity: 0.82;
}
.hero__kicker { text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: clamp(6px, 1.6vh, 16px); }
.hero__title {
  font-weight: 780;
  font-variation-settings: "wdth" 86;
  font-size: clamp(30px, min(8.4vw, 13vh), 132px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero__title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  letter-spacing: -0.02em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.line__in { display: block; }
.hero__note { margin-top: clamp(8px, 2vh, 20px); }
.caption {
  position: absolute; right: var(--pad); bottom: calc(var(--pad) * 1.6);
  font-family: var(--serif); font-style: italic; font-weight: 340;
  opacity: 0.7;
}

/* ------------------------------------------------------------------ the curtain edge (outside the menu, on the page) */
.edge {
  position: fixed; left: 0; right: 0; top: 0;
  height: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
}
.edge__line {
  position: absolute; left: 0; right: 0; top: -1px;
  height: 1px;
  background: rgba(20, 19, 18, 0.28);
}
.edge__line::after { /* the soft shadow the curtain casts on the page below its hem */
  content: ""; position: absolute; left: 0; right: 0; top: 1px;
  height: clamp(14px, 4vh, 36px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.16) 40%, rgba(0, 0, 0, 0));
}

/* ------------------------------------------------------------------ the menu */
.menu {
  position: fixed; inset: 0;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
  visibility: hidden;
  clip-path: inset(0% 0% 100% 0%);
  overflow: hidden;
}
.menu__inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.menu__inner::before { /* a whisper of paper grain */
  content: ""; position: absolute; inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.bar--menu { position: relative; border-bottom: 1px solid transparent; }
.menu__right { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }

.lang { display: flex; align-items: center; gap: 0.9em; font-size: clamp(11px, min(1.15vw, 2.1vh), 14px); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.lang__br { display: inline-block; margin: 0 0.3em; color: var(--accent); }
.lang__off { color: var(--muted); transition: color 0.3s; }
@media (hover: hover) { .lang__off:hover { color: var(--ink); } }

.menu__body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex; align-items: center;
  padding: 0 var(--pad);
}

.links { list-style: none; position: relative; z-index: 1; }
.link {
  display: block;
  overflow: hidden;
  font-weight: 790;
  font-variation-settings: "wdth" 88;
  font-size: var(--link);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  padding-top: 0.03em;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.link__in { display: block; }  /* GSAP moves this one: the waves */
.link__roll {                  /* CSS moves this one: the hover roll */
  display: block;
  position: relative;
  transition: transform 0.62s cubic-bezier(0.19, 1, 0.22, 1);
}
.link:active .link__roll { transition-duration: 0.12s; }
.link__w { display: block; white-space: nowrap; }
.link__w--twin {
  position: absolute; left: 0; top: 125%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 330;
  text-transform: none;
  letter-spacing: -0.035em;
  color: var(--accent);
  padding-left: 0.04em;
}
/* closing: the links leave upward, and the twin waiting below must not slide into the window */
.menu.is-leaving .link__w--twin { visibility: hidden; }
.menu.is-leaving .link__roll { transform: none !important; transition: none; }
.link.is-here .link__w:not(.link__w--twin)::after { /* the page you are on: a small bracket pair, drawn, after the word */
  content: "[ here ]";
  font-family: var(--sans);
  font-size: 0.16em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: top;
  margin-left: 0.9em;
  position: relative; top: 0.9em;
  color: var(--accent);
}

@media (hover: hover) {
  .links:has(.link:hover) .link:not(:hover) { opacity: 0.28; }
  .link:hover .link__roll { transform: translateY(-125%); }
}
.link:focus-visible .link__roll { transform: translateY(-125%); }
.link:active .link__roll { transform: translateY(-125%) translateY(1.5px); }

/* the strip of film beside the links: hovering a link advances it to that frame */
.peek {
  position: absolute;
  right: var(--pad);
  top: 0;
  width: clamp(160px, min(24vw, 36vh), 340px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.peek__film {
  display: block;
  position: relative;
  padding: 7px 16px;
  background: #1b1a18;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -18px rgba(20, 19, 18, 0.55), 0 3px 8px -4px rgba(20, 19, 18, 0.4);
  clip-path: inset(0 0 100% 0);
}
.peek__gate {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d0c0b;
  border-radius: 1px;
}
.peek__gate::after { /* a soft vignette and a sheen on the frame */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.45)), linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 40%);
}
.peek__strip { display: block; position: absolute; left: 0; right: 0; top: 0; height: 600%; }
.peek__frame {
  display: block;
  height: calc(100% / 6);
  background-image: var(--img);
  background-size: var(--z) auto;
  background-position: var(--pos);
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.08);
  border-bottom: 4px solid #0d0c0b;
}
.peek__holes {
  position: absolute; top: 9px; bottom: 9px;
  width: 6px;
  background: repeating-linear-gradient(180deg, rgba(242, 239, 231, 0.82) 0 5px, transparent 5px 11px);
  border-radius: 1px;
}
.peek__holes--l { left: 5px; }
.peek__holes--r { right: 5px; }
.peek__cap {
  height: 1.3em;
  overflow: hidden;
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 360;
  font-size: clamp(12px, 1.2vw, 15px);
  color: var(--muted);
}
.peek__caps { display: block; }
.peek__caps span { display: block; height: 1.3em; line-height: 1.3em; white-space: nowrap; }
@media (max-width: 760px), (hover: none) { .peek { display: none; } }

.menu__foot { padding: 0 var(--pad) var(--pad); }
.contact {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(9px, 1.9vh, 16px) clamp(12px, 1.6vw, 20px);
  font-weight: 640;
  font-size: clamp(12px, min(1.3vw, 2.4vh), 16px);
  letter-spacing: 0.01em;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.contact__fill {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact__label, .contact__arrow { position: relative; }
.contact__arrow { width: 1.15em; height: 1.15em; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@media (hover: hover) {
  .contact:hover .contact__fill { transform: scaleX(1); }
  .contact:hover .contact__arrow { transform: translate(2px, -2px) rotate(45deg); }
}
.contact:active { transform: scale(0.985); transition-duration: 0.08s; }

.small {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: clamp(7px, 1.4vh, 12px);
  font-size: clamp(10px, min(1.05vw, 2vh), 13px);
  color: var(--muted);
}
.small__social { display: flex; gap: 1.1em; }
.small__social a { transition: color 0.3s; }
@media (hover: hover) { .small__social a:hover { color: var(--accent); } }

@media (max-width: 520px) {
  .small__social a:last-child { display: none; }
  .caption { display: none; }
}
