/* ussi.group: one screen. Night ground, a silver sky, a serif line, the apps as a dock. */
@font-face { font-family: "Literata"; src: url("fonts/Literata-display.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/Literata-name.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-text.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --night: #0b0b0e;
  --ink: #f6f1e7;                 /* cream, not white */
  --ink-muted: #f6f1e794;
  --margin: clamp(1.25rem, 3.9vw, 3.5rem);
  --tile: clamp(4.25rem, 6.7vw, 6rem);
  --serif: "Literata", "New York", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0; min-height: 100svh; position: relative; overflow-x: clip;
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--night); color: var(--ink);
  font-family: var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 6px; }

/* the sky: Tabussi's alloy still with the colour taken out, fading into the ground */
.sky {
  position: absolute; inset: 0 0 auto 0; z-index: 0; width: 100%; height: 69svh; object-fit: cover; object-position: 50% 60%;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 100%); mask-image: linear-gradient(#000 30%, transparent 100%);
}
header, main, nav { position: relative; z-index: 1; }

header { padding: clamp(1.25rem, 2.4vw, 2.125rem) var(--margin); }
.brand { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; }

main { display: grid; place-items: center; padding: 1rem var(--margin) clamp(2rem, 9svh, 6rem); text-align: center; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 7.2vw, 6.5rem); line-height: 1; letter-spacing: -0.025em; }

/* the dock */
nav { padding: 0 var(--margin) clamp(2rem, 9svh, 5.25rem); }
.dock { display: flex; justify-content: center; gap: clamp(0.5rem, 1.9vw, 1.75rem); }
.dock li { width: clamp(8.25rem, 10.8vw, 9.75rem); }
.dock a, .dock div { display: block; text-align: center; }
.dock strong { display: block; margin-top: 1rem; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; letter-spacing: -0.01em; }
.dock small { display: block; margin-top: 0.2rem; font-size: 0.78125rem; color: var(--ink-muted); white-space: nowrap; }

/* One tile for every app: same size, same corners, same edge. Only the inside differs. */
.tile { position: relative; display: block; width: var(--tile); height: var(--tile); margin: 0 auto; border-radius: 23%; overflow: hidden; background: #17171c; transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1); }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #ffffff14, inset 0 1px 0 #ffffff33; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile img.mark { margin: auto; width: 60%; height: 60%; object-fit: contain; }
.tile > span { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 4%; font-family: var(--serif); font-weight: 400; font-size: calc(var(--tile) * 0.52); line-height: 1; }
/* each mark scaled to the same visual weight */
.mailussi { background: #ff4d3d; }  .mailussi img { transform: scale(1.18); }
.focussi { background: #0c0b0e; }   .focussi img { transform: scale(1.04); }
.tabussi img { transform: scale(1.12); }
.spotussi { background: #1a1c21; }
.coverussi { background: #000; }    .coverussi img { transform: scale(1.02); }

@media (hover: hover) and (pointer: fine) { .dock a:hover .tile { transform: translateY(-4px); } }
.dock a:active .tile { transform: scale(0.96); }

/* tablets and phones: the dock becomes three across, two rows */
@media (max-width: 63.99rem) {
  :root { --tile: clamp(4rem, 19vw, 6rem); }
  h1 { font-size: clamp(2.2rem, 11.6vw, 5.5rem); }
  .dock { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.75rem, 5vw, 3rem) 0.25rem; max-width: 34rem; margin-inline: auto; }
  .dock li { width: auto; }
}
@media (max-width: 30rem) {
  .dock strong { margin-top: 0.7rem; font-size: 1.0625rem; }
  .dock small { font-size: 0.71875rem; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  h1 { animation: rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .dock li { animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  .dock li:nth-child(1) { animation-delay: 240ms; } .dock li:nth-child(2) { animation-delay: 290ms; }
  .dock li:nth-child(3) { animation-delay: 340ms; } .dock li:nth-child(4) { animation-delay: 390ms; }
  .dock li:nth-child(5) { animation-delay: 440ms; } .dock li:nth-child(6) { animation-delay: 490ms; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }
