/* studio_page.css — Phase K public studio page.
   Reuses the homepage.css token set; do not introduce parallel
   variables here. */

/* ── Sticky branded header (1+3 iframe protection) ────────────── */
.ta-portfolio-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 16px;
  background: var(--ink); color: var(--bone);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--border-2);
}
.ta-portfolio-bar-brand img {
  height: 22px; width: auto; display: block;
}
/* v0.5.093 — embed-mode header logo: slightly larger, aligns inline
   with the "Portfolio supplied by TimberAtlas" eyebrow text. */
.ta-portfolio-bar--embed .ta-portfolio-bar-brand img {
  height: 24px;
}
.ta-portfolio-bar--embed { gap: 8px; }
/* v0.5.095 — embed header restyled to light grey for visual breathing
   room. Overrides the dark .ta-portfolio-bar base (which still applies
   on the non-embed studio page). */
.ta-portfolio-bar--embed {
  background: #f5f5f5;
  color: #1a1a1a;
  border-bottom: 1px solid #e5e5e5;
}
.ta-portfolio-bar--embed .ta-portfolio-bar-label,
.ta-portfolio-bar--embed .ta-portfolio-bar-text { color: #1a1a1a; }
.ta-portfolio-bar-text {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.ta-portfolio-bar-label { opacity: 0.85; }

/* v0.5.092 — embed-mode sticky bar variant: same look, plus a right-
   aligned CTA that escapes the iframe to the canonical studio page on
   timberatlas.com (target=_blank). */
.ta-portfolio-bar--embed .ta-portfolio-bar-cta {
  margin-left: auto;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  /* v0.5.095 — dark filled pill for contrast on light-grey embed bar */
  color: #fff; text-decoration: none;
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  padding: 5px 10px;
  opacity: 0.95;
  transition: opacity 120ms ease, background-color 120ms ease;
}
.ta-portfolio-bar--embed .ta-portfolio-bar-cta:hover {
  opacity: 1; background: #000;
}

/* v0.5.092 — embed footer (centered logo + attribution, whole row is
   a single link). Mirrors the sticky-bar token set. */
.ta-embed-footer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 16px;
  /* v0.5.095 — light-grey embed footer to match restyled header */
  background: #f5f5f5; color: #1a1a1a;
  text-decoration: none;
  border-top: 1px solid #e5e5e5;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.ta-embed-footer-text { color: #1a1a1a; }
/* v0.5.093 — embed-mode footer logo: bumped to 32px for parity with
   the header brand mark, kept centered with the attribution text. */
.ta-embed-footer-logo { height: 32px; width: auto; display: block; }
.ta-embed-footer-text { opacity: 0.85; }
.ta-embed-footer:hover .ta-embed-footer-text { opacity: 1; }

/* v0.5.092 — embed mode body tweaks: single full-width column (no
   sticky aside), tighter top padding (no hero). */
body.studio-page.is-embedded .studio-main {
  padding: 16px 24px 0;
}
body.studio-page.is-embedded .studio-body-grid--embed {
  grid-template-columns: 1fr !important;
  gap: 0;
}
body.studio-page.is-embedded .studio-section { margin: 0 0 24px; }

/* In embed mode, hide everything outside the studio surface but
   keep the branded bar (CSS-protected via !important — the parent
   page cannot suppress it, because we set the rule). */
body.studio-page.is-embedded > .footer,
body.studio-page.is-embedded > .nav {
  display: none !important;
}

/* ── Layout ───────────────────────────────────────────────────── */
.studio-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px 64px;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
}

.studio-section {
  margin: 48px 0;
}

/* Portfolio map+list view (map on top, compact list below) +
   list↔marker hover emphasis now live in the shared static/map_list.css,
   loaded before this sheet. The .portfolio-map height override below is
   intentionally kept page-specific. */

/* v0.5.081 — desktop 2-column body. Main column gets about + projects
   + videos; sidebar gets the contact form, sticky below the site
   header. Mobile (<1024px) collapses to a single column; the aside
   sits below the main column per source order.
   The hero stays full-width above the grid (no change to hero CSS). */
.studio-body-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 12px;
}
.studio-body-main > .studio-section:first-child,
.studio-body-aside > .studio-section:first-child {
  margin-top: 0;
}
@media (min-width: 1024px) {
  .studio-body-grid {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 48px;
  }
  .studio-body-aside {
    position: sticky;
    top: 96px;            /* clears the global nav (~80px) + breathing room */
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

.studio-section-head {
  display: flex; align-items: baseline; gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.studio-section-title {
  font-size: 18px; font-weight: 500;
  font-family: var(--mono); letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.studio-section-count {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted-2); letter-spacing: 0.04em;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.studio-hero {
  display: flex; align-items: center; gap: 24px;
  padding: 36px 0 12px;
  border-bottom: 1px solid var(--border);
}

.studio-hero-logo {
  width: 96px; height: 96px;
  border: 1px solid var(--border);
  background: var(--bone);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
}

.studio-hero-logo img {
  max-width: 88%; max-height: 88%; object-fit: contain;
}

.studio-hero-placeholder {
  font-family: var(--mono);
  font-size: 40px;
  color: var(--muted-2);
}

.studio-hero-row {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}

.studio-hero-name {
  font-size: 36px; font-weight: 600;
  margin: 0; line-height: 1.1;
}

.studio-hero-address {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); letter-spacing: 0.04em;
  margin-top: 8px; text-transform: uppercase;
}
.studio-hero-website {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.04em; margin-top: 4px;
}
.studio-hero-website a { color: var(--forest); text-decoration: none; }
.studio-hero-website a:hover { text-decoration: underline; }

/* ── Tier badge ───────────────────────────────────────────────── */
.tier-badge {
  display: inline-block;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid currentColor;
}
/* `tier-{{ level }}` — since 735-401 level is free or pro and nothing
   else, so there is no third rule to write. */
.tier-free     { color: var(--muted); }
.tier-pro      { color: #1d4ed8; }

/* ── Portfolio toggle ─────────────────────────────────────────────
   v0.5.334 — uses the shared .view-toggle pill (homepage.css). Only the
   right-alignment + vertical centering inside the section head is
   scoped here; the pill styling itself is the catalog source of truth. */
.studio-section-head .view-toggle {
  margin-left: auto;
  align-self: center;
}

/* ── Portfolio grid ───────────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.portfolio-tile {
  display: block; color: inherit; text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bone);
  transition: border-color 0.15s ease;
}
.portfolio-tile:hover { border-color: var(--ink); }

.portfolio-thumb {
  /* position:relative — the shared credit overlay (.img-meta) is inset:0
     absolute and needs this as its containing block (735-231). */
  position: relative;
  width: 100%; aspect-ratio: 4 / 3;
  background: var(--bone-2);
  overflow: hidden;
}
.portfolio-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.portfolio-meta { padding: 10px 12px 12px; }
.portfolio-name { font-weight: 500; font-size: 14px; line-height: 1.3; }
.portfolio-sub  {
  margin-top: 4px;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portfolio-map {
  width: 100%; height: 460px;
  border: 1px solid var(--border);
}

/* ── Description ──────────────────────────────────────────────── */
.studio-description {
  max-width: 720px;
  font-size: 15px; line-height: 1.6;
  color: var(--ink);
}
.studio-description p { margin: 0 0 14px; }
.studio-description a { color: var(--ink); text-decoration: underline; }

/* ── Videos ───────────────────────────────────────────────────── */
.studio-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.studio-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bone-2);
}
.studio-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

/* ── Contact form ─────────────────────────────────────────────── */
.studio-section--contact {
  background: var(--bone-2);
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.studio-contact-form {
  max-width: 640px;
  display: flex; flex-direction: column; gap: 14px;
}
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-label {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.studio-contact-form input,
.studio-contact-form textarea {
  font: 14px/1.45 'Inter', sans-serif;
  padding: 9px 11px;
  border: 1px solid var(--border-2);
  background: var(--bone);
  color: var(--ink);
}
.studio-contact-form input:focus,
.studio-contact-form textarea:focus {
  outline: none; border-color: var(--ink);
}
.form-note {
  font-size: 11px; color: var(--muted-2); font-style: italic;
}
.form-success {
  border: 1px solid #2f855a; background: #f0fff4; color: #1b4332;
  padding: 10px 12px;
}
.form-error {
  border: 1px solid #c53030; background: #fff5f5; color: #742a2a;
  padding: 10px 12px;
}

/* ── Shared contact partial (shared/_contact_form.html) ───────────
   The company studio/supplier pages adopt the ONE contact component.
   Its classes (.ta-contact*) are styled here with the site tokens so
   the palette matches these pages (author.html keeps its own inline
   look). Generic .form-row/.form-label/.form-note/.btn-primary above
   apply to the partial as-is. */
.ta-contact {
  background: var(--bone-2);
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.ta-contact-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.ta-contact-title {
  font-size: 18px; font-weight: 500;
  font-family: var(--mono); letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.ta-contact-form {
  max-width: 640px;
  display: flex; flex-direction: column; gap: 14px;
}
.ta-contact-form input,
.ta-contact-form textarea {
  font: 14px/1.45 'Inter', sans-serif;
  padding: 9px 11px;
  border: 1px solid var(--border-2);
  background: var(--bone);
  color: var(--ink);
}
.ta-contact-form input:focus,
.ta-contact-form textarea:focus {
  outline: none; border-color: var(--ink);
}
.form-consent {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; line-height: 1.4; color: var(--muted);
}
.form-consent input { margin-top: 2px; }
.ta-contact-gate-note {
  margin: 12px 0 0; padding: 14px 16px;
  font-size: 14px; line-height: 1.5;
  background: var(--bone); border: 1px solid var(--border-2);
  border-radius: 6px; color: var(--muted);
}
.ta-contact-gate-link {
  margin-left: 6px; color: var(--ink); font-weight: 500;
  border-bottom: 1px solid currentColor; text-decoration: none;
}

.btn-primary, .btn-secondary {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 11px 22px; cursor: pointer;
  border: 1px solid var(--ink);
}
.btn-primary  { background: var(--ink); color: var(--bone); }
.btn-primary:hover  { background: #000; }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--bone-2); }

/* ── Embed modal ──────────────────────────────────────────────── */
.studio-embed-offer { padding: 12px 0; }
.embed-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
/* `display:flex` above otherwise beats the UA's [hidden]{display:none}
   and the modal would paint visible on first load. */
.embed-modal[hidden] { display: none; }
.embed-modal-inner {
  background: var(--bone); border: 1px solid var(--ink);
  max-width: 560px; width: 100%;
  padding: 22px 24px;
}
.embed-modal-title {
  font-family: var(--mono); font-size: 14px;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin: 0 0 10px;
}
.embed-modal-note {
  font-size: 13px; color: var(--muted); margin: 0 0 12px;
}
.embed-snippet {
  width: 100%; min-height: 100px; resize: vertical;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 10px; border: 1px solid var(--border-2);
  background: var(--bone-2); color: var(--ink);
}
.embed-modal-actions {
  display: flex; gap: 10px; margin-top: 14px;
  justify-content: flex-end;
}

/* ── Attribution footer ───────────────────────────────────────── */
.studio-attribution {
  margin-top: 60px;
  font-size: 12px; color: var(--muted);
  text-align: center;
}
.studio-attribution a { color: inherit; text-decoration: underline; }

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state {
  padding: 40px;
  text-align: center; color: var(--muted);
  border: 1px dashed var(--border-2);
}
.empty-title { font-size: 14px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .studio-main { padding: 16px 18px 48px; }
  .studio-hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .studio-hero-name { font-size: 28px; }
  .studio-section-head { flex-wrap: wrap; }
  .studio-section-head .view-toggle { margin-left: 0; }
}

/* v0.5.094 — role line on portfolio grid + map list. Small, secondary
   color, mirrors .portfolio-sub but uses the muted ink so the city/year
   line still leads. */
.portfolio-role {
  font-size: 11px; color: var(--muted-2);
  font-family: var(--mono); letter-spacing: 0.02em;
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* .portfolio-map-list .pml-role moved to shared static/map_list.css */

/* v0.5.094 — Analytics placeholder card in sidebar. Same padding/border
   chrome as the contact section it sits under. */
.analytics-placeholder-note {
  font-size: 13px; color: var(--muted-2);
  margin: 0;
}
