/* =====================================================================
   Autren Motors · brand page (/brand/)
   Logo tiles, colour swatches, type specimens, the voice table and the
   photo examples. Loaded only on that page (Base.astro's `brand` prop).
   ===================================================================== */

/* Brand guide · UI kit: one tab bar under the nav on both pages, black like the bar and the page header below
   it. The current tab is underlined in white. */
.brand-tabs { background: var(--black); color: var(--white); border-bottom: 1px solid var(--line-on-dark); }
.brand-tabs__row { display: flex; gap: var(--space-8); }
.brand-tabs a { display: flex; align-items: center; min-height: 56px; font-size: var(--text-sm); font-weight: var(--w-semibold); box-shadow: inset 0 -2px 0 transparent; transition: box-shadow var(--dur-fast) var(--ease-out); }
.brand-tabs a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--white); }
@media (hover: hover) and (pointer: fine) { .brand-tabs a:not([aria-current]):hover { box-shadow: inset 0 -2px 0 var(--line-on-dark); } }

.brand-intro__actions { display: grid; justify-items: center; gap: var(--space-5); margin-top: var(--space-2); }
.brand-sub { margin: var(--space-16) 0 var(--space-6); }

/* ---------- Logo ---------- */
.logo-stage { margin: 0; border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.logo-stage__art { display: grid; place-items: center; padding: var(--space-16) var(--space-6); }
/* The dashed box is the clear space: half the logo's height on every side. The logo is 1010 × 267,
   so padding p (a share of the box's width) solves p = 0.132 × (1 − 2p), which is 10.4%. */
.logo-stage__clear { width: min(100%, 680px); padding: 10.4%; outline: 1px dashed var(--line-strong); }
.logo-stage__clear img { width: 100%; height: auto; }
@media (max-width: 640px) { .logo-stage__art { padding: var(--space-8) var(--space-5); } }

.logo-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); }
.logo-foot > span { display: grid; gap: 2px; font-size: var(--text-sm); line-height: var(--lh-sm); }
.logo-foot b { font-size: var(--text-md); line-height: var(--lh-md); font-weight: var(--w-bold); }
.logo-foot .text-link { flex: none; }

.logo-versions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); margin-top: var(--space-6); }
.logo-version { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.logo-version .logo-foot { flex: 1; align-items: flex-start; }
.logo-version__ground { display: grid; place-items: center; aspect-ratio: 16 / 9; padding: var(--space-8); }
.logo-version__ground img { width: 78%; height: auto; }
.logo-version__ground img.is-mark { width: 30%; }
.logo-version__ground--black { background: var(--black); }
.logo-version__ground--emerald { background: var(--emerald); }
.logo-version__ground--white { background: var(--white); }
@media (max-width: 900px) { .logo-versions { grid-template-columns: minmax(0, 1fr); } }

/* What not to do: the main logo, misused, each with a cross. */
.logo-donts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.logo-dont p { margin-top: var(--space-3); font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--w-semibold); }
.logo-dont__ground { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; padding: var(--space-6); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.logo-dont__ground img { width: 72%; height: auto; }
.logo-dont__ground--stretch img { transform: scale(1.3, 0.7); }
.logo-dont__ground--recolour img { filter: hue-rotate(150deg) saturate(1.6); }
.logo-dont__ground--effects img { filter: drop-shadow(3px 3px 0 var(--emerald)) drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45)); }
.logo-dont__ground--busy { background: url("/assets/hero/showroom-800.webp") 40% 50% / cover; box-shadow: none; }
.logo-dont__x { position: absolute; top: var(--space-3); right: var(--space-3); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--black); color: var(--white); box-shadow: 0 0 0 2px var(--white); }
.logo-dont__x .ico { width: 16px; height: 16px; stroke-width: 2.5; }
@media (max-width: 900px) { .logo-donts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-4); } }

/* ---------- Colour ---------- */
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.swatch { display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--white); overflow: hidden; }
.swatch__chip { height: 160px; }
.swatch__chip--white { box-shadow: inset 0 -1px 0 var(--line); }
.swatch__body { display: grid; align-content: start; gap: var(--space-2); flex: 1; padding: var(--space-6); }
.swatch__name { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: var(--w-bold); letter-spacing: -0.02em; }
.swatch__use { font-size: var(--text-sm); line-height: var(--lh-sm); }
.swatch__values { display: grid; margin-top: var(--space-3); }
.swatch__values div { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-2); border-top: 1px solid var(--line); font-size: var(--text-sm); line-height: var(--lh-sm); }
.swatch__values dt { font-weight: var(--w-semibold); }
.swatch__values dd { font-variant-numeric: tabular-nums; }
.swatch__copy { justify-self: start; margin-top: var(--space-3); }
.swatch__copy .ico { width: 16px; height: 16px; }

.swatches--support { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-6); }
.swatch--row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: var(--space-4); }
.swatch--row .swatch__chip { width: 64px; height: 64px; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--line); }
.swatch--row .swatch__body { gap: 2px; padding: 0; }
.swatch--row .swatch__name { font-size: var(--text-md); line-height: var(--lh-md); letter-spacing: 0; }
.swatch--row .swatch__name span { font-weight: var(--w-regular); }
.swatch--row .swatch__copy { margin: 0; }
@media (max-width: 640px) {
  .swatch--row { grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
  .swatch--row .swatch__chip { width: 48px; height: 48px; }
  .swatch--row .swatch__copy { grid-column: 2; justify-self: start; }
}
@media (max-width: 900px) { .swatches, .swatches--support { grid-template-columns: minmax(0, 1fr); } .swatch__chip { height: 96px; } }

/* How much of each colour, as one bar. */
.mix { margin: var(--space-12) 0 0; }
.mix__bar { display: flex; height: 56px; border-radius: var(--r-input); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.mix__part { display: flex; align-items: center; min-width: 0; padding-inline: var(--space-4); font-size: var(--text-sm); font-weight: var(--w-semibold); }
.mix__part--white { background: var(--white); color: var(--black); }
.mix__part--black { background: var(--black); color: var(--white); }
.mix__part--emerald { background: var(--emerald); }
.mix figcaption { max-width: 72ch; margin-top: var(--space-4); font-size: var(--text-sm); line-height: var(--lh-sm); }

/* ---------- Type ---------- */
.type-face { display: grid; justify-items: start; gap: var(--space-4); }
.type-face__aa { margin-top: var(--space-4); font-size: clamp(120px, 16vw, 200px); line-height: 0.9; font-weight: var(--w-bold); letter-spacing: -0.05em; }
.type-face__name { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: var(--w-bold); letter-spacing: -0.02em; }
.type-face__weights { display: grid; gap: var(--space-1); font-size: var(--text-lg); line-height: var(--lh-lg); }
.type-face__weights span { margin-left: var(--space-1); }

.type-ladder { display: grid; }
.type-ladder li { display: grid; gap: var(--space-2); padding-block: var(--space-6); border-top: 1px solid var(--line); }
.type-ladder li:last-child { border-bottom: 1px solid var(--line); }
.type-ladder__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--text-xs); line-height: var(--lh-xs); }
.type-ladder__meta b { font-weight: var(--w-semibold); }
.type-ladder__h1 { font-size: var(--text-3xl); line-height: var(--lh-3xl); font-weight: var(--w-bold); letter-spacing: -0.035em; text-wrap: balance; }
.type-ladder__h2 { font-size: var(--text-2xl); line-height: var(--lh-2xl); font-weight: var(--w-bold); letter-spacing: -0.03em; text-wrap: balance; }
.type-ladder__title { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: var(--w-bold); letter-spacing: -0.015em; }
.type-ladder__body { font-size: var(--text-md); line-height: var(--lh-md); }
.type-ladder__small { font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }

/* ---------- Voice: what we say, beside what we don't ---------- */
.say { width: 100%; margin-top: var(--space-16); border-collapse: collapse; table-layout: fixed; }
.say th { padding: 0 var(--space-6) var(--space-3) 0; border-bottom: 1px solid var(--line-on-dark); text-align: left; font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--w-semibold); }
.say th .ico { width: 20px; height: 20px; margin-right: var(--space-2); padding: 4px; border-radius: 50%; vertical-align: -5px; stroke-width: 3; }
.say th:first-child .ico { background: var(--emerald); color: var(--white); }
.say th:last-child .ico { box-shadow: inset 0 0 0 1.5px var(--white); }
.say td { padding: var(--space-5) var(--space-6) var(--space-5) 0; border-bottom: 1px solid var(--line-on-dark); vertical-align: top; font-size: var(--text-lg); line-height: var(--lh-lg); }
.say td:first-child { font-weight: var(--w-bold); }
.say s { text-decoration-thickness: 1px; }
@media (max-width: 640px) {
  .say thead { display: none; }
  .say tr { display: grid; gap: var(--space-3); padding-block: var(--space-5); border-bottom: 1px solid var(--line-on-dark); }
  .say tr:first-child { border-top: 1px solid var(--line-on-dark); }
  .say td { display: grid; gap: 2px; padding: 0; border: 0; font-size: var(--text-md); line-height: var(--lh-md); }
  .say td::before { content: attr(data-label); font-size: var(--text-xs); line-height: var(--lh-xs); font-weight: var(--w-semibold); }
}

/* ---------- Photos: one big studio shot beside two smaller ones, all 4:3 ---------- */
.shots { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--space-6); }
.shot { display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; }
.shot:first-child { grid-row: span 2; }
.shot__img { overflow: hidden; border-radius: var(--r-card); background: var(--photo-well); aspect-ratio: 4 / 3; }
.shot:first-child .shot__img { aspect-ratio: auto; }
.shot__img img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: var(--space-3); font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--w-semibold); }
.brand-rules { margin-top: var(--space-10); }
@media (max-width: 900px) {
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot:first-child { grid-row: auto; }
  .shot:first-child .shot__img { aspect-ratio: 4 / 3; }
}
