/* ═══════════ NEOBRUTALISM · link.adixlink.pl ═══════════ */

:root {
  --ink:    #000;
  --paper:  #FFF8E7;
  --yellow: #FFD93D;
  --pink:   #FF6B9D;
  --blue:   #6BCBFF;
  --lime:   #B4F000;
  --violet: #B28DFF;

  --bw: 4px;                       /* border width */
  --shadow: 6px 6px 0 var(--ink);  /* hard offset shadow */
  --shadow-lg: 10px 10px 0 var(--ink);

  --display: 'Archivo Black', 'Space Grotesk', Impact, sans-serif;
  --body: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}

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

html { scroll-padding-top: 90px; }
html:not(.lenis) { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: var(--mono);
  font-weight: 700;
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 0 6px;
  font-size: .9em;
  white-space: nowrap;
}

::selection { background: var(--pink); color: var(--ink); }

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

/* ───────── parallax helpers ─────────
   fx.js drives these custom properties every frame:
   --py scroll parallax · --spin scroll rotation · --mx/--my mouse parallax.
   Elements set their own resting rotation through --rot. */
[data-speed], [data-spin], [data-mouse] {
  transform:
    translate3d(var(--mx, 0px), calc(var(--py, 0px) + var(--my, 0px)), 0)
    rotate(calc(var(--rot, 0deg) + var(--spin, 0deg)));
  will-change: transform;
}

/* dotted grid background */
.bg-grid {
  position: fixed;
  inset: -20% 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .07;
  pointer-events: none;
}

/* ───────── NAV ───────── */
.nav {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 28px));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow);
  transition: translate .45s cubic-bezier(.2, .8, .2, 1);
}
.nav.is-hidden { translate: 0 -160%; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
}
.logo-text { font-family: var(--display); font-size: 22px; letter-spacing: -.5px; }
.logo-text b { background: var(--pink); padding: 0 4px; margin-left: 2px; border: 2px solid var(--ink); }

.nav-links { display: flex; align-items: center; gap: 22px; font-weight: 700; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; }
.nav-links a.is-active { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 4px; text-decoration-color: var(--lime); }
.nav-links a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 4px; text-decoration-color: var(--pink); }

/* ───────── BUTTONS ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover  { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.btn:active { transform: translate(6px, 6px);   box-shadow: 0 0 0 var(--ink); }
.btn-sm { font-size: 15px; padding: 8px 16px; box-shadow: 4px 4px 0 var(--ink); }
.btn-sm:hover  { box-shadow: 6px 6px 0 var(--ink); }
.btn-sm:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-lg { font-size: 24px; padding: 16px 30px; }
.btn-yellow { background: var(--yellow); }
.btn-pink   { background: var(--pink); }
.btn-blue   { background: var(--blue); }

/* ───────── CARDS & HIGHLIGHTS ───────── */
.card {
  background: #fff;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-lg);
}

.hl {
  font-style: normal;
  color: var(--ink);
  padding: 0 .15em;
  border: var(--bw) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  display: inline-block;
  transform: rotate(-2deg);
}
.hl-pink   { background: var(--pink); }
.hl-blue   { background: var(--blue); }
.hl-lime   { background: var(--lime); }
.hl-yellow { background: var(--yellow); }

.sticker {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.sticker-yellow { background: var(--yellow); }

.tag {
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--ink);
  color: #fff;
  padding: 4px 12px;
  transform: rotate(-2deg);
}

/* ───────── SHAPES (decor) ───────── */
.shape { position: absolute; z-index: 0; pointer-events: none; }

.shape-circle    { width: 150px; height: 150px; background: var(--blue);   border: var(--bw) solid var(--ink); border-radius: 50%; box-shadow: var(--shadow); top: 16%; left: 5%; }
.shape-square    { width: 110px; height: 110px; background: var(--lime);   border: var(--bw) solid var(--ink); box-shadow: var(--shadow); bottom: 14%; left: 9%; }
.shape-star      { width: 130px; height: 130px; background: var(--pink);   top: 12%; right: 7%;
                   clip-path: polygon(50% 0, 62% 35%, 98% 35%, 69% 57%, 80% 91%, 50% 70%, 20% 91%, 31% 57%, 2% 35%, 38% 35%);
                   filter: drop-shadow(5px 5px 0 var(--ink)); }
.shape-tri       { width: 120px; height: 105px; background: var(--yellow); bottom: 18%; right: 8%;
                   clip-path: polygon(50% 0, 100% 100%, 0 100%);
                   filter: drop-shadow(5px 5px 0 var(--ink)); }
.shape-zig       { bottom: 9%; right: 24%; }

.shape-circle-lg { width: 260px; height: 260px; background: var(--pink); border: var(--bw) solid var(--ink); border-radius: 50%; box-shadow: var(--shadow-lg); top: 6%; right: -70px; }
.shape-plus      { font-family: var(--display); font-size: 120px; line-height: 1; color: var(--ink); bottom: 4%; left: 3%; }
.shape-star-lg   { width: 220px; height: 220px; background: var(--violet); top: 2%; left: -50px;
                   clip-path: polygon(50% 0, 62% 35%, 98% 35%, 69% 57%, 80% 91%, 50% 70%, 20% 91%, 31% 57%, 2% 35%, 38% 35%);
                   filter: drop-shadow(8px 8px 0 var(--ink)); }
.shape-tri-lg    { width: 200px; height: 175px; background: var(--blue); bottom: 2%; right: -40px;
                   clip-path: polygon(50% 0, 100% 100%, 0 100%);
                   filter: drop-shadow(8px 8px 0 var(--ink)); }

/* ───────── HERO ───────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 130px 20px 90px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  border-bottom: var(--bw) solid var(--ink);
  overflow: hidden;
}

.hero-inner {
  position: relative; z-index: 2;
  width: min(760px, 100%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}

.hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 9vw, 96px);
  line-height: .98;
  letter-spacing: -2px;
  text-transform: uppercase;
}
.hero-title .line { display: block; }

.hero-lead { font-size: clamp(17px, 2.4vw, 21px); max-width: 560px; font-weight: 500; }

/* form */
.shorten {
  width: 100%;
  padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-family: var(--mono); font-weight: 700; font-size: 14px; text-transform: uppercase; }
.label i { font-style: normal; opacity: .6; }

.shorten input {
  width: 100%;
  font: 500 18px var(--mono);
  color: var(--ink);
  background: var(--paper);
  padding: 14px 16px;
  border: var(--bw) solid var(--ink);
  border-radius: 0;
  outline: none;
  transition: box-shadow .12s, transform .12s, background .12s;
}
.shorten input::placeholder { color: #00000066; }
.shorten input:focus { background: #fff; box-shadow: 5px 5px 0 var(--pink); transform: translate(-2px, -2px); }
.shorten input:user-invalid { background: #ffd0d0; }

.alias-row { display: flex; align-items: stretch; }
.alias-prefix {
  display: grid; place-items: center;
  padding: 0 12px;
  background: var(--lime);
  border: var(--bw) solid var(--ink);
  border-right: 0;
  font: 700 16px var(--mono);
  white-space: nowrap;
}

.form-msg {
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  padding: 10px 14px;
  background: var(--pink);
  border: 3px solid var(--ink);
}

.result {
  padding: 14px;
  background: var(--lime);
  border: var(--bw) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}
.result-label { font: 700 13px var(--mono); text-transform: uppercase; }
.result-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 6px; }
.result-row a {
  font: 700 clamp(18px, 3.4vw, 26px) var(--mono);
  color: var(--ink);
  word-break: break-all;
}

.scroll-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font: 700 14px var(--mono); text-transform: uppercase; z-index: 2;
}
.scroll-hint span { display: inline-block; animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ───────── MARQUEE BANDS ───────── */
.bands { position: relative; height: 170px; background: var(--paper); overflow: hidden; border-bottom: var(--bw) solid var(--ink); }
.band {
  position: absolute; left: -5%; width: 110%;
  overflow: hidden;
  border-block: var(--bw) solid var(--ink);
  font-family: var(--display);
  font-size: 28px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 10px 0;
}
.band-a { top: 24px; background: var(--pink); --rot: -2.2deg; }
.band-b { top: 84px; background: var(--blue); --rot: 1.8deg; }
.band-track { display: inline-flex; animation: marquee 28s linear infinite; }
.band-track.reverse { animation-direction: reverse; animation-duration: 34s; }
.band-track span { padding-right: .55em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────── SECTIONS ───────── */
.section {
  position: relative;
  padding: 110px 20px;
  overflow: hidden;
  border-bottom: var(--bw) solid var(--ink);
}
.section > *:not(.shape) { position: relative; z-index: 1; }

.section-title {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
  font-size: clamp(34px, 6.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 64px;
}

.how      { background: var(--lime); }
.features { background: var(--paper); }
.cta      { background: var(--violet); }

/* steps */
.steps {
  list-style: none;
  width: min(1060px, 100%); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
}
.step { padding: 26px; }
.step-num { font-family: var(--display); font-size: 64px; line-height: 1; -webkit-text-stroke: 3px var(--ink); color: transparent; }
.step h3 { font-family: var(--display); font-weight: 400; font-size: 30px; text-transform: uppercase; margin: 6px 0 8px; }
.step-1 { --rot: -1.5deg; background: var(--yellow); }
.step-2 { --rot: 1.2deg;  background: var(--pink); }
.step-3 { --rot: -1deg;   background: var(--blue); }

/* features */
.feat-grid {
  width: min(1000px, 100%); margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px;
}
.feat { padding: 28px; }
.feat h3 { font-family: var(--display); font-weight: 400; font-size: 28px; margin-bottom: 8px; text-transform: uppercase; }
.feat-yellow { background: var(--yellow); --rot: -1deg; }
.feat-pink   { background: var(--pink);   --rot: 1deg; }
.feat-blue   { background: var(--blue);   --rot: .8deg; }
.feat-lime   { background: var(--lime);   --rot: -1.2deg; }

/* CTA */
.cta { padding-block: 130px; }
.cta-card { width: min(780px, 100%); margin: 0 auto; padding: 44px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 30px; --rot: -1deg; }
.cta-card h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 5.5vw, 56px); line-height: 1.1; }

/* footer */
.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 26px 24px;
  background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: 14px;
}
.footer b { color: var(--yellow); }

/* ───────── SCROLL PROGRESS ───────── */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 10px;
  z-index: 60;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
  pointer-events: none;
}
.progress i {
  display: block; height: 100%;
  background: var(--pink);
  border-right: 3px solid var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ───────── REVEAL ON SCROLL ─────────
   Individual transform properties (translate/scale) compose with the
   parallax `transform`, so both can live on the same element. */
.reveal {
  opacity: 0;
  translate: 0 48px;
  scale: .92;
  transition:
    opacity .5s ease var(--d, 0s),
    translate .7s cubic-bezier(.2, 1.2, .3, 1) var(--d, 0s),
    scale .7s cubic-bezier(.2, 1.2, .3, 1) var(--d, 0s);
}
.reveal.in { opacity: 1; translate: 0 0; scale: 1; }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .feat-grid { grid-template-columns: 1fr; gap: 30px; }
  .shape-zig, .shape-square { display: none; }
  .shape-circle { width: 90px; height: 90px; top: auto; bottom: 5%; left: -24px; }
  .shape-star { width: 90px; height: 90px; top: 9%; right: -22px; }
  .shape-tri { width: 80px; height: 70px; bottom: 6%; right: 6%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .hero { padding-top: 110px; }
  .shorten { padding: 18px; }
  .alias-prefix { font-size: 13px; padding: 0 8px; }
  .btn-lg { font-size: 20px; width: 100%; }
  .band { font-size: 22px; }
  .section { padding: 80px 16px; }
}

/* ───────── REDUCED MOTION ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-speed] { will-change: auto; }
  .band-track, .scroll-hint span { animation: none; }
  .btn, .shorten input, .nav { transition: none; }
  .reveal { opacity: 1; translate: none; scale: none; transition: none; }
}

/* ───────── ADDITIONS (v2) ───────── */
.hero-title, .hero-lead { position: relative; z-index: 1; }   /* slide *behind* the form while scrolling */
.shorten { position: relative; z-index: 3; }

.result-dash { display: inline-block; margin-top: 10px; font: 700 14px var(--mono); color: var(--ink); }
.feat-btn { margin-top: 16px; }
.footer a { color: var(--yellow); }

/* ───────── PAGE TRANSITION (index ⇄ dashboard) ─────────
   Cross-document View Transitions. Going to the dashboard: the current page zooms
   out and slides right while the dashboard slides in from the left and zooms in;
   going home is the mirror image. The direction is set on <html data-vt> by the
   inline `pagereveal` script in each page's <head>. Browsers without support just
   navigate normally. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

::view-transition { background: var(--violet); }

::view-transition-group(root) { animation-duration: .85s; }

::view-transition-old(root),
::view-transition-new(root) {
  mix-blend-mode: normal;         /* no additive cross-fade */
  animation-duration: .85s;
  animation-fill-mode: both;
  /* outline (not border) so the live page never shifts when the transition ends */
  outline: 8px solid var(--ink);
  box-shadow: 18px 18px 0 8px var(--ink);
}

/* to dashboard: old → shrinks, exits right · new ← enters from left, grows */
html[data-vt="dash"]::view-transition-old(root) { animation-name: vt-old-right; }
html[data-vt="dash"]::view-transition-new(root) { animation-name: vt-new-from-left; }
/* to home: mirror */
html[data-vt="home"]::view-transition-old(root) { animation-name: vt-old-left; }
html[data-vt="home"]::view-transition-new(root) { animation-name: vt-new-from-right; }

@keyframes vt-old-right {
  0%   { transform: translateX(0) scale(1);        animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  30%  { transform: translateX(0) scale(.6);       animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  72%  { transform: translateX(78vw) scale(.6); }
  100% { transform: translateX(78vw) scale(.6); }
}
@keyframes vt-new-from-left {
  0%   { transform: translateX(-105vw) scale(.6); animation-timing-function: linear; }
  30%  { transform: translateX(-105vw) scale(.6); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  72%  { transform: translateX(0) scale(.6);      animation-timing-function: cubic-bezier(.5, 0, .1, 1); }
  100% { transform: translateX(0) scale(1); }
}
@keyframes vt-old-left {
  0%   { transform: translateX(0) scale(1);        animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  30%  { transform: translateX(0) scale(.6);       animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  72%  { transform: translateX(-78vw) scale(.6); }
  100% { transform: translateX(-78vw) scale(.6); }
}
@keyframes vt-new-from-right {
  0%   { transform: translateX(105vw) scale(.6);  animation-timing-function: linear; }
  30%  { transform: translateX(105vw) scale(.6);  animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  72%  { transform: translateX(0) scale(.6);      animation-timing-function: cubic-bezier(.5, 0, .1, 1); }
  100% { transform: translateX(0) scale(1); }
}

/* hide reveal-on-scroll targets from the very first paint (before fx.js runs),
   so nothing flashes inside the new page's snapshot */
.js [data-reveal]:not(.in) { opacity: 0; translate: 0 48px; scale: .92; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; translate: none; scale: none; }
}
