/* components.css — shared UI: layout, eyebrow, buttons, header, drawer,
   footer, cards, chips, placeholders, figures, lightbox, video facade, CTA band. */

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tint { background: var(--surface-tint); }
.section--page { background: var(--surface-page); }
.section--card { background: var(--surface-card); }

.section-head { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.section-head p:not(.eyebrow) { font-size: var(--text-lede); color: var(--ink-2); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--brand-600);
  line-height: var(--leading-snug);
}
.on-dark .eyebrow { color: var(--brand-300); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: calc(var(--tap) + var(--s-half));
  padding: var(--s-1) var(--s-3);
  border: var(--border-w) solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn svg { width: var(--icon-sm); height: var(--icon-sm); }
.btn--primary { background: var(--brand-600); color: var(--on-brand); box-shadow: var(--shadow-btn); }
.btn--primary:hover { background: var(--brand-700); color: var(--on-brand); }
.btn--outline { background: var(--surface-card); color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--text-on-dark); }
.btn--outline-light { background: transparent; color: var(--text-on-dark); border-color: var(--text-on-dark); }
.btn--outline-light:hover { background: var(--text-on-dark); color: var(--ink); }
.btn--sm { min-height: var(--tap); padding-inline: var(--s-3); font-size: var(--text-small); }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover svg { transform: translateX(var(--s-half)); }
  .btn svg { transition: transform var(--dur-fast) var(--ease); }
}
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- Arrow link ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: var(--tap);
  font-weight: var(--weight-semibold);
  font-size: var(--text-small);
  color: var(--link);
  text-decoration: none;
}
.link-arrow svg { width: var(--icon-sm); height: var(--icon-sm); transition: transform var(--dur-fast) var(--ease); }
.link-arrow:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .link-arrow:hover svg { transform: translateX(var(--s-half)); }
}

/* ---------- Brand lockup ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  display: grid;
  place-items: center;
  width: var(--mark-size);
  height: var(--mark-size);
  border: var(--border-w-2) solid var(--ink);
  border-radius: var(--radius-round);
  background: var(--surface-card);
  transition: width var(--dur) var(--ease), height var(--dur) var(--ease);
}
.brand__mark img { width: 64%; height: auto; }
.brand__text { display: grid; gap: var(--s-half); }
.brand__name {
  font-family: var(--font-serif);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.brand__tag {
  font-size: var(--text-min);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1;
}
.on-dark .brand, .on-dark .brand:hover { color: var(--text-on-dark); }
.on-dark .brand__mark { background: transparent; border-color: var(--text-on-dark); }
.on-dark .brand__tag { color: var(--text-on-dark-2); }
@media (max-width: 30em) {
  .site-header .brand__tag { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface-header);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: var(--header-h);
  transition: min-height var(--dur) var(--ease);
}
.site-header.is-slim { box-shadow: var(--shadow-header); }
.site-header.is-slim .site-header__inner { min-height: var(--header-h-slim); }
.site-header.is-slim .brand__mark { width: var(--mark-size-slim); height: var(--mark-size-slim); }

.site-nav { display: none; }
.site-nav ul { display: flex; align-items: center; gap: var(--s-1); }
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: var(--s-2);
  font-size: var(--text-small);
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--brand-600); text-decoration: underline; }
.site-nav li:last-child { margin-left: var(--s-2); }

.menu-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  background: transparent;
  border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
}
.menu-btn svg { width: var(--icon-md); height: var(--icon-md); }

@media (min-width: 64em) {
  .site-nav { display: block; }
  .menu-btn { display: none; }
}

/* No-JS: show the nav inline below the brand on small screens */
.no-js .menu-btn { display: none; }
.no-js .site-header__inner { flex-wrap: wrap; padding-block: var(--s-1); }
.no-js .site-nav { display: block; width: 100%; }
.no-js .site-nav ul { flex-wrap: wrap; }
@media (min-width: 64em) {
  .no-js .site-header__inner { flex-wrap: nowrap; }
  .no-js .site-nav { width: auto; }
}

/* ---------- Drawer ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  background: var(--surface-scrim);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.scrim[hidden] { display: none; }
.scrim.is-open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  width: var(--drawer-w);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-2) var(--s-3) var(--s-4);
  background: var(--surface-page);
  box-shadow: var(--shadow-drawer);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform var(--dur) var(--ease), visibility 0s; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; }
.drawer__title { font-family: var(--font-serif); font-size: var(--text-h4); color: var(--ink); }
.drawer nav ul { display: grid; }
.drawer nav a {
  display: flex;
  align-items: center;
  min-height: calc(var(--tap) + var(--s-1));
  border-bottom: var(--border-w) solid var(--line);
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  color: var(--ink);
  text-decoration: none;
}
.drawer nav a:hover { color: var(--brand-600); }
.drawer__social { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.drawer .btn { width: 100%; }
.no-js .drawer, .no-js .scrim { display: none; }

/* ---------- Icon helpers ---------- */
.icon-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-circle {
  display: grid;
  place-items: center;
  width: var(--icon-circle);
  height: var(--icon-circle);
  border-radius: var(--radius-round);
  background: var(--surface-icon);
  color: var(--ink);
}
.icon-circle svg { width: var(--icon-md); height: var(--icon-md); }

/* ---------- Placeholder frame ---------- */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--placeholder-a), var(--placeholder-b));
  color: var(--ink-2);
}
.ph__mark { position: absolute; width: 38%; max-width: 12rem; opacity: 0.12; }
.ph__brief {
  position: relative;
  max-width: 34ch;
  margin: var(--s-2);
  padding: var(--s-1) var(--s-2);
  background: var(--surface-card);
  border: var(--border-w) dashed var(--line-dashed);
  border-radius: var(--radius-sm);
  font-size: var(--text-min);
  line-height: var(--leading-snug);
  text-align: center;
}
.ph__brief strong { display: block; color: var(--brand-600); letter-spacing: var(--tracking-wide); text-transform: uppercase; font-weight: var(--weight-semibold); }

/* ---------- Draft chips ---------- */
.chips { display: grid; gap: var(--s-1); }
.chip {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: var(--s-1) var(--s-2);
  background: var(--surface-chip);
  border-radius: var(--radius-sm);
  font-size: var(--text-min);
  color: var(--ink-3);
}
.chip svg { width: var(--icon-sm); height: var(--icon-sm); color: var(--brand-600); }

/* ---------- Work card ---------- */
.work-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.work-card__media { aspect-ratio: 16 / 9; }
.work-card__body { display: flex; flex-direction: column; gap: var(--s-2); flex: 1; padding: var(--s-2) var(--s-2) var(--s-1); }
.work-card__title { font-size: var(--text-h3); line-height: 1.15; }
.work-card .link-arrow { margin-top: auto; }
.work-card .link-arrow::after { content: ""; position: absolute; inset: 0; }
.work-card:focus-within { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-offset); }
.work-card .link-arrow:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .work-card { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
  .work-card:hover { transform: translateY(calc(var(--s-half) * -1)); }
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding-block: var(--s-8);
}
.cta-band h2 { color: var(--text-on-dark); margin-block: var(--s-1) var(--s-1); }
.cta-band p:not(.eyebrow) { color: var(--text-on-dark); margin-bottom: var(--s-3); font-size: var(--text-lede); }
.cta-band__leaf {
  position: absolute;
  right: calc(var(--gutter) * -1);
  top: 50%;
  width: clamp(14rem, 30vw, 26rem);
  transform: translateY(-50%);
  color: var(--surface-deep);
  opacity: 0.7;
  pointer-events: none;
}
.cta-band .container { position: relative; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface-dark);
  color: var(--text-on-dark-2);
  border-top: var(--border-w) solid var(--line-dark);
  padding-block: var(--s-4) var(--s-3);
  font-size: var(--text-small);
}
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.site-footer .brand__mark { width: calc(var(--mark-size) * 1.3); height: calc(var(--mark-size) * 1.3); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; }
.footer-links li + li { border-left: var(--border-w) solid var(--line-dark); }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: var(--tap);
  padding-inline: var(--s-3);
  color: var(--text-on-dark);
  text-decoration: none;
}
.footer-links li:last-child a { padding-right: 0; }
.footer-links a:hover { text-decoration: underline; color: var(--text-on-dark); }
.footer-links svg { width: var(--icon-md); height: var(--icon-md); }
.site-footer__legal { margin-top: var(--s-3); color: var(--text-on-dark-2); font-size: var(--text-min); }
@media (max-width: 40em) {
  .footer-links li:first-child a { padding-left: 0; }
}

/* ---------- Figures + lightbox ---------- */
.figure { display: grid; gap: var(--s-1); }
.figure__frame { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.figure figcaption { font-size: var(--text-small); color: var(--ink-3); }
.figure button.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }

.lightbox {
  width: min(92vw, 80rem);
  max-height: 92vh;
  padding: var(--s-2);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}
.lightbox::backdrop { background: var(--surface-scrim); }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox__close { position: absolute; top: var(--s-1); right: var(--s-1); }
.lightbox__cap { margin-top: var(--s-1); font-size: var(--text-small); color: var(--ink-3); }

/* ---------- Video facade ---------- */
.video-facade { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-deep); }
.video-facade button { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-facade__play {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--tap) * 1.6); height: calc(var(--tap) * 1.6);
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border-radius: var(--radius-round);
  background: var(--brand-600); color: var(--on-brand);
}
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
