/* ---------------------------------------------------------------
   AAH-STUDIO — main stylesheet
   --------------------------------------------------------------- */

:root {
  --bg:        #F3EFE4;
  --bg-tint:   #EAE5D6;
  --ink:       #161513;
  --ink-soft:  #5A564E;
  --line:      rgba(22, 21, 19, 0.08);
  --accent:    #FF5436;
  --ok:        #4FB54A;

  --grid-size: 64px;
  --max:       1480px;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Background grid (cursor spotlight) ---------- */
/*
  Two stacked pseudo-layers: the lower one is a blurred, faded grid that
  covers the whole viewport; the upper one is a crisp grid that's only
  revealed inside a circle that follows the cursor (--mx, --my, set by JS).
*/
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  --spot: 260px;
  --line-strong: rgba(22, 21, 19, 0.14);
}
.bg-grid::before,
.bg-grid::after {
  content: "";
  position: absolute;
  inset: -8px;
  background-image:
    linear-gradient(to right, var(--line-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-strong) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}
.bg-grid::before {
  filter: blur(2px);
  opacity: 0.42;
}
.bg-grid::after {
  -webkit-mask-image: radial-gradient(
    circle var(--spot) at var(--mx, 50%) var(--my, 50%),
    #000 0%,
    #000 40%,
    transparent 100%
  );
          mask-image: radial-gradient(
    circle var(--spot) at var(--mx, 50%) var(--my, 50%),
    #000 0%,
    #000 40%,
    transparent 100%
  );
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  z-index: 20;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.logo {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: color .25s ease, border-color .25s ease;
}
.logo:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.logo-mark { display: inline-flex; align-items: baseline; }

.menu-btn {
  width: 44px; height: 44px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--bg);
  transition: background .2s ease;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
.menu-btn:hover { background: var(--ink); color: var(--bg); }
.menu-btn:hover span { background: var(--bg); }

/* Hidden — sidetab and status-left removed, but version tag in
   status-right is kept visible in the bottom corner. */
.sidetab,
.status-left { display: none !important; }

/* ---------- Left sidetab ---------- */
.sidetab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
}
.sidetab a {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 8px;
  border-radius: 0 6px 6px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;
  gap: 22px;
  transition: padding .2s ease;
}
.sidetab a:hover { padding-right: 14px; }
.sidetab-top { font-weight: 700; }
.sidetab-vert {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ---------- Status bar ---------- */
.statusbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  z-index: 18;
  pointer-events: none;
}
.statusbar > * { pointer-events: auto; }
.status-left { display: inline-flex; align-items: center; gap: 10px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(79, 181, 74, 0.18);
  animation: pulse 2.4s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(79, 181, 74, 0.18); }
  50%      { box-shadow: 0 0 0 7px rgba(79, 181, 74, 0.06); }
}

/* ---------- Wordmark ---------- */
.wordmark {
  position: fixed;
  right: 36px;
  bottom: 44px;
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 76px);
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink);
  text-decoration: none;
  z-index: 5;
  user-select: none;
  transition: color .25s ease, letter-spacing .35s cubic-bezier(.2,.7,.2,1);
}
.wordmark:hover {
  color: var(--accent);
  letter-spacing: -0.03em;
}
/* ---------- Full-screen menu (slick stagger animation) ---------- */
.menu {
  position: fixed;
  inset: 0;
  background: rgba(243, 239, 228, 0.94);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  z-index: 19;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .45s cubic-bezier(.2,.7,.2,1),
    visibility 0s linear .45s,
    backdrop-filter .45s ease;
}
.menu.menu--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity .45s cubic-bezier(.2,.7,.2,1),
    visibility 0s linear 0s,
    backdrop-filter .45s ease;
}
.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: grid;
  gap: 0.05em;
}
.menu li {
  font-size: clamp(56px, 9vw, 140px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.045em;
  opacity: 0;
  filter: blur(7px);
  transform: translateY(28px);
  transition:
    opacity .7s cubic-bezier(.2,.7,.2,1),
    filter  .7s cubic-bezier(.2,.7,.2,1),
    transform .7s cubic-bezier(.2,.7,.2,1);
}
.menu--open li {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
.menu--open li:nth-child(1) { transition-delay: .14s; }
.menu--open li:nth-child(2) { transition-delay: .22s; }
.menu--open li:nth-child(3) { transition-delay: .30s; }
.menu--open li:nth-child(4) { transition-delay: .38s; }

.menu a {
  position: relative;
  display: inline-block;
  padding: 0 0.1em;
  color: var(--ink);
}
/* Each letter is wrapped in <span>. On hover, a wave rolls from left to right:
   each letter lifts and colors-in briefly, then settles back — staggered. */
.menu a > span {
  display: inline-block;
  will-change: transform, color;
  transition: color .25s ease;
}
.menu a:hover > span { animation: letter-ripple .55s cubic-bezier(.3,.7,.3,1) forwards; }
.menu a:hover > span:nth-child(1)  { animation-delay: 0ms; }
.menu a:hover > span:nth-child(2)  { animation-delay: 35ms; }
.menu a:hover > span:nth-child(3)  { animation-delay: 70ms; }
.menu a:hover > span:nth-child(4)  { animation-delay: 105ms; }
.menu a:hover > span:nth-child(5)  { animation-delay: 140ms; }
.menu a:hover > span:nth-child(6)  { animation-delay: 175ms; }
.menu a:hover > span:nth-child(7)  { animation-delay: 210ms; }
.menu a:hover > span:nth-child(8)  { animation-delay: 245ms; }
.menu a:hover > span:nth-child(9)  { animation-delay: 280ms; }
.menu a:hover > span:nth-child(10) { animation-delay: 315ms; }
@keyframes letter-ripple {
  0%   { transform: translateY(0);     color: var(--ink); }
  40%  { transform: translateY(-16px); color: var(--accent); }
  100% { transform: translateY(0);     color: var(--accent); }
}

/* Language switch transition — every translatable element blurs out,
   content swaps mid-fade, and blurs back in. Triggered by the
   .lang-switching class on <html>, set by JS for ~300ms. */
[data-i18n],
[data-i18n-letters] {
  transition: opacity .28s ease, filter .28s ease, transform .28s ease;
}
html.lang-switching [data-i18n],
html.lang-switching [data-i18n-letters] {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(-2px);
}

/* Language switcher — bottom-left of the open menu, mirrors the contact block */
.menu-lang {
  position: absolute;
  left: 60px;
  bottom: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(14px);
  transition:
    opacity .55s cubic-bezier(.2,.7,.2,1),
    filter  .55s cubic-bezier(.2,.7,.2,1),
    transform .55s cubic-bezier(.2,.7,.2,1);
}
.menu--open .menu-lang {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  transition-delay: .50s;
}
.menu-lang button {
  background: transparent;
  border: 0;
  padding: 6px 8px;
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  pointer-events: auto;
  transition: color .2s ease, transform .25s cubic-bezier(.2,.7,.2,1);
}
.menu-lang button[aria-current="true"] { color: var(--ink); font-weight: 500; }
.menu-lang button:hover,
.menu-lang button:focus-visible {
  color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}
.menu-lang > span { color: var(--ink-soft); opacity: 0.4; }
@media (max-width: 720px) {
  .menu-lang { left: 28px; bottom: 36px; font-size: 12px; }
}

/* Contact block — bottom-right of the open menu, fades in after the items */
.menu-contact {
  position: absolute;
  right: 60px;
  bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(14px);
  transition:
    opacity .55s cubic-bezier(.2,.7,.2,1),
    filter  .55s cubic-bezier(.2,.7,.2,1),
    transform .55s cubic-bezier(.2,.7,.2,1);
}
.menu--open .menu-contact {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  transition-delay: .45s;
}
.menu-contact-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.menu-contact a {
  color: var(--ink);
  text-decoration: none;
  transition: color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.menu-contact a:hover {
  color: var(--accent);
  transform: translateX(-4px);
}
@media (max-width: 720px) {
  .menu-contact { right: 28px; bottom: 36px; font-size: 12px; }
}

/* ---------- Work grid ---------- */
.work {
  position: relative;
  z-index: 2;
  padding: 110px 48px 180px;
  max-width: var(--max);
  margin: 0 auto;
}
.grid {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 56px;
}

.tile {
  position: relative;
  transform: rotate(calc(var(--rot, 0) * 1deg));
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  --rot: attr(data-rotate);
}
.tile { --rot: 0; }
.tile[data-rotate="-1"] { --rot: -1; }
.tile[data-rotate="-2"] { --rot: -2; }
.tile[data-rotate="-3"] { --rot: -3; }
.tile[data-rotate="-4"] { --rot: -4; }
.tile[data-rotate="1"]  { --rot: 1; }
.tile[data-rotate="2"]  { --rot: 2; }
.tile[data-rotate="3"]  { --rot: 3; }
.tile[data-rotate="4"]  { --rot: 4; }

.tile-wide { grid-column: span 2; }

.tile:hover { transform: rotate(0deg) translateY(-4px); }

.tile-link {
  display: block;
  position: relative;
  transition: transform .35s ease;
}

/* ---------- Browser-window frame ---------- */
.browser {
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.05),
    0 12px 28px rgba(22, 21, 19, 0.10),
    0 28px 60px rgba(22, 21, 19, 0.08);
  border: 1px solid rgba(22, 21, 19, 0.10);
  transition: box-shadow .35s ease, transform .35s ease;
}
.tile:hover .browser {
  box-shadow:
    0 2px 4px rgba(0,0,0,0.06),
    0 28px 60px rgba(22, 21, 19, 0.20),
    0 60px 120px rgba(22, 21, 19, 0.12);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(to bottom, #FBF8F0, #F0EBDC);
  border-bottom: 1px solid rgba(22, 21, 19, 0.08);
  min-height: 36px;
}
.browser-dots {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}
.browser-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.browser-dots i:nth-child(1) { background: #FF5F57; }
.browser-dots i:nth-child(2) { background: #FEBC2E; }
.browser-dots i:nth-child(3) { background: #28C840; }

.browser-url {
  flex: 1 1 auto;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.65);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(22, 21, 19, 0.08);
  max-width: 70%;
  margin: 0 auto;
}
.browser-end {
  flex: 0 0 auto;
  width: 45px; /* counterbalance the dots so the url sits centred */
}

.browser-body {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 0% 0%, var(--c1, #ddd) 0%, var(--c2, #999) 100%);
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}
.tile-wide .browser-body { aspect-ratio: 16 / 9; }

/* Compact stats overlay — sits as a "sticker" on top of the tile,
   slightly counter-twisted and extending past the browser frame.
   Anchored in the bottom-left corner so it overlaps the bottom edge. */
.tile-stats {
  position: absolute;
  bottom: 14px; /* clears the tile-meta line below the browser frame */
  left: -10px;
  z-index: 6;
  display: grid;
  row-gap: 6px;
  padding: 12px 14px;
  background: rgba(12, 12, 14, 0.78);
  backdrop-filter: blur(5px) saturate(140%);
  -webkit-backdrop-filter: blur(5px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  pointer-events: none;
  transform: rotate(-4deg);
  transform-origin: bottom left;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.30),
    inset 0 1px 1px rgba(255, 255, 255, 0.04);
}
.tile-stat {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  column-gap: 8px;
  line-height: 1;
}
.tile-stat-val {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.01em;
  text-align: left;
}
.tile-stat-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.browser-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 6px);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Hover CTA badge — sits in the bottom-right of every preview area
   to tell visitors they can hover for the live preview. Fades on hover. */
html[lang="da"] .browser-body::before,
html[lang="da"] .still-body::before {
  content: "↪ Se mere";
}
.browser-body::before,
.still-body::before {
  content: "↪ See More";
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 5px 10px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 3;
  transition: opacity .25s ease, transform .3s ease;
  animation: hint-breathe 2.6s ease-in-out infinite;
}
.tile:hover .browser-body::before,
.tile:hover .still-body::before {
  opacity: 0;
  transform: translateY(4px);
  animation: none;
}
@keyframes hint-breathe {
  0%, 100% { transform: translateY(0)   scale(1); }
  50%      { transform: translateY(-1px) scale(1.04); }
}

.tile-num { display: none; }

/* Live preview iframe injected on hover */
.tile-preview-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  filter: blur(2px);
  transform: scale(1.02);
  transform-origin: center;
  transition: opacity .35s ease, filter .45s ease, transform .45s ease;
  pointer-events: none;
}
.tile-link[data-preview-loaded="true"] .tile-preview-wrap { opacity: 1; }
.tile:hover .tile-preview-wrap {
  filter: blur(0);
  transform: scale(1);
}
.tile-preview-wrap iframe {
  width: 1440px;
  height: 900px;
  border: 0;
  transform: scale(var(--preview-scale, 0.35));
  transform-origin: top left;
}
.tile-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.tile-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .3s ease, transform .35s ease;
}
.tile:hover .tile-meta { opacity: 1; transform: translateY(0); }
.tile-name { color: var(--ink); font-weight: 500; }

/* ---------- CTA tile (closing prompt at end of grid) ---------- */
.tile--cta .tile-link {
  display: block;
  position: relative;
}
.cta-card {
  position: relative;
  background: #F0EBD8;
  border-radius: 10px;
  border: 1px solid rgba(22, 21, 19, 0.10);
  padding: 36px 44px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto auto;
  gap: 8px 24px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.05),
    0 12px 28px rgba(22, 21, 19, 0.10),
    0 28px 60px rgba(22, 21, 19, 0.08);
  transition: background .4s ease, color .4s ease, box-shadow .35s ease;
}
.tile--cta:hover .cta-card {
  background: #161513;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.06),
    0 28px 60px rgba(22, 21, 19, 0.25),
    0 60px 120px rgba(22, 21, 19, 0.15);
}

.cta-eyebrow,
.cta-status {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  transition: color .4s ease;
}
.cta-eyebrow { grid-column: 1; grid-row: 1; }
.cta-status { grid-column: 2; grid-row: 1; justify-self: end; }
.cta-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(79, 181, 74, 0.18);
}

.cta-title {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: clamp(56px, 7.5vw, 124px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin: 0;
  align-self: center;
  color: var(--ink);
  transition: color .4s ease;
}

.cta-action {
  grid-column: 1;
  grid-row: 4;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .4s ease;
}
.cta-arrow {
  color: var(--accent);
  display: inline-block;
  margin-left: 6px;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.tile--cta:hover .cta-arrow {
  transform: translateX(12px);
}

.cta-mail {
  grid-column: 2;
  grid-row: 4;
  justify-self: end;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: color .4s ease;
}
.cta-mail-line { color: var(--ink); }
.cta-phone {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color .4s ease;
}

/* Flip text colors when the card goes dark on hover */
.tile--cta:hover .cta-eyebrow,
.tile--cta:hover .cta-status,
.tile--cta:hover .cta-title,
.tile--cta:hover .cta-action,
.tile--cta:hover .cta-mail,
.tile--cta:hover .cta-mail-line,
.tile--cta:hover .cta-phone,
.tile--cta:hover .cta-ticker {
  color: #F3EFE4;
}

/* Client ticker — horizontal infinite scroll inside the CTA card */
.cta-ticker {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 12px 0 14px;
  border-top: 1px solid rgba(22, 21, 19, 0.10);
  border-bottom: 1px solid rgba(22, 21, 19, 0.10);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  transition: color .4s ease, border-color .4s ease;
}
.tile--cta:hover .cta-ticker {
  border-top-color: rgba(243, 239, 228, 0.20);
  border-bottom-color: rgba(243, 239, 228, 0.20);
}
.cta-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-scroll 38s linear infinite;
  will-change: transform;
}
.tile--cta:hover .cta-ticker-track { animation-play-state: paused; }
.ticker-group {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-right: 22px;
}
.ticker-dot { opacity: 0.4; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 720px) {
  .cta-card {
    padding: 24px 26px;
    aspect-ratio: auto;
    min-height: 280px;
  }
  .cta-title { font-size: clamp(40px, 11vw, 64px); }
  .cta-action, .cta-mail { font-size: 11px; }
}

/* ---------- Still-variant tile (no browser chrome) ---------- */
.tile--still .tile-link {
  position: relative;
}
.still-card {
  position: relative;
  background: #11100E;
  border-radius: 10px;
  /* overflow allowed so the camera notch can stick up above the card */
  box-shadow:
    0 1px 1px rgba(0,0,0,0.05),
    0 12px 28px rgba(22, 21, 19, 0.10),
    0 28px 60px rgba(22, 21, 19, 0.08);
  border: 1px solid rgba(22, 21, 19, 0.10);
  transition: box-shadow .35s ease, transform .35s ease;
}
.tile--still:hover .still-card {
  box-shadow:
    0 2px 4px rgba(0,0,0,0.06),
    0 28px 60px rgba(22, 21, 19, 0.20),
    0 60px 120px rgba(22, 21, 19, 0.12);
}
.still-corner {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
}
.still-body {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #11100E;
  border-radius: 10px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.still-body > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.still-body .tile-num {
  position: relative;
  z-index: 1;
}

/* Camera viewfinder hump — sits ABOVE the still card, off-centered to the
   left to give the silhouette of a camera back (LCD + viewfinder + dial). */
.cam-notch {
  position: absolute;
  bottom: 100%;
  left: 32%;
  transform: translateX(-50%);
  margin-bottom: -1px;
  width: 76px;
  height: 13px;
  background: linear-gradient(to bottom, #1c1a17 0%, #0c0a08 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.04),
    0 -3px 8px rgba(0,0,0,0.25);
}

/* Control dial — knurled cylinder on the top-right of the camera body */
.cam-dial {
  position: absolute;
  bottom: 100%;
  left: 78%;
  transform: translateX(-50%);
  margin-bottom: -1px;
  width: 22px;
  height: 11px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.10) 0 1px,
      transparent 1px 3px
    ),
    linear-gradient(to bottom, #1f1d1a 0%, #0a0908 100%);
  z-index: 5;
  pointer-events: none;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    0 -2px 5px rgba(0, 0, 0, 0.25);
}

/* Power LED removed at the user's request */
.cam-led { display: none; }
/* Hot shoe — small rectangle stacked on top of the hump */
.cam-notch::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: -1px;
  width: 26px;
  height: 4px;
  background: #14120F;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.05),
    0 -2px 4px rgba(0,0,0,0.2);
}
/* Viewfinder eyepiece slot inside the hump */
.cam-notch i {
  display: inline-block;
  width: 38px;
  height: 5px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.04),
    inset 0 -1px 0 rgba(255,255,255,0.02);
}

/* Camera viewfinder corners + REC indicator on film tiles */
.cam-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 255, 255, 0.85);
  border-style: solid;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.cam-corner--tl { top: 10px; left: 10px;     border-width: 1.5px 0 0 1.5px; }
.cam-corner--tr { top: 10px; right: 10px;    border-width: 1.5px 1.5px 0 0; }
.cam-corner--bl { bottom: 10px; left: 10px;  border-width: 0 0 1.5px 1.5px; }
.cam-corner--br { bottom: 10px; right: 10px; border-width: 0 1.5px 1.5px 0; }

.cam-rec {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 5;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.cam-rec i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF3838;
  box-shadow: 0 0 0 2px rgba(255, 56, 56, 0.25);
  animation: rec-blink 1.4s ease-in-out infinite;
}
@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* Static photo-side counterpart of .cam-rec — focus-lock dot + frame counter */
.cam-info {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 5;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.cam-info i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: #2DD963;
  box-shadow: 0 0 0 2px rgba(45, 217, 99, 0.22);
}

/* For still tiles, the static photo is the default state — the video
   preview only fades in on hover. The photo is blurred by default to
   match the website tiles' teaser feel; it sharpens on hover. */
.tile--still .still-body > img {
  filter: blur(2px);
  transform: scale(1.02);
  transition: filter .45s ease, transform .45s ease;
}
.tile--still:hover .still-body > img {
  filter: blur(0);
  transform: scale(1);
}
.tile--still .tile-preview-wrap {
  filter: blur(0);
  transform: scale(1);
}
.tile--still .tile-link[data-preview-loaded="true"] .tile-preview-wrap {
  opacity: 0;
}
.tile--still:hover .tile-link[data-preview-loaded="true"] .tile-preview-wrap {
  opacity: 1;
}

/* ---------- Tile entry animation ----------
   Each tile drops in from below: starts pushed down + scaled down +
   blurred, springs into place with a soft overshoot on the transform.
*/
.tile {
  opacity: 0;
  filter: blur(7px) brightness(0.85);
  transform: rotate(calc(var(--rot, 0) * 1deg)) translateY(60px) scale(0.88);
  transform-origin: 50% 80%;
  transition:
    opacity 1s cubic-bezier(.2, .8, .25, 1),
    filter  1s cubic-bezier(.2, .8, .25, 1),
    transform 1.1s cubic-bezier(.34, 1.45, .35, 1);
}
.tile.is-visible {
  opacity: 1;
  filter: blur(0) brightness(1);
  transform: rotate(calc(var(--rot, 0) * 1deg)) translateY(0) scale(1);
}
.tile.is-visible:hover {
  transform: rotate(0deg) translateY(-4px);
  /* Override the springy entry transition with a snappy hover one */
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}

/* ---------- Infinite-scroll sentinel ---------- */
.grid-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .work { padding: 100px 28px 160px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; }
  .tile-wide { grid-column: span 2; }
  .wordmark { font-size: 36px; right: 18px; bottom: 36px; }
  .sidetab { display: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 28px; }
  .tile-wide { grid-column: span 1; }
  .statusbar { font-size: 10px; padding: 12px 16px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
