/* Martin Bárta — portfolio. Direction: type and nothing else, colour by chapter. */

:root {
  --black: #0b0b0b;
  --paper: #f1f1ef;
  --paper-soft: #a3a3a0;
  --pink: #ff87ab;
  --pink-light: #ffe4ec;
  --wine: #6b1f3a;
  --lime: #def915;
  --olive: #3f4500;
  --ink: #0a0a0a;

  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --text: "Public Sans", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: min(33svh, 19.5vw);

  --m: clamp(16px, 3vw, 44px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scrollbar-color: #2a2a2a var(--black); }
body {
  margin: 0; background: var(--black); color: var(--paper);
  font-family: var(--text); font-size: var(--step-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: 12px; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; z-index: 50; padding: 10px 14px; background: var(--lime); color: var(--ink); text-decoration: none; }
.skip:focus { clip-path: none; width: auto; height: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  background: var(--lime); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step-body);
  transition: transform 0.35s var(--ease-out), background-color 0.3s ease, color 0.3s ease;
}
.btn:hover { transform: translateY(-3px) rotate(-2deg); }
.btn:active { transform: scale(0.95); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }

.more {
  display: inline-block; margin-top: 18px; font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 0.25em; text-decoration-color: var(--lime);
  transition: transform 0.3s var(--ease-out), color 0.25s ease;
}
.more:hover { color: var(--lime); transform: translateX(6px); }

/* ---------- Corner mark (fixed, takes the chapter's ink) ---------- */
.corner {
  position: fixed; z-index: 40; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--m); pointer-events: none;
}
.corner > * { pointer-events: auto; }
.logo { font-family: var(--display); font-weight: 800; font-size: var(--step-lead); letter-spacing: 0.01em; text-decoration: none; color: var(--paper); transition: color 0.3s ease, transform 0.4s var(--ease-out); }
.logo:hover { transform: rotate(-6deg) scale(1.08); }
.corner .btn { transition: transform 0.35s var(--ease-out), background-color 0.3s ease, color 0.3s ease; }
.corner[data-on="pink"] .logo, .corner[data-on="lime"] .logo { color: var(--ink); }
.corner[data-on="pink"] .btn { background: var(--ink); color: var(--pink); }
.corner[data-on="lime"] .btn { background: var(--ink); color: var(--lime); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; padding: 0 var(--m);
  display: grid; grid-template-rows: 1fr auto; overflow: clip;
}
.hero-title {
  padding-top: 15svh;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: var(--step-display); line-height: 0.82; letter-spacing: -0.005em;
  display: flex; flex-direction: column;
}
.line { display: block; white-space: nowrap; }
.l1 { color: var(--pink); }
.l2 { color: var(--lime); }
.ch { display: inline-block; transform-origin: 50% 100%; will-change: transform; }
.hero-sub {
  justify-self: end; align-self: end; width: min(24vw, 360px); min-width: 280px;
  margin-bottom: 44px; font-size: var(--step-body); color: var(--paper);
}
.hero-hint { position: absolute; left: var(--m); bottom: 44px; font-size: var(--step-small); color: var(--paper-soft); }
@media (hover: none), (max-width: 1000px) { .hero-hint { display: none; } }

/* ---------- Scene: the window that opens ---------- */
.grow .scene-stage { padding: 96px var(--m) 64px; }
.run-title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: var(--step-display); line-height: 0.85; color: var(--paper);
  display: flex; flex-direction: column;
}
.run-b { color: var(--pink); align-self: flex-end; }
.window { position: relative; margin-top: 48px; aspect-ratio: 16 / 10; overflow: hidden; background: #161616; }
.w-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transition: opacity 0.5s ease; }
.w-img.is-on { opacity: 1; }
.w-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; }
.w-name { font-family: var(--display); font-weight: 800; font-size: var(--step-lead); text-transform: uppercase; }
.w-link { font-weight: 600; color: var(--lime); }

html.js .grow.is-live .scene-stage { padding: 0; }
html.js .grow.is-live .run-title {
  position: absolute; left: var(--m); right: var(--m); top: 50%; transform: translateY(-50%);
  z-index: 2; pointer-events: none;
}
html.js .grow.is-live .window {
  position: absolute; margin: 0; inset: 0 0 88px 0; aspect-ratio: auto;
  clip-path: inset(32% 38% 32% 38%);
}
html.js .grow.is-live .w-bar {
  position: absolute; left: var(--m); right: var(--m); bottom: 0; height: 88px; margin: 0; align-items: center;
}

/* ---------- Names as one paragraph (pink chapter) ---------- */
.names { background: var(--pink); color: var(--wine); padding: 160px var(--m) 140px; }
.names-list {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: var(--step-head); line-height: 1.08; letter-spacing: 0;
}
.names-list li { display: inline; }
.names-head h2 { display: inline; font: inherit; color: var(--ink); }
.names-list a { text-decoration: none; color: var(--wine); transition: color 0.25s ease; }
.names-list a:hover, .names-list a:focus-visible { color: var(--ink); }
.frame {
  display: inline-block; width: 1.25em; height: 0.78em; margin: 0 0.06em 0 0.14em;
  vertical-align: -0.02em; overflow: hidden; background: var(--ink);
  transform-origin: 0 70%; transition: transform 0.5s var(--ease-out);
}
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.names-list a:hover .frame, .names-list a:focus-visible .frame { transform: scale(1.6) rotate(-3deg); }
.names-count { margin-top: 48px; font-size: var(--step-body); color: var(--ink); }

/* ---------- What each one does (dark chapter) ---------- */
.what { position: relative; padding: 180px var(--m) 160px; }
.what-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: var(--step-head); line-height: 0.9; color: var(--lime); }
.what-list { margin-top: 72px; display: grid; gap: 64px; }
.what-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 48px; align-items: start; }
.what-name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: var(--step-head); line-height: 0.9; color: var(--paper);
  transition: color 0.3s ease, transform 0.5s var(--ease-out);
}
.what-row:hover .what-name { color: var(--pink); transform: translateX(14px); }
.what-info { max-width: 48ch; padding-top: 8px; }
.what-meta { margin-top: 14px; font-size: var(--step-small); color: var(--paper-soft); }
.st { display: inline-block; margin-right: 10px; padding: 3px 8px; font-weight: 600; color: var(--ink); }
.st-live { background: var(--lime); }
.st-dev { background: var(--pink); }
.st-code { background: var(--paper); }
.st-end { background: var(--paper-soft); text-decoration: line-through; }

.follow {
  position: fixed; left: 0; top: 0; z-index: 30; width: min(30vw, 420px); aspect-ratio: 16 / 10;
  pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.3s ease;
}
.follow.is-on { opacity: 1; visibility: visible; }
.follow img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; }
.follow img.is-on { opacity: 1; }
@media (hover: none) { .follow { display: none; } }

/* ---------- About (lime chapter) ---------- */
.about {
  background: var(--lime); color: var(--ink); padding: 160px var(--m) 160px;
  display: grid; grid-template-columns: calc(34vw - var(--m)) minmax(0, 1fr);
}
.facts { display: grid; gap: 22px; align-content: start; max-width: 220px; }
.facts dt { font-size: var(--step-small); color: var(--olive); }
.facts dd { font-size: var(--step-small); font-weight: 600; }
.about-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: var(--step-head); line-height: 0.9; }
.about-text { margin-top: 32px; max-width: 46ch; font-size: var(--step-lead); line-height: 1.38; }
.rec-side { grid-column: 1; margin-top: 120px; font-size: var(--step-small); font-weight: 600; }
.records { grid-column: 2; margin-top: 120px; display: flex; flex-wrap: wrap; gap: 40px 64px; }
.records > div { width: 280px; }
.rec-label { font-size: var(--step-small); font-weight: 600; margin-bottom: 14px; }
.rec { display: grid; gap: 10px; font-size: var(--step-small); }
.rec li { display: flex; justify-content: space-between; gap: 16px; }
.rec li span:last-child { color: var(--olive); text-align: right; }

/* ---------- Contact (pink chapter) ---------- */
.contact { background: var(--pink); color: var(--ink); padding: 200px var(--m) 160px; display: grid; grid-template-columns: calc(34vw - var(--m)) minmax(0, 1fr); }
.contact-col { grid-column: 2; width: min(560px, 100%); }
.contact-title { font-family: var(--text); font-weight: 600; font-size: var(--step-lead); line-height: 1.25; }
.contact-title span { display: block; color: var(--wine); }
.field { position: relative; margin-top: 28px; }
.field input[type="text"] {
  width: 100%; height: 64px; padding: 0 76px 0 20px; border: 0; border-radius: 0;
  background: var(--pink-light); color: var(--ink); font: inherit; font-size: var(--step-body);
  transition: box-shadow 0.2s ease;
}
.field input::placeholder { color: var(--wine); opacity: 0.75; }
.field input:focus { outline: none; box-shadow: inset 0 0 0 3px var(--ink); } /* taste-skill-ignore: focus ring of a form field */
.send {
  position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--ink); color: var(--lime);
  transition: transform 0.35s var(--ease-out);
}
.send:hover { transform: translateX(4px) rotate(-8deg); }
.send:active { transform: scale(0.9); }
.field-note { margin-top: 16px; font-size: var(--step-small); color: var(--wine); }
.contact-rows { margin-top: 72px; display: grid; gap: 14px; font-size: var(--step-small); }
.contact-rows div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.contact-rows dt { color: var(--wine); }
.contact-rows a { font-weight: 600; }

/* ---------- Footer (dark chapter) ---------- */
.foot { position: relative; overflow: hidden; padding: 140px var(--m) 0; }
.foot-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.places { grid-column: 1 / span 6; display: grid; gap: 6px; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: var(--step-lead); line-height: 1.1; color: var(--lime); }
.places a { text-decoration: none; transition: color 0.25s ease; }
.places a:hover { color: var(--pink); }
.foot-links { grid-column: 8 / span 5; display: grid; gap: 10px; align-content: start; font-size: var(--step-body); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--lime); }
.foot-legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 96px; font-size: var(--step-small); color: var(--paper-soft); }
.foot-name {
  margin-top: 40px; margin-bottom: -0.2em;
  font-family: var(--display); font-weight: 800; text-transform: uppercase; white-space: nowrap;
  font-size: 16.2vw; line-height: 0.8; color: var(--pink);
}

/* ---------- Entrances ---------- */
.js [data-in] { opacity: 0; }
.js [data-in="rise"] { transform: translateY(28px); }
.js [data-in="slide"] { transform: translateX(-40px); }
.js [data-in="scale"] { transform: scale(0.94); }
.js [data-in].in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0ms); }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .what-row { grid-template-columns: 1fr; gap: 16px; }
  .what-list { gap: 120px; }
  .about, .contact { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; margin-top: 56px; }
  .about-main { order: -1; }
  .about-main, .rec-side, .records, .contact-col { grid-column: 1; }
  .rec-side { margin-top: 80px; }
  .records { margin-top: 20px; }
  .hero { grid-template-rows: auto auto; min-height: 0; padding-bottom: 120px; align-content: start; }
  .hero-sub { justify-self: start; align-self: start; width: min(70vw, 460px); margin: 40px 0 0; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .corner { padding: 14px 16px; }
  .hero-title { padding-top: 16svh; font-size: 30vw; }
  .hero-sub { width: 88%; min-width: 0; margin-top: 32px; }
  .names { padding: 110px 16px 96px; }
  .names-list { font-size: 11vw; line-height: 1.12; }
  .names-list li:nth-child(n+5) .frame { display: none; }
  .names-list a { color: var(--ink); }
  .what { padding: 120px 16px 110px; }
  .what-list { gap: 96px; }
  .what-name { font-size: 10vw; }
  .about { padding: 110px 16px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .records > div { width: 100%; }
  .contact { padding: 120px 16px 110px; }
  .contact-rows div { grid-template-columns: 1fr; gap: 2px; }
  .foot { padding: 96px 16px 0; }
  .foot-row { grid-template-columns: 1fr; row-gap: 40px; }
  .places, .foot-links { grid-column: 1; }
  .foot-name { font-size: 16.2vw; }
  .run-title { font-size: 20vw; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-in] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ch { transform: none !important; }
  .btn, .more, .frame, .what-name, .send, .logo { transition: none !important; }
}
