:root {
  --ink: #171717;
  --paper: #f2f0ea;
  --white: #fff;
  --line: rgba(23, 23, 23, 0.18);
  --muted: #696862;
  --blue: #1261a6;
  --cobalt: #274b9b;
  --sky: #2799f6;
  --silver: #b8bec9;
  --mini: #866432;
  --motorrad: #5b7fc9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--white);
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.wordmark img {
  width: clamp(190px, 18vw, 245px);
  height: auto;
}

.topbar-meta {
  display: flex;
  gap: clamp(1.4rem, 4vw, 4rem);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  gap: clamp(2rem, 5vw, 7rem);
  align-items: center;
  padding: clamp(3rem, 6vw, 6.5rem) clamp(1.25rem, 4vw, 4.5rem);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 770px;
  font-size: clamp(4rem, 7.3vw, 8.5rem);
  line-height: 0.82;
  letter-spacing: -0.075em;
}

.hero h1 em {
  font-family: var(--serif);
  font-weight: 400;
}

.hero-intro {
  max-width: 490px;
  margin: 2.5rem 0 1.7rem;
  color: #4e4d49;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
  line-height: 1.5;
}

.text-link {
  display: inline-flex;
  gap: 0.8rem;
  align-items: center;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero-gallery {
  position: relative;
  min-height: min(690px, 71vw);
}

.hero-gallery figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: #ddd;
}

.hero-gallery img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-gallery:hover img {
  transform: scale(1.025);
}

.hero-main {
  top: 6%;
  left: 2%;
  z-index: 2;
  width: 74%;
  height: 66%;
}

.hero-main figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.94);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-side {
  width: 38%;
  height: 32%;
}

.hero-side-top {
  top: 0;
  right: -4%;
}

.hero-side-bottom {
  right: 4%;
  bottom: 4%;
  z-index: 3;
}

.hero-index {
  position: absolute;
  bottom: 5%;
  left: 1%;
  color: var(--silver);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.project-note {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.72fr;
  gap: clamp(2rem, 6vw, 7rem);
  align-items: end;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 4vw, 4.5rem);
  background: var(--ink);
  color: var(--paper);
}

.project-note h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.2vw, 6.2rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.project-note > p {
  margin: 0;
  color: #c9c6bd;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  line-height: 1.55;
}

.project-stats {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.project-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.project-stats dt {
  color: var(--silver);
  font-size: 2rem;
  font-weight: 800;
}

.project-stats dd {
  margin: 0;
  color: #d5d2ca;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editorial {
  padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 4vw, 4.5rem);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 440px);
  gap: 3rem;
  align-items: end;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.8vw, 6.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.45;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 1.5rem 0 2.5rem;
}

.filter {
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter:hover,
.filter:focus-visible,
.filter.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

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

.post-card {
  --brand-color: var(--blue);
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(23, 23, 23, 0.11);
  box-shadow: 0 8px 30px rgba(20, 20, 20, 0.025);
}

.post-card[data-brand="MINI"] {
  --brand-color: var(--mini);
}

.post-card[data-brand="BMW Motorrad"] {
  --brand-color: var(--motorrad);
}

.post-card[hidden] {
  display: none;
}

.post-card.is-approved {
  outline: 2px solid var(--brand-color);
  outline-offset: -2px;
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #deddd8;
}

.card-media img {
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.media-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem;
  pointer-events: none;
}

.media-arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.15rem;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease;
}

.media-arrow:hover,
.media-arrow:focus-visible {
  background: var(--white);
  transform: scale(1.06);
}

.media-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.45rem 0.6rem;
  background: rgba(23, 23, 23, 0.82);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.brand-chip,
.category {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.brand-chip {
  color: var(--brand-color);
}

.category {
  color: var(--muted);
  text-align: right;
}

.card-kicker {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.post-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.1vw, 2.35rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.hook {
  margin: 1.25rem 0 0.8rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--brand-color);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
}

.post-copy {
  margin: 0;
  color: #494843;
  font-size: 0.88rem;
  line-height: 1.62;
}

.cta-copy {
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
}

.hashtags {
  margin: 0.85rem 0 1.2rem;
  color: var(--brand-color);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.source-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
  text-transform: uppercase;
}

.validation-note {
  margin-top: 1.2rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.validation-note summary {
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.validation-note p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.card-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1rem;
}

.approve-control {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--sky);
  color: var(--white);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.approve-control input {
  width: 20px;
  height: 20px;
  accent-color: var(--cobalt);
}

.date-control {
  display: grid;
  gap: 0.3rem;
}

.date-control span {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-control input {
  width: 142px;
  min-height: 42px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.75rem;
}

.approval-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.5fr);
  gap: 3rem;
  align-items: center;
  padding: clamp(3.5rem, 7vw, 7rem) clamp(1.25rem, 4vw, 4.5rem);
  background: var(--cobalt);
  color: var(--white);
}

.approval-title-wrap h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 5.6rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.approval-title-wrap > p:last-child {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.approval-actions {
  width: min(100%, 520px);
  display: grid;
  gap: 1rem;
  justify-items: center;
  justify-self: end;
}

.form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button {
  min-height: 56px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(23, 23, 23, 0.17);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.button-dark {
  background: var(--ink);
  color: var(--white);
}

.button-light {
  background: var(--white);
  color: var(--ink);
}

.button-accent {
  width: 100%;
  min-height: 62px;
  border-color: var(--white);
  border-radius: 999px;
  background: var(--white);
  color: var(--cobalt);
}

.approval-email {
  width: 100%;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: end;
  padding: 3.5rem clamp(1.25rem, 4vw, 4.5rem);
  background: var(--ink);
  color: #bbb8b0;
  font-size: 0.68rem;
  line-height: 1.5;
}

footer p {
  margin: 0;
}

.footer-wordmark {
  display: flex;
  align-items: center;
}

.footer-wordmark img {
  width: clamp(180px, 16vw, 235px);
  height: auto;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99;
  max-width: min(360px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 7vw, 6.5rem);
  }

  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-note {
    grid-template-columns: 1fr 1fr;
  }

  .project-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .project-stats div {
    padding-right: 1.2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
  }

  .project-stats div + div {
    padding-left: 1.2rem;
  }
}

@media (max-width: 780px) {
  .topbar-meta span:first-child {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 18vw, 6rem);
  }

  .hero-gallery {
    min-height: 520px;
  }

  .hero-main {
    width: 78%;
    height: 58%;
  }

  .hero-side {
    width: 43%;
    height: 30%;
  }

  .project-note,
  .section-heading,
  .approval-panel {
    grid-template-columns: 1fr;
  }

  .project-stats {
    grid-column: auto;
  }

  .approval-actions {
    justify-self: stretch;
  }

  .approval-email {
    margin: 0;
  }

  footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 72px;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
  }

  .topbar-meta {
    display: none;
  }

  .hero-gallery {
    min-height: 420px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .project-stats {
    display: block;
  }

  .project-stats div,
  .project-stats div + div {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .card-controls {
    grid-template-columns: 1fr;
  }

  .date-control input {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
