/* ─────────────────────────────────────────────────────────────────────────────
   Homepage: split editorial feature, black search strip, latest ads + events.
   At 1440px the masthead, the full feature, the search strip and the start of
   the latest listings must all be visible above the fold.
   ───────────────────────────────────────────────────────────────────────────*/

.home { display: grid; gap: 12px; padding-top: 12px; }

/* ── Feature ───────────────────────────────────────────────────────────────*/

.feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  border: var(--outline);
  border-radius: var(--radius);
  background: var(--paper);
  min-height: 0;
  text-decoration: none;
  color: var(--ink);
  /* A hard offset shadow, as a catalogue lays its hero plate on the page. */
  box-shadow: 6px 6px 0 var(--ink);
}
a.feature:hover { color: var(--ink); }
a.feature:hover .feature__image img { transform: scale(1.015); }
a.feature:hover .feature__panel { background: var(--accent-wash); }
a.feature:focus-visible { box-shadow: var(--focus); }

.feature__media {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  min-height: 300px;
}
.feature__image { position: absolute; inset: 0; }
.feature__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
@media (prefers-reduced-motion: reduce) {
  a.feature:hover .feature__image img { transform: none; }
}

.feature__label {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  background: var(--orange);
  border: var(--outline);
  color: var(--on-accent);
  padding: 4px 10px;
  font-family: var(--font-text);
  font-size: var(--micro);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: var(--offset-sm);
}

.feature__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(18px, 2.2vw, 34px);
  border-left: var(--outline);
  background: var(--paper);
  min-width: 0;
  transition: background-color .12s ease;
}
.feature__kicker {
  align-self: flex-start;
  padding: 2px 7px;
  border: var(--hairline) solid var(--ink);
  background: var(--amber);
  font-size: var(--micro);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.feature__title {
  font-size: clamp(44px, 5.4vw, 86px);
  line-height: .88;
  letter-spacing: -.015em;
  text-shadow: var(--display-shadow);
}
.feature__dek {
  font-family: var(--font-text);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0;
}
.feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  font-size: var(--small);
  color: var(--ink-mute);
  border-top: var(--hairline) solid var(--rule-soft);
  padding-top: 12px;
}

@media (max-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature__media { aspect-ratio: 4 / 3; min-height: 0; }
  .feature__panel { border-left: 0; border-top: var(--outline); gap: 10px; }
  .feature__title { font-size: clamp(38px, 11vw, 60px); }
}

/* ── Search strip ──────────────────────────────────────────────────────────*/

.search-strip {
  display: grid;
  grid-template-columns: minmax(170px, .9fr) repeat(3, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  background: var(--ink);
  color: var(--paper);
  padding: 12px clamp(12px, 1.4vw, 18px);
  border: var(--outline);
  box-shadow: 6px 6px 0 var(--orange);
}
.search-strip__title {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-style: var(--slant);
  font-weight: 700;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
  padding-bottom: 2px;
  text-shadow: 3px 3px 0 var(--orange-dark);
}
.search-strip .field > label {
  color: var(--rule-soft);
  font-size: 10px;
  letter-spacing: .12em;
}
.search-strip .select {
  background-color: var(--paper);
  border-color: var(--paper);
  min-height: 42px;
  padding-block: 7px;
  font-weight: 600;
  box-shadow: none;
}
.search-strip .btn { min-height: 42px; }

@media (max-width: 1080px) {
  .search-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-strip__title { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .search-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .search-strip .btn { grid-column: 1 / -1; }
}

/* ── Two-column lower deck ─────────────────────────────────────────────────*/

.home-deck {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr);
  gap: 14px;
  align-items: start;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  border-top: 6px solid var(--rule);
  box-shadow: inset 0 -2px 0 var(--rule);
  padding: 7px 0 6px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(22px, 2vw, 30px); text-shadow: var(--display-shadow); }
.section-head a { font-size: var(--micro); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.section-head a:hover { color: var(--accent-ink); }

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

/* ── Events rail ───────────────────────────────────────────────────────────*/

.events-rail { border-top: var(--rule-weight) solid var(--rule); padding-top: 7px; }
.events-rail > h2 { font-size: clamp(20px, 1.8vw, 26px); margin-bottom: 10px; }
.event-mini {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-top: var(--hairline) solid var(--rule-soft);
  text-decoration: none;
  color: var(--ink);
}
.event-mini:first-of-type { border-top: 0; padding-top: 0; }
.event-mini:hover { color: var(--ink); }
.event-mini:hover .event-mini__title { color: var(--accent-ink); }
.event-date {
  display: grid;
  place-items: center;
  align-content: center;
  background: var(--burgundy);
  border: var(--outline);
  color: var(--paper);
  aspect-ratio: 1 / .92;
  padding: 5px 0;
  line-height: 1;
  box-shadow: var(--offset-sm);
}
.event-date__month {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--rule-soft);
}
.event-date__day {
  font-family: var(--font-display);
  font-style: var(--slant);
  font-weight: 700;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}
.event-mini__title {
  font-family: var(--font-display);
  font-style: var(--slant);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.02;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.event-mini__meta { font-size: 12px; color: var(--ink-mute); line-height: 1.35; }

@media (max-width: 1000px) {
  .home-deck { grid-template-columns: minmax(0, 1fr); }
  .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Events come after the cars on mobile, as required. */
  .home-deck { display: flex; flex-direction: column; }
  .home-deck > * { width: 100%; }
  .latest-grid { order: 1; }
  .events-rail { order: 2; margin-top: 16px; }
}
@media (max-width: 430px) {
  .latest-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Editorial pages (Garāža, story detail) ────────────────────────────────*/

.page-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 18px 0 12px;
  border-bottom: var(--rule-weight) solid var(--rule);
  margin-bottom: 14px;
}
.page-title h1 { font-size: clamp(36px, 4vw, 58px); }
.page-title p { margin: 0; max-width: 56ch; color: var(--ink-soft); }

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
@media (max-width: 980px) { .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .story-grid { grid-template-columns: minmax(0, 1fr); } }

.story-card { text-decoration: none; color: var(--ink); display: grid; border: var(--outline); border-top-width: 4px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--offset-sm); }
.story-card:hover { color: var(--ink); border-color: var(--orange); box-shadow: 4px 4px 0 var(--orange); }
.story-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-deep); }
.story-card__media img { width: 100%; height: 100%; object-fit: cover; }
.story-card__body { padding: 10px 12px 12px; border-top: var(--outline); }
.story-card__gen {
  display: inline-block; margin-bottom: 5px; padding: 1px 6px;
  border: var(--hairline) solid var(--ink); background: var(--amber);
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.story-card__title {
  font-family: var(--font-display); font-style: var(--slant); font-weight: 700;
  font-size: 24px; line-height: .98; text-transform: uppercase; margin-bottom: 5px;
}
.story-card__dek { font-size: 13px; color: var(--ink-mute); line-height: 1.4; }

.gen-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.gen-filter a {
  padding: 5px 9px;
  border: var(--outline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}
.gen-filter a:hover { background: var(--paper-deep); }
.gen-filter a[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Story detail */
.story-hero { display: grid; gap: 0; border: var(--outline); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; box-shadow: var(--offset-sm); }
.story-hero__media { aspect-ratio: 21 / 9; overflow: hidden; background: var(--paper-deep); }
.story-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.story-hero__text {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
  gap: 18px;
  padding: 16px 18px;
  border-top: var(--hairline) solid var(--rule);
  background: var(--paper);
}
.story-hero__text h1 { font-size: clamp(36px, 5vw, 74px); line-height: .88; margin-bottom: 8px; }
.story-hero__sub { font-size: 17px; color: var(--ink-soft); margin: 0; max-width: 46ch; }
.story-hero__owner { border-left: var(--hairline) solid var(--rule-soft); padding-left: 16px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.story-hero__owner strong { display: block; font-family: var(--font-display); font-style: var(--slant); font-size: 24px; color: var(--ink); margin-bottom: 4px; }

.story-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, .8fr); gap: 18px; align-items: start; }
.story-body .prose { font-size: 17px; }
.story-specs { border: var(--outline); border-radius: var(--radius); overflow: hidden; background: var(--field); box-shadow: var(--offset-sm); }
.story-specs h2 { font-size: 20px; padding: 9px 12px; border-bottom: var(--hairline) solid var(--rule); margin: 0; background: var(--ink); color: var(--paper); }
.story-specs .spec-table th, .story-specs .spec-table td { padding: 7px 12px; }
.story-specs .spec-table tr:last-child th, .story-specs .spec-table tr:last-child td { border-bottom: 0; }
.story-listing {
  margin-top: 12px;
  border: var(--hairline) solid var(--orange);
  padding: 12px;
  background: var(--paper);
}
.story-listing h2 { font-size: 19px; margin-bottom: 6px; }

.story-gallery { margin-top: 18px; border-top: var(--rule-weight) solid var(--rule); padding-top: 10px; }
.story-gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 10px; }
.story-gallery figure { margin: 0; }
.story-gallery img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; border: var(--outline); }
.story-gallery figcaption { font-size: 12px; color: var(--ink-mute); padding-top: 4px; }

@media (max-width: 900px) {
  .story-hero__text { grid-template-columns: minmax(0, 1fr); }
  .story-hero__owner { border-left: 0; border-top: var(--hairline) solid var(--rule-soft); padding-left: 0; padding-top: 12px; }
  .story-body { grid-template-columns: minmax(0, 1fr); }
  .story-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .story-hero__media { aspect-ratio: 4 / 3; }
  .story-gallery__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Events page ───────────────────────────────────────────────────────────*/

.event-list { display: grid; gap: 0; border-top: var(--rule-weight) solid var(--rule); }
.event-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: var(--hairline) solid var(--rule);
  text-decoration: none;
  color: var(--ink);
}
.event-row:hover { background: var(--paper-deep); color: var(--ink); }
.event-row__date { display: grid; place-items: center; background: var(--ink); color: var(--paper); padding: 6px 0; }
.event-row__date .event-date__day { font-size: 32px; }
.event-row h3 { font-size: 24px; line-height: 1; margin-bottom: 3px; }
.event-row__meta { font-size: 13px; color: var(--ink-mute); }
.event-row__when { font-size: 14px; font-weight: 600; }
.event-row__when span { display: block; font-size: 12px; font-weight: 400; color: var(--ink-mute); }
.event-row__cta { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); white-space: nowrap; }

.event-cover { border: var(--outline); margin-bottom: 12px; }
.event-cover img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }

.past-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.past-grid a { text-decoration: none; color: var(--ink); }
.past-grid figure { margin: 0; }
.past-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border: var(--outline); }
.past-grid figcaption { font-size: 13px; padding-top: 5px; font-weight: 600; }

@media (max-width: 800px) {
  .event-row { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; }
  .event-row__when, .event-row__cta { grid-column: 2; }
  .past-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
