/* ————————————————————————————————————————————————
   LORENC PEKAJ — marble gallery
   ———————————————————————————————————————————————— */

@font-face {
  font-family: "Marcellus";
  src: url("assets/fonts/marcellus-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #1b1a17;
  --ink-60: rgba(27, 26, 23, 0.62);
  --ink-30: rgba(27, 26, 23, 0.28);
  --ivory: #f0ece4;
  --gold: #a07c2c;
  --display: "Marcellus", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
html, body { background: var(--ivory); }

body {
  font-family: var(--sans);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--ivory); }

/* ——— stage & atmosphere ——— */

#stage {
  position: fixed; inset: 0;
  width: 100%; height: 100svh;
  display: block; z-index: 0;
}

.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 2%); }
  50% { transform: translate(2%, -2%); }
  75% { transform: translate(-2%, -2%); }
}

/* ——— loader ——— */

#loader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--ivory);
  display: grid; place-items: center; align-content: center; gap: 26px;
  transition: opacity 0.8s ease, visibility 0.8s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.28em;
}
.loader-line { width: min(220px, 50vw); height: 1px; background: var(--ink-30); }
#loader-fill { display: block; height: 100%; width: 0%; background: var(--gold); transition: width 0.3s ease; }

/* ——— chrome ——— */

#top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px clamp(22px, 4.5vw, 64px);
  mix-blend-mode: multiply;
}
.wordmark {
  font-family: var(--display);
  font-size: 0.92rem; letter-spacing: 0.3em;
  color: var(--ink); text-decoration: none;
}
.top-nav { display: flex; gap: clamp(18px, 3vw, 38px); }
.top-nav a {
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-60); text-decoration: none;
  transition: color 0.25s;
}
.top-nav a:hover { color: var(--gold); }

#progress {
  position: fixed; top: 0; left: 0; z-index: 41;
  height: 2px; width: 0%;
  background: var(--gold);
}

#folio {
  position: fixed; left: clamp(22px, 4.5vw, 64px); bottom: 26px; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.18em;
  color: var(--ink-60);
}
#folio-num { color: var(--ink); }
.folio-rule { width: 42px; height: 1px; background: var(--ink-30); }

/* ——— panels ——— */

main { position: relative; z-index: 10; }

.panel {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(22px, 5vw, 80px);
}

.eyebrow {
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.34em; color: var(--ink-60);
  margin-bottom: clamp(18px, 3vh, 30px);
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 34px; height: 1px; background: var(--gold);
  vertical-align: middle; margin-right: 14px;
}

/* I — hero */

#hero { justify-content: flex-end; padding-bottom: clamp(36px, 9vh, 96px); }

.hero-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.6rem, 13.5vw, 11rem);
  line-height: 0.98;
  letter-spacing: 0.045em;
  margin: 0 0 clamp(20px, 3.5vh, 36px) -0.04em;
}

.hero-links { display: flex; gap: clamp(16px, 2.6vw, 30px); list-style: none; flex-wrap: wrap; }
.hero-links a {
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-60); text-decoration: none;
  padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.hero-links a:hover { color: var(--gold); border-color: var(--gold); }

.scroll-cue {
  position: absolute; right: clamp(22px, 4.5vw, 64px); bottom: 26px;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.6rem; font-weight: 500; letter-spacing: 0.32em;
  color: var(--ink-60);
}
.cue-line { width: 56px; height: 1px; background: var(--ink-30); position: relative; overflow: hidden; }
.cue-line::after {
  content: ""; position: absolute; inset: 0; left: -100%;
  background: var(--gold);
  animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 60%, 100% { transform: translateX(200%); } }

/* II — practice */

.text-block { max-width: 760px; }
.statement {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.9rem);
  line-height: 1.22;
  margin-bottom: clamp(26px, 4vh, 40px);
}
.support {
  display: grid; gap: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 640px;
}
.support p {
  font-size: 0.92rem; line-height: 1.7; color: var(--ink-60);
  border-top: 1px solid var(--ink-30); padding-top: 16px;
}

/* III — domains */

#domains { align-items: flex-end; }
.domain-block { width: min(620px, 100%); }
.domains { list-style: none; }
.domains li {
  position: relative;
  padding: clamp(20px, 3vh, 30px) 0 clamp(20px, 3vh, 30px) 70px;
  border-top: 1px solid var(--ink-30);
  transition: padding-left 0.35s ease;
}
.domains li:last-child { border-bottom: 1px solid var(--ink-30); }
.domains li:hover { padding-left: 84px; }
.domain-num {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: 1.15rem;
  color: var(--gold);
}
.domains h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  letter-spacing: 0.03em;
}
.domains p { margin-top: 6px; font-size: 0.85rem; color: var(--ink-60); }

/* IV — contact */

#contact { justify-content: flex-end; padding-bottom: 5vh; }
.contact-block { margin-bottom: clamp(40px, 9vh, 110px); }
.contact-line {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.08;
  margin-bottom: clamp(22px, 3.5vh, 34px);
}
.contact-mail {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3.2vw, 2.1rem);
  letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gold);
  transition: color 0.25s, letter-spacing 0.35s ease;
}
.contact-mail:hover { color: var(--gold); letter-spacing: 0.07em; }

.contact-links { display: flex; gap: clamp(16px, 2.6vw, 30px); list-style: none; flex-wrap: wrap; margin-top: 30px; }
.contact-links a {
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-60); text-decoration: none;
  padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.contact-links a:hover { color: var(--gold); border-color: var(--gold); }

.colophon {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.6rem; font-weight: 500; letter-spacing: 0.24em;
  color: var(--ink-60);
  border-top: 1px solid var(--ink-30);
  padding-top: 18px;
}

/* ——— reveal ——— */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ——— noscript ——— */

.noscript {
  position: fixed; inset: 0; z-index: 60;
  background: var(--ivory); color: var(--ink);
  display: grid; place-items: center; text-align: center; padding: 24px;
  font-family: var(--display);
}
.noscript a { color: var(--gold); }

/* ——— responsive ——— */

@media (max-width: 760px) {
  .top-nav a:not(:last-child) { display: none; }
  .support { grid-template-columns: 1fr; }
  #domains { align-items: stretch; }
  .scroll-cue { display: none; }
  /* keep type legible where the form passes behind it */
  .domain-block, .text-block, .contact-block {
    background: rgba(240, 236, 228, 0.66);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    padding: 18px;
    margin: -18px;
    border-radius: 2px;
  }
}

/* ——— reduced motion ——— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .cue-line::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
