/* Saleno. One-person video studio. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #15181d;
  --bg-2: #1c2027;
  --line: #2d323b;
  --text: #eeeae2;
  --muted: #aaa69e;
  --accent: #f0b65e;
  --accent-ink: #15181d;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.875rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);

  --space: clamp(4rem, 2.5rem + 6vw, 8rem);
  --wrap: 75rem;
  --gutter: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd {
  margin: 0;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

main:focus {
  outline: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip:focus {
  top: 1rem;
}

/* Placeholder tokens stay visible on purpose until real assets arrive. */
mark.ph {
  background: rgba(240, 182, 94, 0.12);
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 3px;
  padding: 0 0.3em;
  font-family: var(--sans);
  font-size: 0.85em;
  letter-spacing: 0;
  white-space: normal;
}

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #f6c97f;
  border-color: #f6c97f;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: var(--bg-2);
  border-color: var(--muted);
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.9375rem;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(21, 24, 29, 0.92);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
  .masthead {
    background: rgba(21, 24, 29, 0.78);
    backdrop-filter: blur(8px);
  }
}

.masthead-in {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
  margin-right: auto;
}

.nav ul {
  display: none;
  list-style: none;
  padding: 0;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
}

.nav a:hover {
  color: var(--text);
}

@media (min-width: 46rem) {
  .nav ul {
    display: flex;
  }
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) clamp(3rem, 2rem + 4vw, 6rem);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.identity {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  max-width: 17ch;
}

.asof {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero .actions {
  margin-top: 2rem;
}

.offer-lead {
  margin-top: 1.5rem;
  color: var(--muted);
}

.offer-lead a {
  color: var(--text);
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: 3.5rem;
  }
}

/* The reel is the one dramatic moment: a screen in a dark room. */
.reel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d0f12;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 80px -30px rgba(240, 182, 94, 0.28);
}

.reel--ph .reel-frame {
  display: grid;
  place-items: center;
  background:
    linear-gradient(to bottom, #0d0f12 0 12%, transparent 12% 88%, #0d0f12 88%),
    radial-gradient(ellipse at 50% 55%, #2a2b2c, #14161a 70%);
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Top corner, so the buttons never sit on top of the captions. */
.reel-controls {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.reel-controls[hidden] {
  display: none;
}

.reel-btn {
  min-height: 2.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(238, 234, 226, 0.4);
  border-radius: 999px;
  background: rgba(13, 15, 18, 0.75);
  color: var(--text);
  font: 500 0.875rem/1.2 var(--sans);
  cursor: pointer;
}

/* ---------- offers ---------- */

.offers {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
}

.offer-grid {
  display: grid;
}

.offer {
  padding-block: 2.5rem;
  display: grid;
  gap: 0.9rem;
  align-content: start;
  max-width: 34rem;
}

.offer + .offer {
  border-top: 1px solid var(--line);
}

.offer h3 {
  font-size: var(--step-3);
}

.offer-kind {
  color: var(--muted);
  margin-top: -0.4rem;
}

.offer-for {
  color: var(--muted);
}

.offer-cta {
  margin-top: 0.5rem;
}

@media (min-width: 46rem) {
  .offer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .offer {
    padding: 3rem 2.5rem 3rem 0;
  }

  .offer + .offer {
    border-top: 0;
    border-left: 1px solid var(--line);
    padding-left: 2.5rem;
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: var(--space) 0;
}

.section-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  max-width: 40rem;
}

.section-head h2 {
  font-size: var(--step-3);
}

.section-head p {
  color: var(--muted);
}

/* ---------- selected work ---------- */

.cases {
  display: grid;
  gap: 4rem;
}

.case-card {
  display: grid;
  gap: 1.75rem;
}

.case-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-2);
}

.case-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-card-body {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.case-card h3 {
  font-size: var(--step-3);
}

.case-card h3 a {
  text-decoration: none;
}

.case-card h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.case-result {
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.2;
  color: var(--accent);
}

.facts {
  display: grid;
  gap: 1.1rem;
}

.facts dt {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.facts dd {
  color: var(--muted);
  max-width: 38rem;
}

@media (min-width: 60rem) {
  .case-card {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 3rem;
    align-items: start;
  }
}

/* End-credits roll: every role, one name. */
.credits {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: grid;
  gap: 0.15rem;
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.35;
}

.credits li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.credit-role {
  text-align: right;
  color: var(--muted);
}

.credit-name {
  color: var(--text);
}

/* ---------- process ---------- */

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  border-top: 1px solid var(--line);
}

.steps li {
  counter-increment: step;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.2;
}

.steps li::before {
  content: counter(step);
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--accent);
  min-width: 1.25rem;
}

.process-body {
  margin-top: 2rem;
  max-width: 40rem;
  color: var(--muted);
}

@media (min-width: 46rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--line);
  }

  .steps li {
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 0;
    padding: 1.5rem 1.25rem 1.75rem 0;
  }

  .steps li + li {
    border-left: 1px solid var(--line);
    padding-left: 1.25rem;
  }
}

/* ---------- video facades and placeholders ---------- */

.yt {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-2);
}

.yt img,
.yt iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.yt--v {
  aspect-ratio: 9 / 16;
}

.yt-play {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(13, 15, 18, 0.78);
  box-shadow: 0 0 0 1px rgba(238, 234, 226, 0.35);
}

.yt-play svg {
  fill: var(--text);
  transform: translateX(1px);
}

.yt:hover .yt-play,
.yt:focus-visible .yt-play {
  background: var(--accent);
}

.yt:hover .yt-play svg,
.yt:focus-visible .yt-play svg {
  fill: var(--accent-ink);
}

.yt.is-playing {
  background: #000;
}

.media-ph {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 1rem;
  border-radius: 6px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}

.media-ph--v {
  aspect-ratio: 9 / 16;
}

.case-card-media .media-ph {
  height: 100%;
}

/* ---------- craft ---------- */

.craft-feature,
.craft-grid {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2.25rem 1.5rem;
}

.craft-feature {
  margin-bottom: 3rem;
}

.craft-grid + .craft-grid {
  margin-top: 3rem;
}

.craft-item {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.craft-item--feature .craft-title {
  font-size: var(--step-2);
  margin-top: 0.4rem;
}

/* Self-hosted video: poster first, native controls. */
.vid {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.vid--v {
  aspect-ratio: 9 / 16;
}

.vid video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.craft-title {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.25;
}

.craft-format {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}

.craft-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Vertical pieces sit in their own row, two across on phones. */
.craft-grid--v {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1rem;
}

@media (min-width: 40rem) {
  .craft-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .craft-grid--v {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .craft-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .craft-grid--v {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- dev ---------- */

.section--quiet .dev-row {
  display: grid;
  gap: 0.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.dev-row h2 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
}

.dev-row h3 {
  font-size: var(--step-2);
  margin-bottom: 0.4rem;
}

.dev-row p {
  color: var(--muted);
  max-width: 40rem;
}

@media (min-width: 46rem) {
  .section--quiet .dev-row {
    grid-template-columns: 12rem 1fr;
  }
}

/* ---------- contact ---------- */

.contact {
  margin-top: var(--space);
  padding-block: var(--space);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.contact h2 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1rem;
}

.contact-lead {
  font-family: var(--serif);
  font-size: var(--step-4);
  line-height: 1.04;
  max-width: 20ch;
  text-wrap: balance;
}

.contact-promise {
  margin-top: 1.25rem;
  font-size: var(--step-1);
  color: var(--muted);
}

.contact .actions {
  margin-top: 2.25rem;
}

.contact-email {
  font-size: var(--step-1);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

/* ---------- case study page ---------- */

.case {
  padding-block: 2.5rem 0;
}

.back a {
  color: var(--muted);
  font-size: 0.9375rem;
}

.case-head {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 50rem;
}

.case-head h1 {
  font-size: var(--step-4);
  line-height: 1.02;
}

.case-result--lg {
  font-size: var(--step-3);
  line-height: 1.12;
}

.credit-line {
  color: var(--muted);
}

.case-lead-media {
  margin-top: 2.75rem;
}

.media-caption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.case-cols {
  display: grid;
  gap: 3rem;
  margin-top: var(--space);
}

.case-cols h2,
.case-media h2,
.case-links h2 {
  font-size: var(--step-2);
  margin-bottom: 1rem;
}

.case-cols p,
.result-list {
  max-width: 38rem;
}

.result-list {
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
}

.result-list li::marker {
  color: var(--accent);
}

@media (min-width: 60rem) {
  .case-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }

  .case-cols .credits {
    font-size: 1.0625rem;
  }
}

.case-media,
.case-links {
  margin-top: var(--space);
}

.media-grid {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2rem 1.5rem;
}

@media (min-width: 46rem) {
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.link-list {
  padding-left: 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.case-cta {
  margin-top: var(--space);
  padding-block: 3rem var(--space);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.case-cta h2 {
  font-size: var(--step-3);
  max-width: 22ch;
}

.case-cta p {
  color: var(--muted);
  max-width: 38rem;
}

/* ---------- 404 ---------- */

.notfound {
  padding-bottom: var(--space);
}

.notfound h1 {
  font-size: var(--step-4);
  margin-bottom: 1.25rem;
}

.notfound p + p {
  margin-top: 2rem;
}

/* ---------- five-second test page ---------- */

.fst main {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.fst-step {
  width: min(100% - 2.5rem, 36rem);
  display: grid;
  gap: 1.25rem;
  padding-block: 3rem;
}

.fst-step h1 {
  font-size: var(--step-3);
}

.fst-step > .btn {
  justify-self: start;
}

.fst-step h1:focus {
  outline: none;
}

.fst-step[hidden],
.fst-stage[hidden] {
  display: none;
}

.fst-stage {
  position: fixed;
  inset: 0;
  background: var(--bg);
}

.fst-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.fst-count {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(13, 15, 18, 0.85);
  color: var(--text);
  font-size: 0.875rem;
}

.fst textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

.fst-note {
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}
