/* Residencia site — shared chrome on top of ds/styles.css */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-app) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex; align-items: center; gap: 16px 28px;
  min-height: 64px; flex-wrap: wrap; padding: 10px 24px;
}
@media (max-width: 1020px) {
  .brand .by { display: none; }
  .site-header .bar { gap: 8px 14px; }
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand .name {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  letter-spacing: -0.02em; font-size: 1.05rem;
}
.brand .by {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 2px;
}
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
  padding: 8px 12px; border-radius: var(--radius-md); color: var(--text-secondary);
}
.site-nav a:hover { background: var(--surface-hover); color: var(--text-primary); }
.site-nav a.active { color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.site-nav a.cta {
  background: var(--accent); color: var(--text-on-accent); font-weight: var(--fw-semibold);
  margin-left: 8px;
}
.site-nav a.cta:hover { background: var(--accent-hover); color: #fff; }
.site-nav .lang-toggle { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; border: 1px solid var(--border-strong); border-radius: 99px; padding: 6px 12px; cursor: pointer; }

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-label); line-height: var(--lh-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted);
  display: block; margin-bottom: 16px;
}
.eyebrow .tick { color: var(--accent); }

/* ---------- crop-mark frame ---------- */
.frame { position: relative; padding: 40px; }
.frame::before, .frame::after,
.frame > .fm::before, .frame > .fm::after {
  content: ""; position: absolute; width: 26px; height: 26px;
  border: 0 solid currentColor;
}
.frame::before { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; }
.frame::after { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; }
.frame > .fm::before { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; }
.frame > .fm::after { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section-head { margin-bottom: 48px; max-width: 760px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); font-weight: var(--fw-bold); text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.125rem); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); font-weight: var(--fw-bold); text-wrap: balance; }
h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: var(--ls-h4); font-weight: var(--fw-semibold); }
.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--text-secondary); max-width: 62ch; }
p { max-width: 68ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: var(--fw-semibold); font-size: var(--fs-sm);
  padding: 12px 22px; border-radius: var(--radius-md); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur-fast, 120ms), color var(--dur-fast, 120ms);
}
.btn.primary { background: var(--accent); color: var(--text-on-accent); }
.btn.primary:hover { background: var(--accent-hover); color: #fff; }
.btn.ghost { border-color: var(--border-strong); color: var(--text-primary); }
.btn.ghost:hover { background: var(--surface-hover); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: border-color 180ms;
}
.card:hover { border-color: var(--border-strong); }

/* ---------- work / video cards ---------- */
.work-card {
  position: relative; display: block; text-decoration: none;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-inverse);
  aspect-ratio: 16 / 10; cursor: pointer;
}
.work-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: transform 300ms, opacity 300ms; }
.work-card:hover img { transform: scale(1.03); opacity: 1; }
.work-card .meta {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 22, 33, 0.88));
  color: var(--text-oninverse);
}
.work-card .meta .t { display: block; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 1rem; }
.work-card .meta .s { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; margin-top: 3px; }
.work-card .play {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px;
  border-radius: 50%; background: var(--accent); color: var(--noturno-900);
  display: grid; place-items: center; font-size: 15px;
}

/* ---------- video modal ---------- */
.vmodal {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(0, 22, 33, 0.9); padding: 4vh 4vw;
}
.vmodal.open { display: grid; place-items: center; }
.vmodal .box { width: min(1100px, 100%); aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; position: relative; }
.vmodal iframe { width: 100%; height: 100%; border: 0; }
.vmodal .close {
  position: absolute; top: -0px; right: 0; z-index: 2;
  background: var(--accent); border: 0; color: var(--noturno-900);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  padding: 8px 14px; cursor: pointer; border-radius: 0 0 0 8px;
}

/* ---------- marquee-ish client rows ---------- */
.clients {
  display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline;
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 1.05rem; color: var(--text-muted);
}
.clients span:nth-child(3n) { color: var(--text-secondary); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; }
.site-footer .top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.site-footer .units { display: flex; flex-direction: column; gap: 6px; }
.site-footer a { text-decoration: none; color: var(--text-secondary); font-size: var(--fs-sm); }
.site-footer a:hover { color: var(--text-primary); }
.site-footer .meta-row {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
}

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease-entrance, ease-out), transform 500ms var(--ease-entrance, ease-out); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- placeholder chip ---------- */
.ph {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  padding: 3px 8px; border-radius: 4px; display: inline-block;
}
