/* Same tokens as portfolio.alohateresa.com (src/app/globals.css), so the two sites read as one brand.
   Layout: one column of sections; bios side by side, photos three across, work in a card grid. */
:root {
  --bg: #0a0a0d;
  --bg-raised: #14141b;
  --bg-sunk: #0f0f14;
  --line: #2a2a36;
  --text: #f3f1ee;
  --muted: #a6a2b0;
  --pink: #bc70a4;
  --blush: #eadedb;
  --blue: #7a9deb;
  --gradient: linear-gradient(140deg, var(--pink) 0%, var(--blush) 50%, var(--blue) 75%);
  --flow: linear-gradient(90deg, var(--pink), var(--blush) 25%, var(--blue) 50%, var(--blush) 75%, var(--pink));
  --sans: "Avenir Next", AvenirNext, Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: monospace, monospace;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 20; }
.skip:focus { left: 16px; background: var(--bg-raised); padding: 8px 12px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 58ch; }
.hint { color: var(--muted); max-width: 42ch; font-size: 0.95rem; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgb(10 10 13 / 0.88); /* older phones without color-mix() */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); /* Safari before 18 */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.top nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.top nav a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.top nav a:hover { color: var(--text); }
.top-right { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }

/* Copy mode: every copy and download control carries .copy-only and shows only while the switch is on. */
html:not([data-copy="on"]) .copy-only { display: none !important; }

/* The switch: red pill when copy buttons are off, green when on. Hover or focus shows what it does. */
.copy-toggle { position: relative; display: flex; align-items: center; }
.switch {
  --off: #e5484d;
  --on: #30a46c;
  position: relative; width: 44px; height: 24px; padding: 0; flex: none;
  border: 0; border-radius: 999px; background: var(--off); cursor: pointer;
  transition: background-color 0.2s;
}
.switch::before { content: ""; position: absolute; inset: -10px -4px; } /* a bigger tap area than it looks */
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); transition: transform 0.2s;
}
.switch[aria-checked="true"] { background: var(--on); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .switch, .switch-knob { transition: none; } }

.tip {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 30;
  width: max-content; max-width: min(280px, calc(100vw - 32px));
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-raised); color: var(--text); font-size: 0.85rem; line-height: 1.45;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
}
.copy-toggle:hover .tip, .switch:focus-visible + .tip, .copy-toggle.show-tip .tip {
  opacity: 1; visibility: visible; transform: none;
}

/* Hero */
.hero { padding-block: clamp(56px, 10vw, 128px) clamp(48px, 7vw, 88px); display: grid; gap: 20px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--line); background: transparent; color: var(--text);
  cursor: pointer; transition: border-color 0.2s, background-color 0.2s;
}
.button:hover { border-color: var(--muted); }
.button.primary {
  background: var(--flow) 0 50% / 200% 100%; color: #121218; border-color: transparent; font-weight: 600;
  animation: flow-x 5s linear infinite paused;
}
.button.primary:hover, .button.primary:focus-visible { animation-play-state: running; }
.button.small { padding: 8px 14px; font-size: 0.74rem; }
.button.done { background: var(--blush); color: #121218; border-color: transparent; animation: none; }
@keyframes flow-x { from { background-position-x: 0%; } to { background-position-x: -200%; } }
@media (prefers-reduced-motion: reduce) { .button.primary { animation: none; } }

/* Section heads */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head > div { display: grid; gap: 8px; }

/* Cards */
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }

/* Bios */
.bios { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bio { padding: clamp(20px, 3vw, 32px); display: grid; gap: 20px; justify-items: start; }
.bio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; }
.count { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bio-text { display: grid; gap: 14px; max-width: 68ch; }
.bio-text p { color: var(--blush); }

/* Photos */
/* Six photos: three across in two even rows, then two across, then one on phones. */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .photo-grid { grid-template-columns: minmax(0, 1fr); } }
/* minmax(0, 1fr) keeps the 1600px photos from widening the card past its column in Chrome. */
.photo { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; overflow: hidden; }
.photo-frame { position: relative; aspect-ratio: 4 / 5; background: var(--bg-sunk); border-bottom: 1px solid var(--line); }
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.photo figcaption { padding: 16px 18px 0; display: grid; gap: 8px; align-content: start; font-size: 0.92rem; }
.photo .meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.photo .actions { padding: 16px 18px 18px; }

/* Work */
.group { display: grid; gap: 20px; }
.group + .group { margin-top: clamp(40px, 6vw, 64px); }
.group-head { display: grid; gap: 4px; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
/* Installations: the eight lead projects two across, larger than the rest, in four even rows. */
.group-onsite .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .group-onsite .work-grid { grid-template-columns: minmax(0, 1fr); } }
/* The other sixteen: four across on a laptop or wider, so the rows come out even. */
.group-more .work-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.work { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.clip { aspect-ratio: 16 / 9; background: var(--bg-sunk); border-bottom: 1px solid var(--line); }
.clip video { width: 100%; height: 100%; object-fit: cover; }
/* No footage: the title on the brand gradient, matching the portfolio's tile. */
.type-tile {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 24px; text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgb(188 112 164 / 0.35), transparent 55%),
    radial-gradient(circle at 80% 80%, rgb(122 157 235 / 0.35), transparent 55%),
    var(--bg-raised);
  font-family: var(--mono); font-size: 1.1rem; letter-spacing: 0.04em; color: var(--text);
}
/* A column, so each card's buttons sit at its bottom and line up across a row. */
.work-body { padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.work-body .actions { margin-top: auto; padding-top: 6px; }
.summary { color: var(--blush); font-size: 0.95rem; }
.role { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.credit { font-size: 0.8rem; color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.note-pill {
  justify-self: start; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px; background: var(--gradient); color: #121218; font-weight: 600;
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 0.74rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }


.head-side { display: grid; gap: 12px; justify-items: start; max-width: 42ch; }

/* Case-study popup: a centered sheet on wide screens, the full screen on phones. */
html.locked { overflow: hidden; }
.case {
  width: min(980px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--text); overflow-y: auto; overscroll-behavior: contain;
}
.case::backdrop { background: rgb(5 5 8 / 0.82); }
.case-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px 10px 20px;
  background: rgb(10 10 13 / 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.case-bar .eyebrow { overflow-wrap: anywhere; }
.case-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.case-media video, .case-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.case-play { position: absolute; left: 16px; bottom: 16px; }
.case-body { padding: clamp(20px, 4vw, 40px); display: grid; gap: 28px; }
.case-body section { display: grid; gap: 10px; }
.case-body h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.case-body h3 { font-size: 1.05rem; }
.case-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--blush); }
.case-body p { color: var(--blush); }
.case-intro { display: grid; gap: 12px; }
.case-intro .lede { color: var(--muted); }

.copy-box { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.copy-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy-block { display: grid; gap: 4px; font-size: 0.92rem; overflow-wrap: anywhere; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 24px; margin: 0; }
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt, .how dt {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.facts dd, .how dd { margin: 0; color: var(--blush); }
.how { margin: 0; display: grid; gap: 6px 0; }
.how dd + dt { margin-top: 10px; }

.case-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.shot { margin: 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.shot img, .shot video { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-sunk); }
.shot figcaption { font-size: 0.85rem; color: var(--muted); }
.case-more { font-size: 0.92rem; }
.case-more a { color: var(--muted); }
.case-more a:hover { color: var(--text); }

@media (max-width: 600px) {
  .case {
    width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; inset: 0;
    border: 0; border-radius: 0;
  }
  .case-bar {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .case-body { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
}

/* Video player */
.player {
  width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text);
}
.player::backdrop { background: rgb(5 5 8 / 0.82); }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; }
.player-title { font-weight: 600; overflow-wrap: anywhere; }
.player-frame { aspect-ratio: var(--aspect, 16 / 9); max-height: calc(100vh - 110px); margin-inline: auto; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--muted); font-size: 0.92rem; }
.foot a:hover { color: var(--text); }

@media (max-width: 820px) {
  .bios { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .top nav { gap: 10px; }
  .mark span { display: none; }
}
/* Touch screens: every button and nav link at least 44px tall, the size fingers need. */
@media (pointer: coarse) {
  .button { min-height: 44px; }
  .button.small { padding: 10px 16px; }
  .top nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }
}
