.ref-page {
  background: #f3f5f4;
}

.ref-page .home-matrix-rain {
  opacity: 0.055;
}

.ref-page .site-header {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(23, 23, 23, 0.07);
}

.ref-main {
  --ref-serif: Georgia, "Times New Roman", serif;
  --ref-border: #dce0de;
  --ref-paper: #fff;
  --ref-focus: var(--red-deep);
  padding-top: 20px;
}

.ref-main :is(a, button, summary):focus-visible {
  outline: 2px solid var(--ref-focus);
  outline-offset: 4px;
}

.ref-main :is(#websites, #web-anwendungen, #aurum-preview, #aurum-mobile-preview, #a-escolha-mobile-preview, #lager-solution-preview, #zion-reference) {
  scroll-margin-top: 138px;
}

.ref-hero {
  --ref-focus: #fff;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(540px, 74svh, 740px);
  overflow: hidden;
  padding: clamp(28px, 6.5vw, 92px);
  border-radius: 22px;
  background: #231b1b;
  color: #fff;
}

.ref-hero-image,
.ref-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ref-hero-image {
  object-fit: cover;
  object-position: 55% 53%;
}

.ref-hero::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(16, 12, 12, 0.97), rgba(20, 13, 13, 0.78) 35%, rgba(24, 15, 15, 0.22) 76%),
    linear-gradient(0deg, rgba(19, 13, 13, 0.76), transparent 45%);
  content: "";
}

.ref-hero-content {
  position: relative;
  max-width: 680px;
  padding-bottom: 24px;
}

.ref-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: #fff;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.ref-kicker::before {
  width: 28px;
  height: 2px;
  background: var(--red-bright);
  content: "";
}

.ref-hero h1 {
  margin: 0;
  color: #fff;
  font-family: var(--ref-serif);
  font-size: clamp(3.3rem, 7vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -0.064em;
  line-height: 0.98;
}

.ref-hero h1 span,
.ref-hero h1 em {
  display: block;
}

.ref-hero h1 em {
  color: #ffe2df;
  font-weight: 400;
}

.ref-hero-lead {
  max-width: 39ch;
  margin: 24px 0 28px;
  color: #f1ece9;
  font-size: clamp(0.97rem, 1.6vw, 1.15rem);
  line-height: 1.65;
}

.ref-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ref-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.ref-button-primary {
  background: var(--red-deep);
}

.ref-button-primary::after,
.ref-section-link::after {
  margin-left: 0.65rem;
  content: "↓" / "";
}

.ref-button-primary:hover {
  background: #8b1317;
}

.ref-button-outline {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(21, 16, 16, 0.65);
}

.ref-button-outline:hover {
  border-color: #fff;
  background: #322525;
}

.ref-hero-credit {
  position: absolute;
  right: clamp(20px, 5vw, 62px);
  bottom: 23px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 10px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-decoration: none;
}

.ref-hero-credit::after,
.ref-link-primary::after {
  content: "↗" / "";
}

.ref-hero-credit:hover,
.ref-section-link:hover,
.ref-project-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ref-projects {
  margin-top: clamp(54px, 7vw, 100px);
}

.ref-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 22px;
}

.ref-section-head h2,
.ref-main .aurum-showcase h2 {
  margin: 0;
  font-family: var(--ref-serif);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.051em;
  line-height: 1;
}

.ref-section-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--red-deep);
  font-size: 0.85rem;
  font-weight: 800;
}

.ref-card-grid,
.ref-app-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(12px, 2.2vw, 24px);
}

.ref-card {
  overflow: hidden;
  border: 1px solid var(--ref-border);
  border-radius: 16px;
  background: var(--ref-paper);
}

.ref-card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #221b1b;
}

.ref-card-image:focus-visible {
  outline-offset: -5px !important;
  --ref-focus: #fff;
}

.ref-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease;
}

.ref-card-image:hover img {
  transform: scale(1.04);
}

.ref-card[data-app="riviera"] img {
  object-position: 50% 63%;
}

.ref-card[data-app="engine"] img {
  object-fit: contain;
  background: #141a1b;
}

.ref-project-body {
  min-width: 0;
  padding: clamp(16px, 2.2vw, 25px);
}

.ref-project-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.32rem, 1.75vw, 1.63rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.ref-project-intro,
.ref-details p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.62;
}

.ref-project-intro {
  margin: 10px 0 12px;
}

.ref-project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 14px;
}

.ref-card-link,
.ref-app-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  gap: 7px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.ref-link-primary {
  color: var(--red-deep);
}

.ref-details {
  margin-top: 7px;
  border-top: 1px solid var(--ref-border);
}

.ref-details summary {
  width: fit-content;
  padding: 10px 0 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.ref-details p {
  margin: 10px 0 0;
}

.ref-app-list {
  display: grid;
  gap: 10px;
}

.ref-app {
  border: 1px solid var(--ref-border);
  border-radius: 14px;
  background: var(--ref-paper);
}

.ref-app .ref-project-body {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(220px, 1.5fr) minmax(175px, 1fr);
  align-items: center;
  gap: 7px 20px;
}

.ref-app .ref-project-intro {
  margin: 0;
}

.ref-app .ref-project-links {
  justify-content: flex-end;
}

.ref-app .ref-details {
  grid-column: 1 / -1;
  width: 100%;
}

.invoice-promo {
  position: fixed;
  width: min(640px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100% - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid #e1d6d3;
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 30px 96px rgba(28, 15, 14, 0.37);
}

.invoice-promo[open] {
  display: grid;
  grid-template-columns: minmax(148px, 32%) minmax(0, 1fr);
  animation: invoice-promo-in 280ms ease-out both;
}

.invoice-promo::backdrop {
  background: rgba(26, 21, 21, 0.67);
}

html:has(.invoice-promo[open]) {
  overflow: hidden;
}

#invoice-promo-open[hidden] {
  display: none;
}

.invoice-promo form {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
}

.invoice-promo-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #ded7d5;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
}

.invoice-promo-close:hover {
  border-color: var(--red-deep);
  color: var(--red-deep);
}

.invoice-promo :is(a, button):focus-visible {
  outline: 2px solid var(--red-deep);
  outline-offset: 4px;
}

.invoice-promo-art {
  display: grid;
  min-height: 128px;
  place-items: center;
  padding: 26px;
  background: linear-gradient(150deg, #6b2227, #301e20);
}

.invoice-promo-sheet {
  display: flex;
  width: min(124px, 100%);
  aspect-ratio: 4 / 5;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  transform: rotate(-8deg);
  border-radius: 10px;
  background: #fff4f1;
  color: #8b1317;
  box-shadow: 8px 12px 0 rgba(28, 15, 14, 0.25);
}

.invoice-promo-sheet span {
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.invoice-promo-sheet::after {
  display: block;
  height: 39px;
  background: repeating-linear-gradient(#d2aba4 0 2px, transparent 2px 12px);
  content: "";
}

.invoice-promo-content {
  padding: 48px clamp(22px, 5vw, 42px) 34px;
}

.invoice-promo-content h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.04;
  text-wrap: balance;
}

.invoice-promo-content p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.invoice-promo-content .invoice-promo-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 9px;
  margin: 19px 0;
}

.invoice-promo-price strong {
  color: var(--red-deep);
  font-size: 1.8rem;
  font-weight: 800;
}

.invoice-promo-action::after {
  content: none;
}

@keyframes invoice-promo-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.ref-main .aurum-showcase {
  --ref-focus: #fff;
  margin: clamp(54px, 7vw, 100px) 0;
  border-color: #3e3030;
  border-radius: 20px;
  background: linear-gradient(145deg, #2d2020, #151313 70%);
}

.ref-main .aurum-showcase .eyebrow {
  color: #ffb1ab;
}

.ref-main .aurum-device {
  scroll-margin-top: 138px;
}

.ref-main .compact-cta {
  border-radius: 20px;
}

@media (max-width: 920px) {
  .ref-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ref-app .ref-project-body {
    grid-template-columns: minmax(0, 2fr) minmax(125px, 1fr);
  }

  .ref-app .ref-project-intro {
    grid-column: 1;
  }

  .ref-app .ref-project-links {
    grid-row: 1 / span 2;
    grid-column: 2;
  }
}

@media (max-width: 590px) {
  .invoice-promo[open] {
    grid-template-columns: minmax(0, 1fr);
  }

  .invoice-promo-content {
    padding: 22px 22px 26px;
  }

  .invoice-promo-sheet {
    width: 68px;
    min-height: 79px;
    gap: 8px;
    padding: 8px;
  }

  .invoice-promo-sheet::after {
    height: 23px;
    background: repeating-linear-gradient(#d2aba4 0 2px, transparent 2px 7px);
  }

  .ref-main {
    padding-top: 12px;
  }

  .ref-hero {
    align-items: end;
    min-height: min(625px, 76svh);
    padding: 28px 20px 58px;
    border-radius: 18px;
  }

  .ref-hero h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .ref-hero-content {
    padding-bottom: 0;
  }

  .ref-hero::before {
    background: linear-gradient(0deg, rgba(19, 13, 13, 0.98), rgba(19, 13, 13, 0.75) 48%, rgba(19, 13, 13, 0.16) 100%);
  }

  .ref-hero-lead {
    margin: 16px 0 21px;
  }

  .ref-hero-credit {
    bottom: 13px;
  }

  .ref-card-grid,
  .ref-app .ref-project-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .ref-app .ref-project-links {
    grid-area: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .ref-page .site-header {
    grid-template-columns: minmax(44px, 1fr) auto auto;
  }

  .ref-page .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-items: center;
    gap: 0;
    overflow: visible;
    padding: 0;
  }

  .ref-page .site-nav a {
    padding-block: 6px;
  }

  .ref-page .lang-switch,
  .ref-page .flag-language-switch__group {
    width: 105px;
    min-width: 105px;
    height: 46px;
  }

  .ref-page .flag-language-switch__option {
    padding-left: 12px;
  }

  .ref-page .flag-language-switch__option img {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .ref-page .header-cta {
    width: auto;
    min-width: 0;
    padding-inline: 12px;
    font-size: 0.77rem;
  }

  .ref-main :is(#websites, #web-anwendungen, #aurum-preview, #aurum-mobile-preview, #a-escolha-mobile-preview, #lager-solution-preview, #zion-reference) {
    scroll-margin-top: 156px;
  }
}

@media (max-width: 360px) {
  .ref-page .brand-image {
    max-width: 48px;
  }

  .ref-page .lang-switch,
  .ref-page .flag-language-switch__group {
    width: 96px;
    min-width: 96px;
  }

  .ref-hero {
    min-height: 70svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .invoice-promo[open] {
    animation: none;
  }

  .ref-button,
  .ref-card-image img {
    transition: none;
  }
}
