/* Loftsplit coming soon, in the LURIP teaser family (lurip.dev, riffbeam.com): a dark stage,
   a cone of light on the animated mark, CSS-only dust, a blinking "Wkrótce" and a two-part
   footer. Loftsplit adds a light theme, a floor-plan grid, rotating phrases and a worked
   bill split. No scripts: motion is CSS, scroll reveals use scroll-driven animations where the
   browser supports them and stay static elsewhere. Colours: docs/branding/current/theme.json. */
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/manrope-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/manrope-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0e0a0c;
  --surface: rgba(45, 32, 39, 0.6);
  --surface-solid: #1b1317;
  --border: rgba(112, 83, 97, 0.5);
  --text: #f8ecf1;
  --text-muted: #cdb5c0;
  --primary: #ff92af;
  --on-primary: #4f0920;
  --malina: #e73869;
  --gold: #ffc247;
  --shine: linear-gradient(100deg, #ff92af 0%, #ffc247 45%, #ff92af 90%);
  --cone-a: rgba(231, 56, 105, 0.14);
  --cone-b: rgba(255, 194, 71, 0.17);
  --glow: rgba(231, 56, 105, 0.24);
  --halo-a: rgba(231, 56, 105, 0.55);
  --halo-b: rgba(255, 194, 71, 0.45);
  --grid: rgba(248, 236, 241, 0.06);
  --dust-a: rgba(255, 146, 175, 0.85);
  --dust-b: rgba(255, 194, 71, 0.75);
  --seg-c: #ff92af;
  --seg-o: repeating-linear-gradient(135deg, #5a4450 0 6px, #46343e 6px 12px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fcf7f8;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --border: #ddcad2;
    --text: #30242a;
    --text-muted: #725b65;
    --primary: #bc2450;
    --on-primary: #ffffff;
    --shine: linear-gradient(100deg, #bc2450 0%, #831936 50%, #bc2450 100%);
    --cone-a: rgba(231, 56, 105, 0.07);
    --cone-b: rgba(255, 194, 71, 0.16);
    --glow: rgba(231, 56, 105, 0.12);
    --halo-a: rgba(231, 56, 105, 0.3);
    --halo-b: rgba(255, 194, 71, 0.45);
    --grid: rgba(48, 36, 42, 0.06);
    --dust-a: rgba(188, 36, 80, 0.55);
    --dust-b: rgba(200, 140, 20, 0.55);
    --seg-c: #831936;
    --seg-o: repeating-linear-gradient(135deg, #c9b3bd 0 6px, #e8dbe1 6px 12px);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope Variable', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-underline-offset: 0.2em;
}

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

/* Stage: everything behind the hero. */
.stage {
  position: absolute;
  inset: 0 0 auto;
  height: max(100vh, 760px);
  overflow: hidden;
  pointer-events: none;
}

/* A faint floor-plan grid: rooms drawn on graph paper, fading out from the centre. */
.plan {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 38%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 60% at 50% 38%, #000 30%, transparent 75%);
}

.cone {
  position: absolute;
  left: 50%;
  top: -10%;
  width: min(1000px, 170vw);
  height: 78%;
  transform: translateX(-50%);
  background: conic-gradient(
    at 50% 0%,
    transparent 160deg,
    var(--cone-a) 171deg,
    var(--cone-b) 180deg,
    var(--cone-a) 189deg,
    transparent 200deg
  );
  filter: blur(6px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  animation: breathe 7s ease-in-out infinite;
}

.pool {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(640px, 92vw);
  height: 160px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--glow), transparent);
}

.dust {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1000px, 170vw);
  height: 72%;
  transform: translateX(-50%);
  -webkit-mask-image: conic-gradient(at 50% 0%, transparent 162deg, #000 173deg, #000 187deg, transparent 198deg);
  mask-image: conic-gradient(at 50% 0%, transparent 162deg, #000 173deg, #000 187deg, transparent 198deg);
}

.dust::before,
.dust::after {
  content: '';
  position: absolute;
  inset: 0;
  animation: fall 46s linear infinite;
}

.dust::before {
  background-size: 260px 300px;
  background-image:
    radial-gradient(1.6px 1.6px at 30% 12%, var(--dust-a), transparent),
    radial-gradient(1.1px 1.1px at 62% 40%, var(--dust-b), transparent),
    radial-gradient(1.4px 1.4px at 48% 71%, var(--dust-a), transparent),
    radial-gradient(1px 1px at 80% 88%, var(--dust-b), transparent),
    radial-gradient(1.2px 1.2px at 12% 55%, var(--dust-a), transparent);
}

.dust::after {
  background-size: 190px 240px;
  background-image:
    radial-gradient(1px 1px at 20% 30%, var(--dust-b), transparent),
    radial-gradient(1.3px 1.3px at 70% 18%, var(--dust-a), transparent),
    radial-gradient(0.9px 0.9px at 44% 82%, var(--dust-b), transparent);
  animation-duration: 64s;
  opacity: 0.8;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

@keyframes fall {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 30px 1200px;
  }
}

/* Language switch, top right as on riffbeam.com. */
.lang {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.lang a,
.lang span {
  padding: 4px 2px;
  color: var(--text-muted);
  text-decoration: none;
}

.lang span {
  color: var(--text);
  border-bottom: 2px solid var(--primary);
}

.lang a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  padding: 48px 20px 88px;
  text-align: center;
}

.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(170px, 24vw, 260px);
  aspect-ratio: 1;
  animation: rise 1.6s ease-out both;
}

/* A slow ring of light turning behind the mark. */
.halo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--halo-a), transparent 35%, var(--halo-b), transparent 70%, var(--halo-a), transparent);
  filter: blur(30px);
  opacity: 0.8;
  animation: spin 14s linear infinite;
}

.logo {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.wordmark {
  display: block;
  width: clamp(150px, 15vw, 196px);
  height: auto;
  margin-top: -10px;
  animation: rise 1.6s 0.2s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

h1 {
  margin: 4px 0 0;
  max-width: 18ch;
  font-size: clamp(2rem, 5.4vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
  animation: rise 1.6s 0.35s ease-out both;
}

.shine {
  background: var(--shine);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 8s ease-in-out infinite;
}

@keyframes sweep {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* One phrase at a time, five phrases, three seconds each. */
.phrases {
  display: grid;
  margin: 0;
  min-height: 1.6em;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--text-muted);
}

.phrases span {
  --i: 0;
  grid-area: 1 / 1;
  opacity: 0;
  animation: phrase 15s ease-in-out infinite both;
  animation-delay: calc(var(--i) * 3s + 1s);
}

.phrases span:nth-child(2) {
  --i: 1;
}

.phrases span:nth-child(3) {
  --i: 2;
}

.phrases span:nth-child(4) {
  --i: 3;
}

.phrases span:nth-child(5) {
  --i: 4;
}

@keyframes phrase {
  0% {
    opacity: 0;
    transform: translateY(0.4em);
    filter: blur(4px);
  }
  3%,
  17% {
    opacity: 1;
    transform: none;
    filter: none;
  }
  20%,
  100% {
    opacity: 0;
    transform: translateY(-0.4em);
    filter: blur(4px);
  }
}

.soon {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.soon::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.scroll::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: nudge 2s ease-in-out infinite;
}

@keyframes nudge {
  50% {
    translate: 0 5px;
  }
}

/* Sections */
main {
  position: relative;
}

.section {
  width: min(100% - 32px, 70rem);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) 0 0;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.lead {
  margin: 0 0 32px;
  max-width: 44rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.card h3 {
  margin: 14px 0 6px;
  font-size: 1.125rem;
  font-weight: 750;
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

.icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  background: var(--malina);
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card:nth-child(even) .icon {
  background: var(--gold);
  stroke: #452c00;
}

.note {
  margin: 20px 0 0;
  color: var(--text-muted);
}

/* The worked bill split. */
.bill {
  margin: 0;
  max-width: 44rem;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-solid);
  box-shadow: 0 30px 80px -40px var(--glow);
}

.bill figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.bill figcaption strong {
  color: var(--text);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.bar {
  display: flex;
  gap: 4px;
  height: 18px;
  margin-bottom: 20px;
}

.seg {
  border-radius: 6px;
  transform-origin: left center;
}

.seg-a {
  width: 33.333%;
  background: var(--malina);
}

.seg-b {
  width: 16.667%;
  background: var(--gold);
}

.seg-c {
  width: 11.111%;
  background: var(--seg-c);
}

.seg-o {
  width: 38.889%;
  background: var(--seg-o);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-weight: 500;
}

th:first-child {
  text-align: left;
}

thead th {
  padding-top: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

tfoot th,
tfoot td {
  border-bottom: 0;
  font-weight: 800;
}

td {
  white-space: nowrap;
  padding-left: 12px;
}

td:nth-child(2) {
  color: var(--text-muted);
}

@media (min-width: 960px) {
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 56px;
    align-items: center;
  }

  .split .lead:last-child {
    margin-bottom: 0;
  }
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 3px;
  vertical-align: 0;
}

.dot-a {
  background: var(--malina);
}

.dot-b {
  background: var(--gold);
}

.dot-c {
  background: var(--seg-c);
}

.dot-o {
  background: var(--seg-o);
}

.formula {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Pilot */
.pilot {
  padding-bottom: 24px;
  text-align: center;
}

.pilot p {
  max-width: 36rem;
  margin: 0 auto 24px;
  color: var(--text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 10px 40px -10px var(--primary);
  transition: transform 0.2s;
}

.button:hover {
  transform: translateY(-2px);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: clamp(56px, 9vw, 112px);
  padding: 22px;
  font-size: 12px;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--text);
}

@media (max-width: 560px) {
  footer {
    justify-content: center;
    text-align: center;
  }

  td:nth-child(2) {
    font-size: 0.875rem;
  }
}

/* Scroll-driven reveals; browsers without them show everything at once. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }

  .seg {
    animation: grow linear both;
    animation-timeline: view();
    animation-range: entry 40% cover 45%;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
    opacity: 0.3;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .phrases span:first-child {
    opacity: 1;
  }
}
