/* Draft C, "Night Shift": a cinematic, premium one-screen page. The 8 s panda film is a fixed full-bleed background
   that plays once and holds on its last frame; a near-black scrim keeps the left column readable over every frame.
   Instrument Serif (display) + DM Sans (body), the logo's green #7EC242 as the only accent. */
:root {
  color-scheme: dark;
  --night: #07080A;
  --ink: #F6F5F0;
  --ink-2: #CDD1CB;      /* body text */
  --ink-3: #B7BCB6;      /* small print */
  --green: #7EC242;      /* logo green */
  --hair: rgba(255, 255, 255, .15);
  --glass: rgba(9, 10, 12, .62);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --gutter: clamp(24px, 7vw, 150px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); }
body {
  min-height: 100vh; min-height: 100svh;
  color: var(--ink-2); font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  overflow-x: hidden; overflow-x: clip;
}
h1, h2, p { margin: 0; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--green); color: var(--night); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
[hidden] { display: none !important; }

/* ---------- the film (fixed, behind everything) ---------- */
.stage { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: 0; overflow: hidden; background: var(--night); pointer-events: none; }
.film {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 72% 45%;   /* keeps the panda (right third) in view when the frame is cropped */
  background: var(--night);
}
/* left edge near-black, gone by ~62% of the width; a gentle bottom and top vignette */
.scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(7, 8, 10, .95) 0%, rgba(7, 8, 10, .92) 18%, rgba(7, 8, 10, .84) 30%, rgba(7, 8, 10, .66) 40%,
      rgba(7, 8, 10, .42) 49%, rgba(7, 8, 10, .2) 57%, rgba(7, 8, 10, .06) 63%, rgba(7, 8, 10, 0) 68%),
    linear-gradient(0deg, rgba(7, 8, 10, .74) 0%, rgba(7, 8, 10, .34) 14%, rgba(7, 8, 10, 0) 34%),
    linear-gradient(180deg, rgba(7, 8, 10, .55) 0%, rgba(7, 8, 10, .18) 12%, rgba(7, 8, 10, 0) 26%);
}
/* film grain: SVG turbulence, very faint, blended in "overlay" so the blacks stay black. It is drawn on a box twice
   the viewport so it can jitter without gaps. */
.grain {
  position: absolute; left: -50%; top: -50%; width: 200%; height: 200%;
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1.7 0 0 0 -.35 1.7 0 0 0 -.35 1.7 0 0 0 -.35 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- the page ---------- */
.page {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 0 var(--gutter);
  overflow-x: clip;
}
.copy {
  flex: 1; width: 100%; max-width: min(560px, 56vw);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 4vh, 48px) 0 8px;
}
.logo { width: clamp(132px, 11.2vw, 168px); margin: 0 0 clamp(10px, 2.8vh, 28px); }
.logo img { width: 100%; height: auto; }

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: clamp(14px, 2.4vh, 22px);
  font-size: 12.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; line-height: 1.4;
  color: var(--ink-3);
}
.eyebrow::before { content: ""; flex: none; width: 32px; height: 1px; background: var(--green); }

.headline {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, min(4.7vw, 7.6vh), 70px);
  line-height: 1.02; letter-spacing: -.012em;
  color: var(--ink);
  text-wrap: balance;
}
.headline em { font-style: italic; color: var(--green); padding-right: .04em; }

.sub {
  max-width: 44ch; margin-top: clamp(14px, 2.6vh, 24px);
  font-size: 17.5px; line-height: 1.62; color: var(--ink-2);
}

/* ---------- the studio card ---------- */
.studio {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 22px;
  margin-top: clamp(20px, 3.6vh, 36px); padding: 20px 24px 22px;
  color: inherit; text-decoration: none;
  background: var(--glass); border: 1px solid var(--hair); border-radius: 14px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.studio-text { display: block; min-width: 0; }
.tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2;
  color: var(--green);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(126, 194, 66, .75); }
.studio-name { display: block; margin-top: 8px; font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--ink); }
.studio-desc { display: block; margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.arrow { color: var(--ink-3); }
.studio:hover, .studio:focus-visible { border-color: var(--green); }
.studio:hover .arrow, .studio:focus-visible .arrow { color: var(--green); transform: translateX(5px); }
.studio:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

.contact { margin-top: clamp(16px, 2.6vh, 26px); font-size: 15px; color: var(--ink-3); }
.contact a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(126, 194, 66, .7); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.contact a:hover { text-decoration-color: var(--green); color: #fff; }

/* ---------- bottom bar: legal left, film controls right ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: calc(42px + 10px + clamp(16px, 2.6vh, 28px));
  padding: 10px 0 clamp(16px, 2.6vh, 28px);
  margin-right: calc(var(--gutter) * -1 + clamp(16px, 2.6vw, 40px));
}
.legal { font-size: 13px; color: var(--ink-3); }
.controls { display: flex; align-items: center; gap: 10px; }
.ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; min-width: 42px; padding: 0; margin: 0;
  font: 500 13px/1 var(--sans); letter-spacing: .04em; color: var(--ink);
  background: var(--glass); border: 1px solid var(--hair); border-radius: 999px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.ctl-replay { padding: 0 18px 0 14px; }
.ctl:hover { border-color: var(--green); }
.ctl .i-play { display: none; }
.ctl-pause[aria-pressed="true"] .i-pause { display: none; }
.ctl-pause[aria-pressed="true"] .i-play { display: block; }

/* ---------- stacked layout: phones and portrait screens ---------- */
@media (max-aspect-ratio: 1/1), (max-width: 820px) and (min-height: 561px) {
  :root { --gutter: 16px; }
  /* the film becomes a picture over the top two thirds (the panda stays whole, in the right of the frame);
     its lower edge melts into the night below, where the text sits */
  .film { bottom: auto; height: 66vh; height: min(66lvh, 150vw); object-position: 88% 50%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, .55) 75%, rgba(0, 0, 0, .18) 90%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, .55) 75%, rgba(0, 0, 0, .18) 90%, transparent 100%); }
  .scrim {
    background:
      linear-gradient(0deg, rgba(7, 8, 10, .94) 0%, rgba(7, 8, 10, .9) 30%, rgba(7, 8, 10, .7) 40%, rgba(7, 8, 10, .4) 50%, rgba(7, 8, 10, .14) 60%, rgba(7, 8, 10, 0) 68%),
      linear-gradient(180deg, rgba(7, 8, 10, .6) 0%, rgba(7, 8, 10, .2) 12%, rgba(7, 8, 10, 0) 24%);
  }
  .copy { justify-content: space-between; padding: 6px 0 0; max-width: 560px; }
  .logo { width: 132px; margin: 0; }
  /* on a short screen the text starts below the panda's face (and the page scrolls) instead of covering it */
  .logo { margin-bottom: max(0px, calc(40vh - 140px)); margin-bottom: max(0px, calc(40svh - 140px)); }
  .body { position: relative; isolation: isolate; padding-top: 28px; }
  /* when the page is taller than the screen the text scrolls over its own dark sheet */
  .body::before {
    content: ""; position: absolute; z-index: -1; left: -100vw; right: -100vw; top: 0; bottom: -66px;
    background: linear-gradient(180deg, rgba(7, 8, 10, 0), rgba(7, 8, 10, .9) 56px, rgba(7, 8, 10, .94));
  }
  .eyebrow { font-size: 11.5px; letter-spacing: .16em; margin-bottom: 10px; }
  .eyebrow::before { width: 24px; }
  .headline { font-size: clamp(38px, 11.4vw, 62px); }
  .sub { font-size: 16px; line-height: 1.55; margin-top: 10px; }
  .studio { margin-top: 16px; padding: 14px 18px 16px; column-gap: 14px; }
  .studio-name { font-size: 27px; }
  .studio-desc { font-size: 14.5px; line-height: 1.5; }
  .contact { margin-top: 12px; font-size: 14.5px; }
  .bar { min-height: 66px; padding: 8px 0 14px; margin-right: 0; }
  .ctl { height: 44px; min-width: 44px; }
}
/* a short landscape window: tighten the column so it fits without scrolling */
@media (min-width: 821px) and (max-height: 700px) and (min-aspect-ratio: 1/1) {
  .logo { width: 120px; }
  .sub { font-size: 16px; }
  .studio { padding: 16px 22px 18px; }
  .studio-desc { font-size: 14.5px; line-height: 1.5; }
}

/* ---------- motion (only when the visitor has not asked for less) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .studio, .ctl { transition: border-color .25s var(--ease); }
  .arrow { transition: transform .3s var(--ease), color .25s var(--ease); }
  .dot { animation: beat 2.8s ease-in-out infinite; }
  .grain { animation: jitter .9s steps(1) infinite; }
  .is-paused .grain, .is-paused .dot { animation-play-state: paused; }
  .logo, .eyebrow, .headline, .sub, .studio, .contact, .bar { animation: rise 1s var(--ease) both; }
  .eyebrow { animation-delay: .15s; }
  .headline { animation-delay: .3s; }
  .sub { animation-delay: .5s; }
  .studio { animation-delay: .65s; }
  .contact { animation-delay: .8s; }
  .bar { animation-delay: .95s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes beat { 0%, 100% { box-shadow: 0 0 6px rgba(126, 194, 66, .5); } 50% { box-shadow: 0 0 14px rgba(126, 194, 66, .95); } }
@keyframes jitter {
  0% { transform: translate(0, 0); }   12% { transform: translate(-4%, 3%); }  25% { transform: translate(3%, -5%); }
  37% { transform: translate(-6%, -2%); } 50% { transform: translate(5%, 4%); } 62% { transform: translate(-2%, 6%); }
  75% { transform: translate(6%, -3%); } 87% { transform: translate(-5%, 1%); } 100% { transform: translate(0, 0); }
}
