/* RETROCHANGE entry page */

:root {
  color-scheme: light;

  --ink: #10211f;
  --muted: #566763;
  --line: #dde4e0;
  --bg: #f5f7f5;
  --surface: #ffffff;
  --brand: #0e4f4c;
  --brand-dark: #0a2f2d;
  --tag: #e9f1ee;

  --radius: 16px;
  --gutter: 32px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Logo bar */

.brand-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 10px;
}

.logos {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logos a { display: block; border-radius: 4px; }

/* EOSC Gravity logo and project name, read as one unit */

.lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lockup__rule {
  width: 1px;
  height: 24px;
  background: #8b9391;
}

.lockup__name {
  color: #1c1c1c;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
}

.lockup__name:hover { color: var(--brand); }

.logos__rule {
  width: 1px;
  height: 36px;
  background: var(--line);
}

.logo-tuzvo { width: auto; height: 54px; }

.logo-eu { width: auto; height: 32px; }

/* Title band */

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: 20px;
  padding: 28px 36px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10, 47, 45, .96) 0%, rgba(10, 47, 45, .84) 55%, rgba(10, 47, 45, .62) 100%),
    url("../img/hero.jpg") center / cover no-repeat var(--brand-dark);
}

.intro h1 {
  font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.375rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.intro p {
  margin-top: 8px;
  max-width: 60ch;
  color: #d6e4e0;
  font-size: 1rem;
}

.facts {
  display: flex;
  flex: none;
  gap: 28px;
}

.facts > div {
  width: 104px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .28);
}

.facts dt {
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.facts dd {
  margin-top: 4px;
  color: #d6e4e0;
  font-size: .75rem;
  line-height: 1.3;
}

/* Section headings */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  margin: 32px 0 14px;
}

.section-head h2 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -.01em;
}

.section-head p {
  color: var(--muted);
  font-size: .9375rem;
}

/* Card grids */

.grid { display: grid; gap: 20px; }

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

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

/* Cards: the whole card is one link */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #b9cbc5;
  box-shadow: 0 14px 32px -16px rgba(10, 47, 45, .4);
}

.card:focus-visible { border-radius: var(--radius); }

.card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1024 / 601;
  background: var(--brand-dark);
}

.card--uc .card__media { aspect-ratio: 16 / 10; }

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.card:hover .card__media img { transform: scale(1.03); }

/* Arrow badge, marks the card as an external link */

.card__arrow {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  transition: background-color .2s ease;
}

.card__arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 21 21 11M13 11h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 21 21 11M13 11h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.card:hover .card__arrow { background: var(--brand); }
.card:hover .card__arrow::before { background: #fff; }

/* Image labels on the use-case cards */

.chip {
  position: absolute;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(10, 30, 28, .78);
  color: #fff;
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1.5;
}

.chip--left { left: 8px; }
.chip--right { right: 8px; }

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.card__body > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.45;
}

.card--uc h3 { letter-spacing: .01em; }

.card__body > .card__lead {
  margin-top: 2px;
  color: var(--brand);
  font-size: .875rem;
  font-weight: 600;
}

.card--uc .card__body > p:not(.card__lead):not(.card__meta) { font-size: .875rem; }

.card__body > .card__meta {
  margin-top: auto;
  padding-top: 12px;
  color: var(--muted);
  font-size: .75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}

.tags li {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 500;
}

/* EOSC notebooks note */

.note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 24px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: .875rem;
}

.note__label {
  flex: none;
  color: var(--ink);
  font-weight: 600;
}

.note a {
  color: var(--brand);
  font-weight: 600;
  text-underline-offset: 2px;
}

/* Footer */

.footer {
  margin-top: 40px;
  padding-block: 36px 20px;
  background: var(--brand-dark);
  color: #c4d5d0;
  font-size: .875rem;
  line-height: 1.5;
}

.footer :focus-visible { outline-color: #fff; }

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px 56px;
}

.footer__name {
  margin-bottom: 8px;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: .03em;
}

.footer__brand p:last-child { max-width: 36ch; }

.footer h2 {
  margin-bottom: 10px;
  color: #8fb0a8;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.footer__list {
  display: grid;
  gap: 6px;
}

.footer__list--columns {
  grid-template-columns: repeat(2, minmax(0, max-content));
  column-gap: 32px;
}

.footer a {
  color: #fff;
  text-decoration: none;
  text-underline-offset: 3px;
}

.footer a:hover { text-decoration: underline; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: .8125rem;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

/* Service status line */

.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
}

.status[hidden],
.status__item[hidden] { display: none; }

.status__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.status__item svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #8fb0a8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status__state {
  color: #fff;
  font-weight: 600;
}

.status__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9fb3ae;
}

.status__state[data-level="ok"] .status__dot { background: #4ade80; }
.status__state[data-level="warn"] .status__dot { background: #fbbf24; }
.status__state[data-level="down"] .status__dot { background: #f87171; }

.footer a.status__item { text-decoration: underline; }

.footer .footer__legal a {
  font-weight: 600;
  text-decoration: underline;
}

/* Responsive */

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

@media (max-width: 1100px) {
  .status { order: -1; flex-basis: 100%; }
}

@media (max-width: 960px) {
  .intro { flex-direction: column; align-items: flex-start; }
  .facts { flex-wrap: wrap; }
  .grid--services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--services .card:last-child { grid-column: 1 / -1; flex-direction: row; }
  .grid--services .card:last-child .card__media { flex: 0 0 48%; aspect-ratio: auto; min-height: 210px; }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__brand p:last-child { max-width: none; }
}

/* All logos stay on one row: the project name moves under the Gravity logo */
@media (max-width: 720px) {
  .brand-bar__inner { flex-wrap: nowrap; gap: 10px; }
  .logos { gap: 10px; }
  .logos__rule,
  .lockup__rule { display: none; }
  .lockup { flex-direction: column; align-items: flex-start; gap: 3px; }
  .lockup__name { font-size: clamp(.6875rem, 3.5vw, .9375rem); letter-spacing: .1em; }
  .logo-gravity { width: clamp(96px, 32vw, 140px); height: auto; }
  .logo-tuzvo { flex: none; height: clamp(32px, 10.7vw, 48px); }
  .logo-eu { flex: none; height: clamp(19px, 6.4vw, 30px); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  .intro { margin-top: 16px; padding: 20px; }
  .facts { width: 100%; gap: 12px; }
  .facts > div { flex: 1 1 0; width: auto; padding-left: 10px; }
  .facts dt { font-size: 1.25rem; }

  .section-head { margin-top: 26px; }

  .grid { gap: 14px; }
  .grid--services,
  .grid--usecases { grid-template-columns: minmax(0, 1fr); }
  .grid--services .card:last-child { flex-direction: column; }
  .grid--services .card:last-child .card__media { flex: none; aspect-ratio: 1024 / 601; min-height: 0; }

  .note { flex-direction: column; gap: 2px; }

  .footer { margin-top: 32px; padding-top: 28px; }
  .footer__top { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card__media img,
  .card__arrow { transition: none; }
  .card:hover { transform: none; }
  .card:hover .card__media img { transform: none; }
}
