@font-face { font-family: "Neue Corp"; src: url("assets/fonts/PPNeueCorp-CompactRegular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neue Corp"; src: url("assets/fonts/PPNeueCorp-CompactMedium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Neue Corp"; src: url("assets/fonts/PPNeueCorp-CompactSemibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Neue Corp"; src: url("assets/fonts/PPNeueCorp-CompactBold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #EFEEEA;
  --panel: #E6E4DF;
  --ink: #16101A;
  --muted: #77727A;
  --line: #C2BFB9;
  --red: #F23A2E;
  --gut: clamp(16px, 2.3vw, 32px);
  --font: "Neue Corp", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.accent { color: var(--red); }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gut) 18px;
}
.brand { display: flex; align-items: baseline; gap: 6px; text-decoration: none; }
.brand img { width: 150px; height: auto; display: block; }
.brand span { font-size: 13px; white-space: nowrap; }
.bar-link { font-size: 15px; text-decoration: none; }
.bar-link:hover { color: var(--red); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 30%);
  border-bottom: 1px solid var(--line);
}
.hero-main { padding: clamp(36px, 5vw, 80px) var(--gut) clamp(28px, 3vw, 40px); }
.eyebrow { font-size: 18px; margin-bottom: 18px; }
h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(48px, 7.2vw, 116px);
  line-height: .9;
  letter-spacing: -0.025em;
}
.hero-side {
  border-left: 1px solid var(--line);
  padding: clamp(36px, 5vw, 80px) var(--gut) clamp(28px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 14px; justify-content: flex-end;
  font-size: 18px;
}
.coords { margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.marker {
  position: absolute; width: 9px; height: 9px; background: var(--red);
  bottom: -5px; right: calc(30% - 5px);
}

/* ---------- Search ---------- */
.search-wrap { padding: 28px var(--gut) 0; }
.search {
  display: flex; align-items: stretch;
  border: 1px solid var(--ink);
  background: var(--bg);
  min-height: 64px;
  cursor: text;
}
.search:focus-within { box-shadow: 0 0 0 3px rgba(242,58,46,.18); border-color: var(--red); }
.search-label {
  display: flex; align-items: center;
  padding: 0 18px; border-right: 1px solid var(--ink);
  font-weight: 500;
}
.search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: clamp(18px, 2vw, 24px); color: var(--ink);
  padding: 0 18px;
}
.search input::placeholder { color: var(--muted); opacity: .75; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search kbd {
  align-self: center; margin-right: 14px;
  font-family: inherit; font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); padding: 2px 7px;
}
.search-count {
  display: flex; align-items: center; white-space: nowrap;
  padding: 0 18px; border-left: 1px solid var(--ink);
  font-variant-numeric: tabular-nums;
}
.search-count span { color: var(--red); margin-right: 4px; }

/* ---------- Filters ---------- */
.filters {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--bg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px;
  padding: 14px var(--gut);
  border-bottom: 1px solid var(--line);
}
.filter-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filter-title { font-size: 13px; color: var(--muted); white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent;
  padding: 6px 11px 5px; font-size: 15px; line-height: 1;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-size: 11px; opacity: .6; font-variant-numeric: tabular-nums; }
.chip[disabled] { opacity: .35; cursor: default; }
.reset {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  color: var(--red); font-size: 15px; padding: 6px 0;
}

/* ---------- List ---------- */
main { padding: 0 var(--gut); }
.list-head, .row-main {
  display: grid;
  grid-template-columns: 44px 132px minmax(0, 1fr) 110px 150px minmax(0, 230px) 36px;
  gap: 24px;
}
.list-head {
  padding: 22px 0 10px;
  font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
.list { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); }
.row-main {
  align-items: start;
  padding: 18px 0;
  cursor: pointer;
  width: 100%; text-align: left;
  background: none; border: 0;
}
.row-main:hover .title { color: var(--red); }
.row-main:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.num { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 4px; }

/* thumbnail: placeholder proporțional cu formatul real */
.thumb {
  position: relative;
  width: 132px; height: 100px;
  background: var(--panel);
  display: grid; place-items: center;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--bg);
}
.frame::after { /* colț roșu, ca markerii din prezentare */
  content: ""; position: absolute; width: 5px; height: 5px; background: var(--red);
  right: -3px; bottom: -3px;
}
.frame.web::before { /* bara de browser */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  border-bottom: 1px solid var(--ink);
  background: radial-gradient(circle at 5px 3px, var(--ink) 1.2px, transparent 1.6px),
              radial-gradient(circle at 10px 3px, var(--ink) 1.2px, transparent 1.6px);
}
.thumb-tag {
  position: absolute; left: 6px; bottom: 5px;
  font-size: 10px; color: var(--muted); letter-spacing: .02em;
}

.title { font-size: 24px; font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; transition: color .15s; }
.objective { margin-top: 8px; color: var(--muted); font-size: 16px; max-width: 58ch; }
.cat { font-size: 15px; padding-top: 4px; }
.cat::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--red); margin-right: 7px; vertical-align: 1px; }

.roles { list-style: none; margin: 0; padding: 4px 0 0; font-size: 15px; display: grid; gap: 3px; }
.roles li { display: flex; align-items: center; gap: 7px; color: var(--line); }
.roles li::before { content: ""; width: 8px; height: 8px; border: 1px solid currentColor; }
.roles li.on { color: var(--ink); }
.roles li.on::before { background: var(--ink); border-color: var(--ink); }

.dims { list-style: none; margin: 0; padding: 4px 0 0; font-size: 15px; display: grid; gap: 3px; font-variant-numeric: tabular-nums; }

.toggle {
  width: 32px; height: 32px; border: 1px solid var(--ink);
  display: grid; place-items: center; font-size: 18px; line-height: 1;
  transition: background .2s;
}
.toggle::before { content: "+"; display: block; transition: transform .2s; }
.row.open .toggle { background: var(--ink); color: var(--bg); }
.row.open .toggle::before { transform: rotate(45deg); }

/* detalii extinse */
.detail {
  display: grid;
  grid-template-columns: 44px 132px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 4px 0 26px;
}
.detail[hidden] { display: none; }
.detail h4 { margin: 0 0 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.detail ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.detail ul li::before { content: "- "; color: var(--muted); }
.detail .spacer { grid-column: span 2; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span { font-size: 13px; border: 1px solid var(--line); padding: 3px 7px 2px; }
.btn {
  display: inline-flex; align-items: stretch; margin-top: 16px;
  border: 1px solid var(--ink); text-decoration: none; font-weight: 500;
}
.btn span:first-child { padding: 11px 14px; min-width: 150px; }
.btn-arrow { border-left: 1px solid var(--ink); padding: 11px 14px; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:hover .btn-arrow { border-color: var(--bg); }

.only-m { display: none; }
mark { background: rgba(242,58,46,.16); color: inherit; }

.empty { padding: 60px 0; font-size: 18px; }
.empty-title { font-size: 40px; margin-bottom: 8px; }

/* ---------- Footer ---------- */
.foot {
  margin-top: 80px;
  display: grid; grid-template-columns: 1fr minmax(260px, 30%);
  border-top: 1px solid var(--line);
}
.foot > div:first-child { padding: 48px var(--gut) calc(48px + env(safe-area-inset-bottom, 0px)); }
.foot-big { font-size: clamp(36px, 5vw, 64px); line-height: .95; letter-spacing: -0.02em; }
.foot-meta {
  border-left: 1px solid var(--line);
  padding: 48px var(--gut) calc(48px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .list-head, .row-main { grid-template-columns: 36px 110px minmax(0, 1fr) 140px minmax(0, 190px) 32px; }
  .list-head span:nth-child(4), .row-main .cat { display: none; }
  .thumb { width: 110px; height: 84px; }
  .detail { grid-template-columns: 36px 110px repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .hero, .foot { grid-template-columns: 1fr; }
  .hero-side, .foot-meta { border-left: 0; border-top: 1px solid var(--line); }
  .hero-side { padding-top: 24px; }
  .marker { display: none; }
  .bar-link { display: none; }
  .coords { display: none; }

  .search { min-height: 54px; }
  .search-label, .search kbd { display: none; }
  .search input { padding: 0 14px; font-size: 18px; }
  .search-count { padding: 0 12px; font-size: 14px; }

  .filters { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px var(--gut); }
  .filter-group { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; }
  .filter-title { white-space: normal; font-size: 12px; line-height: 1.1; }
  .chip { padding: 6px 9px 5px; font-size: 14px; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; min-width: 0;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .reset { margin-left: 0; text-align: left; }

  .list-head { display: none; }
  .row-main {
    grid-template-columns: 96px minmax(0, 1fr) 32px;
    grid-template-areas: "thumb body toggle" "thumb meta meta";
    gap: 10px 14px;
  }
  .num { display: none; }
  .thumb { grid-area: thumb; width: 100px; }
  .row-main .body { grid-area: body; }
  .row-main .cat { display: none; }
  .toggle { grid-area: toggle; }
  .roles { grid-area: meta; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
  .row-main > .dims { display: none; }
  .title { font-size: 21px; }
  .objective { font-size: 15px; }

  .detail { grid-template-columns: 1fr; gap: 18px; }
  .detail .spacer { display: none; }
  .only-m { display: block; }
  .thumb { height: 76px; }
}
