/* Location: public/site.css */
/* What: Editorial layout for the holdings portfolio. */
/* Why: Match the light type system of the source site while keeping a portfolio structure. */
/* RELEVANT FILES: public/index.html, public/portfolio-ui.js, public/404.html */

:root {
  color-scheme: light;
  --ink: #111;
  --muted: rgba(0, 0, 0, 0.62);
  --line: #e4e4e1;
  --paper: #fff;
  --tile: #f3f3f1;
  --tile-ink: #161616;
  font-family: "Zen Kaku Gothic New", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: rgba(0, 0, 0, 0.82);
  font-size: 14px;
  line-height: 1.7;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  padding: 0.5rem 0.75rem;
}

.skip:focus { top: 0.5rem; }

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.icon-button,
.view-button,
.card,
.ghost {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.icon-button { padding: 0.4rem 0.2rem; }

.site-menu {
  display: flex;
  gap: 1.25rem;
  padding: 0.75rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}

.site-menu a { text-decoration: none; }

.site-menu[hidden] { display: none; }

.hero {
  max-width: 46rem;
  margin: 0 auto;
  padding: 5.5rem 1.25rem 3rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: Roboto, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

h1, h2, .card-name {
  font-family: Roboto, "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--ink);
}

h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); }

.lede {
  margin: 1.25rem auto 0;
  max-width: 36rem;
  color: var(--muted);
}

.featured-wrap { padding: 0 0 2.5rem; }

.scroller-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  max-width: 72rem;
  margin: 0 auto 0.75rem;
  padding: 0 1.25rem;
}

.ghost {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.scroller {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 1.25rem 0.5rem;
}

.scroller .card {
  flex: 0 0 min(78vw, 18rem);
  height: 24rem;
  scroll-snap-align: start;
  background: #ececea;
}

.portfolio {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }

#filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  padding: 1rem 0 1.25rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 12px;
}

select, input[type="search"] {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.45rem 0;
}

.view-switch { display: flex; gap: 0.4rem; justify-content: flex-end; }

.view-button {
  border-bottom: 1px solid transparent;
  padding: 0.45rem 0.1rem;
}

.view-button[aria-pressed="true"] { border-bottom-color: var(--ink); }

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 11rem;
  padding: 1.1rem;
  text-align: left;
  background: var(--tile);
  color: var(--tile-ink);
}

.card:focus-visible,
.icon-button:focus-visible,
.ghost:focus-visible,
.view-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.card-mark {
  margin-bottom: auto;
  font-family: Roboto, sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.card-label {
  font-family: Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-name { font-size: 1.15rem; }

.card-focus { color: var(--muted); }

.results.is-list { display: flex; flex-direction: column; }

.results.is-list .card {
  min-height: 0;
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  align-items: center;
  gap: 1rem;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.results.is-list .card-mark { display: none; }

.empty { color: var(--muted); }

.company {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 5rem;
}

.company dl {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.65rem 1rem;
  margin: 1.5rem 0 0;
}

.company dt { color: var(--muted); }

.company dd { margin: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

dialog {
  width: min(32rem, calc(100vw - 2rem));
  border: 1px solid var(--line);
  padding: 1.5rem;
}

dialog::backdrop { background: rgba(0, 0, 0, 0.28); }

.dialog-top { display: flex; justify-content: space-between; align-items: center; }

#detail-name { margin: 0.4rem 0; font-size: 2rem; }

.detail-link { display: inline-block; margin-top: 1rem; }

@media (max-width: 800px) {
  #filters, .results { grid-template-columns: 1fr 1fr; }
  .view-switch { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 560px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  #filters, .results, .company dl, .site-footer { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .results.is-list .card { grid-template-columns: 1fr; }
}
