/* Unieszewo — strona główna. Ładować po base.css. */
:root {
  /* Homepage intentionally uses a wider canvas than subpages. */
  --maxw: 1280px;
  --gutter: clamp(1.4rem, 5vw, 5.5rem);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-weight: 300;
  line-height: 1.5;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

/* Paper grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

[data-theme="dark"] body::after {
  mix-blend-mode: screen;
  opacity: 0.05;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

::selection {
  background: var(--primary);
  color: var(--surface);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Typographic primitives ─────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker::before {
  content: '';
  width: 1.8rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.kicker.center {
  justify-content: center;
}

.folio {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.display {
  font-family: var(--ff-display);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.02;
  color: var(--text);
}

.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}

.prose {
  font-size: clamp(1rem, 1.15vw, 1.14rem);
  line-height: 1.78;
  color: var(--muted);
  font-weight: 300;
}

.prose+.prose {
  margin-top: 1.15rem;
}

.rule {
  width: 64px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

section {
  position: relative;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: clamp(1rem, 2vw, 1.6rem) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: padding 0.5s var(--ease), background 0.5s var(--ease),
    box-shadow 0.5s var(--ease), backdrop-filter 0.5s var(--ease);
}

.site-header.scrolled {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 1px 0 var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: auto;
  height: clamp(48px, 5vw, 64px);
  object-fit: contain;
  transition: height 0.5s var(--ease), filter 0.6s var(--ease);
}

[data-theme="dark"] .brand img,
[data-theme="dark"] .footer-logo {
  filter: brightness(0) invert(0.92);
}

.site-header.scrolled .brand img {
  height: clamp(40px, 4vw, 50px);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.8rem);
}

.nav-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-links {
  display: flex;
  gap: clamp(1.3rem, 2.4vw, 2.4rem);
}

.nav-links a {
  position: relative;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
  opacity: 0.78;
  transition: opacity 0.3s var(--ease), color 0.5s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  transition: border-color 0.3s var(--ease), transform 0.5s var(--ease), background 0.3s var(--ease), color 0.5s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(20deg);
}

/* Nagłówek na ciemnym hero (tryb jasny, niezeskrolowany) — jasne logo i menu dla czytelności */
html:not([data-theme="dark"]) .site-header:not(.scrolled) .brand img {
  filter: brightness(0) invert(1);
}

html:not([data-theme="dark"]) .site-header:not(.scrolled) .nav-links a,
html:not([data-theme="dark"]) .site-header:not(.scrolled) .theme-toggle,
html:not([data-theme="dark"]) .site-header:not(.scrolled) .sound-toggle {
  color: #f4f0e9;
}

html:not([data-theme="dark"]) .site-header:not(.scrolled) .nav-links a {
  opacity: 0.92;
}

html:not([data-theme="dark"]) .site-header:not(.scrolled) .theme-toggle,
html:not([data-theme="dark"]) .site-header:not(.scrolled) .sound-toggle {
  border-color: rgba(244, 240, 233, 0.45);
}

html:not([data-theme="dark"]) .site-header:not(.scrolled) .hamburger span,
html:not([data-theme="dark"]) .site-header:not(.scrolled) .hamburger span::before,
html:not([data-theme="dark"]) .site-header:not(.scrolled) .hamburger span::after {
  background: #f4f0e9;
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.theme-toggle .moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon {
  display: block;
}

/* Przełącznik dźwięków natury */
.sound-toggle {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.5s var(--ease);
}

.sound-toggle:hover {
  border-color: var(--accent);
}

.sound-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.sound-toggle .snd-on {
  display: none;
}

.sound-toggle .snd-off {
  display: block;
}

.sound-toggle.is-on .snd-on {
  display: block;
}

.sound-toggle.is-on .snd-off {
  display: none;
}

.sound-toggle.is-on {
  border-color: var(--accent);
}

.sound-toggle.is-on .wv {
  transform-origin: 8px 12px;
  animation: sndWave 2.4s var(--ease) infinite;
}

.sound-toggle.is-on .wv2 {
  animation-delay: 0.3s;
}

@keyframes sndWave {

  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sound-toggle.is-on .wv {
    animation: none;
    opacity: 0.85;
  }
}

.hamburger {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
}

.hamburger span,
.hamburger span::before,
.hamburger span::after {
  content: '';
  display: block;
  width: 1.3rem;
  height: 1px;
  background: var(--text);
  position: relative;
  transition: transform 0.3s var(--ease);
}

.hamburger span::before {
  position: absolute;
  top: -6px;
}

.hamburger span::after {
  position: absolute;
  top: 6px;
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: grid;
  }
}

/* Mobile menu — organic reveal */
.m-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  background:
    radial-gradient(125% 95% at 100% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 58%),
    radial-gradient(110% 85% at 0% 100%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 55%),
    var(--bg);
  opacity: 0;
  pointer-events: none;
  clip-path: circle(0% at calc(100% - 2.7rem) 2.7rem);
  transition: clip-path 0.72s var(--ease), opacity 0.5s var(--ease);
}

.m-menu.open {
  opacity: 1;
  pointer-events: auto;
  clip-path: circle(150% at calc(100% - 2.7rem) 2.7rem);
}

.m-menu-leaf {
  position: absolute;
  left: calc(var(--gutter) - 0.5rem);
  bottom: clamp(1.5rem, 6vh, 4rem);
  width: clamp(70px, 16vw, 120px);
  height: auto;
  color: var(--primary);
  opacity: 0;
  pointer-events: none;
  transform: rotate(-8deg) scale(0.9);
  transform-origin: bottom left;
  transition: opacity 0.7s var(--ease) 0.2s, transform 0.9s var(--ease) 0.2s;
}

.m-menu.open .m-menu-leaf {
  opacity: 0.1;
  transform: rotate(0) scale(1);
}

.m-menu-kicker {
  margin-bottom: clamp(1.4rem, 4vh, 2.4rem);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.m-menu.open .m-menu-kicker {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}

.m-menu-close {
  position: absolute;
  top: clamp(1.1rem, 3vw, 1.7rem);
  right: var(--gutter);
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  transition: transform 0.55s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}

.m-menu-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.m-menu-close:hover {
  transform: rotate(90deg);
  border-color: var(--accent);
  color: var(--primary);
}

.m-menu a {
  position: relative;
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 400;
  line-height: 1.18;
  color: var(--text);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 0.5s var(--ease), transform 0.65s var(--ease),
    filter 0.65s var(--ease), color 0.35s var(--ease), border-color 0.4s var(--ease);
}

.m-menu a em {
  font-style: italic;
  color: var(--accent);
  font-size: 0.9rem;
  margin-left: 0.6rem;
}

.m-menu a:hover {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  padding-left: 0.5rem;
}

.m-menu.open a {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.m-menu.open a:nth-of-type(1) {
  transition-delay: 0.16s;
}

.m-menu.open a:nth-of-type(2) {
  transition-delay: 0.23s;
}

.m-menu.open a:nth-of-type(3) {
  transition-delay: 0.30s;
}

.m-menu.open a:nth-of-type(4) {
  transition-delay: 0.37s;
}

.m-menu.open a:nth-of-type(5) {
  transition-delay: 0.44s;
}

.m-menu.open a:nth-of-type(6) {
  transition-delay: 0.51s;
}

@media (prefers-reduced-motion: reduce) {
  .m-menu {
    clip-path: none;
    transition: opacity 0.3s var(--ease);
  }

  .m-menu a,
  .m-menu-kicker,
  .m-menu-leaf {
    transform: none;
    filter: none;
    transition: opacity 0.3s var(--ease);
  }

  .m-menu.open a {
    transition-delay: 0s;
  }

  .m-menu-close:hover {
    transform: none;
  }
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--bg-dark);
}

.hero-bg img {
  filter: brightness(0.74) saturate(1.02);
  transform: scale(1.04);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 18, 16, 0.32) 0%, rgba(20, 18, 16, 0.04) 32%, rgba(20, 18, 16, 0.62) 100%);
}

.hero-inner {
  width: 100%;
  padding-bottom: clamp(3.5rem, 9vh, 7rem);
  padding-top: 8rem;
  color: #f3ecdd;
}

.hero .kicker {
  color: #d8c8a6;
}

.hero .kicker::before {
  background: #d8c8a6;
}

.hero-title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(2.9rem, 7.4vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 1.6rem 0 1.8rem;
  max-width: 16ch;
  text-shadow: 0 2px 30px rgba(20, 18, 16, 0.4);
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: #e6d2a6;
}

.hero-sub {
  max-width: 40ch;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.7;
  color: #ece3d2;
  font-weight: 300;
  text-shadow: 0 1px 16px rgba(20, 18, 16, 0.5);
}

.hero-meta {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
  align-items: baseline;
}

.hero-meta .item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hero-meta .item span {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c7b491;
}

.hero-meta .item strong {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: #f3ecdd;
}

.hero-scroll {
  position: absolute;
  bottom: 1.8rem;
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d8c8a6;
  z-index: 2;
}

.hero-scroll .line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(180deg, #d8c8a6, transparent);
  animation: drip 2.4s var(--ease) infinite;
}

@keyframes drip {

  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.6);
    transform-origin: top;
  }

  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (max-width: 600px) {
  .hero-scroll {
    display: none;
  }
}

/* ── Manifesto ──────────────────────────────────────── */
.manifesto {
  padding: clamp(6rem, 14vh, 11rem) 0;
}

.manifesto .wrap {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.manifesto .aside {
  position: sticky;
  top: 7rem;
}

.aside-quote {
  position: relative;
  margin-top: clamp(2.6rem, 6vh, 4.5rem);
  padding-left: 1.6rem;
  max-width: 30ch;
}

.aside-quote-line {
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--accent);
  opacity: 0.55;
}

.aside-quote p {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 2vw, 1.95rem);
  line-height: 1.34;
  letter-spacing: -0.005em;
  color: var(--text);
}

.aside-quote em {
  font-style: italic;
  color: var(--primary);
}

.manifesto-quote {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 2.2vw, 3.3rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--text);
}

.manifesto-quote em {
  font-style: italic;
  color: var(--primary);
}

.drop {
  float: left;
  font-family: var(--ff-display);
  font-size: 4.6em;
  line-height: 0.72;
  padding: 0.05em 0.14em 0 0;
  color: var(--primary);
  font-weight: 500;
}

@media (max-width: 820px) {
  .manifesto .wrap {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .manifesto .aside {
    position: static;
  }
}

/* ── Place / Warmia, widziana spokojnie ─────────────── */
.place {
  position: relative;
  padding: clamp(3.5rem, 7vh, 6rem) 0 clamp(6rem, 12vh, 10rem);
}

.place-leaf {
  position: absolute;
  left: 0;
  top: clamp(4rem, 9vh, 8rem);
  width: clamp(70px, 8vw, 130px);
  height: auto;
  color: var(--primary);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

.place>.wrap {
  position: relative;
  z-index: 1;
}

.place-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) 1.4fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.place-title {
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1.04;
  margin-top: 1.4rem;
}

.place-title em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}

.place-rule {
  display: block;
  width: 56px;
  height: 2px;
  background: var(--accent);
  opacity: 0.85;
  margin: 1.7rem 0 1.6rem;
}

.place-intro .prose {
  max-width: 32ch;
}

.place-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
}

.pcard {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(30, 28, 23, 0.06);
  box-shadow: 0 16px 38px -28px rgba(30, 28, 23, 0.5);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.pcard:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -28px rgba(30, 28, 23, 0.6);
}

.pcard-img {
  overflow: hidden;
}

.pcard-img img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 1.5s var(--ease);
}

.pcard:hover .pcard-img img {
  transform: scale(1.05);
}

.pcard-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 1.5rem 1.05rem 1rem;
  font-size: clamp(0.74rem, 0.9vw, 0.86rem);
  line-height: 1.3;
  letter-spacing: 0.005em;
  color: #f4f0e7;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.pcard-ic {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  opacity: 0.9;
  margin-bottom: 0.1rem;
}

.pcard--green .pcard-cap {
  background: linear-gradient(to top, rgba(28, 38, 26, 0.92) 0%, rgba(28, 38, 26, 0.5) 42%, transparent 100%);
}

.pcard--brown .pcard-cap {
  background: linear-gradient(to top, rgba(58, 36, 20, 0.92) 0%, rgba(58, 36, 20, 0.5) 42%, transparent 100%);
}

.place-note {
  margin-top: clamp(2.4rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.4rem);
  padding: clamp(1.5rem, 3vw, 2.4rem) clamp(1.5rem, 3.5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}

.place-note-mark {
  width: clamp(48px, 5vw, 66px);
  color: var(--primary);
  opacity: 0.8;
}

.place-note-mark svg {
  width: 100%;
  height: auto;
  display: block;
}

.place-note-sep {
  width: 1px;
  height: clamp(46px, 7vw, 70px);
  background: var(--line);
}

.place-note .prose {
  margin: 0;
  max-width: 62ch;
}

.place-note .folio {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .place-grid {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 3rem);
  }

  .place-intro .prose {
    max-width: 46ch;
  }

  .place-title em {
    display: inline;
  }
}

@media (max-width: 600px) {
  .place-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pcard-img img {
    aspect-ratio: 3 / 2;
  }

  .pcard-cap {
    padding: 2rem 1.1rem 1.1rem;
  }

  .place-note {
    grid-template-columns: auto 1fr;
    row-gap: 1.1rem;
  }

  .place-note-sep {
    display: none;
  }

  .place-note .prose {
    grid-column: 1 / -1;
  }

  .place-note .folio {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {

  .pcard,
  .pcard-img img {
    transition: none;
  }

  .pcard:hover {
    transform: none;
  }

  .pcard:hover .pcard-img img {
    transform: none;
  }
}

/* ── Film ───────────────────────────────────────────── */
.film {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 11vh, 9rem) 0;
  background: var(--surface);
  border-block: 1px solid var(--line-soft);
}

.film>.wrap {
  position: relative;
  z-index: 1;
}

.film-mark {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  top: clamp(-0.5rem, 1.5vw, 2.5rem);
  left: 50%;
  transform: translateX(-34%);
  width: clamp(260px, 40vw, 540px);
  height: auto;
  opacity: 0.06;
  filter: blur(1.4px);
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}

[data-theme="dark"] .film-mark {
  opacity: 0.075;
}

@media (max-width: 640px) {
  .film-mark {
    width: 72vw;
    opacity: 0.05;
    transform: translateX(-30%);
  }
}

.film-head {
  text-align: center;
  max-width: 44ch;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

.film-head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0.8rem 0 1.2rem;
}

.player {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-dark);
  cursor: pointer;
}

.player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition: opacity 0.7s var(--ease);
}

.player-poster img {
  filter: brightness(0.72);
}

.player-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(20, 18, 16, 0.35));
}

.player.playing .player-poster {
  opacity: 0;
  pointer-events: none;
}

.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: clamp(4.5rem, 8vw, 6rem);
  height: clamp(4.5rem, 8vw, 6rem);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 50px rgba(20, 18, 16, 0.35);
  transition: transform 0.45s var(--ease), opacity 0.5s var(--ease), background 0.4s var(--ease);
}

.play-btn:hover {
  transform: translate(-50%, -50%) scale(1.07);
}

.play-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.2rem;
  color: var(--primary);
}

.player.playing .play-btn {
  opacity: 0;
  pointer-events: none;
}

.play-label {
  position: absolute;
  left: 50%;
  bottom: clamp(1.4rem, 4vw, 2.6rem);
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #ece3d2;
  transition: opacity 0.5s var(--ease);
}

.player.playing .play-label {
  opacity: 0;
}

.film-caption {
  text-align: center;
  margin-top: 1.6rem;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

/* ── Fauna / Neighbours index ───────────────────────── */
.fauna {
  padding: clamp(6rem, 13vh, 11rem) 0;
  overflow: hidden;
}

.fauna-head {
  max-width: 50ch;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.fauna-head h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.8rem);
  margin: 0.9rem 0 1.3rem;
}

.fauna-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.fauna-list {
  list-style: none;
}

.fauna-item {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  width: 100%;
  text-align: left;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  transition: color 0.35s var(--ease), padding-left 0.45s var(--ease);
}

.fauna-item .idx {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 2.2rem;
}

.fauna-item .nm {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  line-height: 1.1;
  flex: 1;
  letter-spacing: -0.01em;
}

.fauna-item .lt {
  font-style: italic;
  font-family: var(--ff-display);
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.fauna-item:hover,
.fauna-item.active {
  color: var(--primary);
  padding-left: 0.8rem;
}

.fauna-item:hover .lt,
.fauna-item.active .lt {
  opacity: 1;
}

.fauna-item .thumb {
  display: none;
}

.fauna-stage {
  position: sticky;
  top: 6.5rem;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(20, 18, 16, 0.14);
}

.fauna-stage img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.7s var(--ease), transform 1.6s var(--ease);
}

.fauna-stage img.show {
  opacity: 1;
  transform: scale(1);
}

.fauna-stage .cap {
  position: absolute;
  left: 1.3rem;
  bottom: 1.2rem;
  z-index: 2;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f3ecdd;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 860px) {
  .fauna-grid {
    grid-template-columns: 1fr;
  }

  .fauna-stage {
    display: none;
  }

  .fauna-item {
    display: grid;
    grid-template-columns: minmax(0, 45%) 1fr;
    grid-template-areas:
      "img idx"
      "img nm"
      "img lt";
    column-gap: 1.4rem;
    row-gap: 0.15rem;
    align-items: center;
    padding: 1.1rem 0;
  }

  .fauna-item .thumb {
    display: block;
    grid-area: img;
    align-self: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 14px 36px rgba(20, 18, 16, 0.12);
  }

  .fauna-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .fauna-item .idx {
    grid-area: idx;
    align-self: end;
  }

  .fauna-item .nm {
    grid-area: nm;
    flex: none;
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .fauna-item .lt {
    grid-area: lt;
    align-self: start;
    opacity: 1;
    padding-left: 0;
  }

  .fauna-item:hover,
  .fauna-item.active {
    padding-left: 0;
  }
}

/* ── Houses ─────────────────────────────────────────── */
.houses {
  padding: clamp(5rem, 11vh, 9rem) 0;
  background: var(--surface);
  border-block: 1px solid var(--line-soft);
}

.houses-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.houses-head h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 18ch;
}

.houses-head .prose {
  max-width: 36ch;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.house {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2.4vw, 2.3rem) clamp(1.4rem, 2vw, 2rem) clamp(1.7rem, 2.4vw, 2.3rem);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 16rem;
  transition: background 0.5s var(--ease);
  overflow: hidden;
}

.houses-grid .house:nth-child(3n) {
  border-right: 0;
}

.house::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--primary) 10%, transparent));
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}

.house::after {
  content: '';
  position: absolute;
  top: 0.7rem;
  right: 0.6rem;
  z-index: 0;
  width: clamp(4.5rem, 9vw, 6.6rem);
  aspect-ratio: 1;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translate3d(0.35rem, -0.35rem, 0) scale(0.96);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
  background: center / contain no-repeat url('../logo_mark.png?v=22e3a85f');
  filter: blur(0.9px);
  -webkit-mask-image: radial-gradient(closest-side, #000 68%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 68%, transparent 100%);
}

.house:hover::before {
  opacity: 1;
}

.house:hover::after {
  opacity: 0.14;
  transform: translate3d(0, 0, 0) scale(1);
}

[data-theme="dark"] .house:hover::after {
  opacity: 0.18;
}

.house>* {
  position: relative;
  z-index: 1;
}

.house .h-no {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--accent);
}

.house .h-name {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.04;
  margin: 0.7rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.house .h-lat {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--muted);
}

.house .h-desc {
  margin-top: 1rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
  flex: 1;
}

.house .h-open {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--primary);
}

.house .h-open svg {
  width: 0.85rem;
  height: 0.85rem;
  transition: transform 0.4s var(--ease);
}

.house:hover .h-open svg {
  transform: translate(3px, -3px);
}

@media (max-width: 860px) {
  .houses-grid {
    grid-template-columns: 1fr 1fr;
  }

  .houses-grid .house:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .houses-grid .house:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 540px) {
  .houses-grid {
    grid-template-columns: 1fr;
  }

  .house {
    border-right: 0 !important;
    min-height: auto;
  }
}

/* ── Invitation / form ──────────────────────────────── */
.invite {
  padding: clamp(6rem, 13vh, 11rem) 0;
  position: relative;
}

.invite-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}

.invite-head h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  margin: 1rem 0 1.5rem;
  max-width: 14ch;
}

.invite-head .signoff {
  margin-top: 2.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.invite-head .signoff .rule {
  width: 40px;
}

.invite-head .signoff span {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--muted);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(1.6rem, 3vw, 2.8rem);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.field label {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.35s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 4.5rem;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 65%, transparent);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
}

.field select {
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Custom select (progressive enhancement; natywny select chowamy, gdy JS aktywny) */
select[data-enhance="select"].is-enhanced {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.cselect {
  position: relative;
}

.cselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.35s var(--ease);
}

.cselect-trigger:focus-visible {
  outline: none;
  border-color: var(--primary);
}

.cselect.is-open .cselect-trigger {
  border-color: var(--primary);
}

.cselect-trigger .cs-placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.cselect-chevron {
  flex: 0 0 auto;
  width: 0.85rem;
  height: 0.85rem;
  color: var(--muted);
  transition: transform 0.35s var(--ease), color 0.3s var(--ease);
}

.cselect.is-open .cselect-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.cselect-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 30;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 50px -28px rgba(30, 28, 23, 0.5);
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  transform-origin: top;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s var(--ease);
}

.cselect.is-open .cselect-list {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

.cselect-option {
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.cselect-option::before {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.cselect-option.is-active {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.cselect-option.is-selected {
  color: var(--primary);
}

.cselect-option.is-selected::before {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .cselect-list {
    transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
    transform: none;
  }

  .cselect.is-open .cselect-list {
    transform: none;
  }

  .cselect-chevron {
    transition: color 0.2s var(--ease);
  }
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
  margin: 0.4rem 0 1.6rem;
}

.consent input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.consent span {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 300;
}

.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  padding: 1.05rem 1.5rem;
  background: var(--primary);
  color: var(--surface);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.4s var(--ease), gap 0.4s var(--ease), transform 0.4s var(--ease);
}

[data-theme="dark"] .btn-send {
  color: var(--bg-dark);
}

.btn-send:hover {
  background: var(--primary-h);
  gap: 1.2rem;
}

.btn-send:disabled {
  opacity: 0.65;
  cursor: progress;
}

.btn-send svg {
  width: 1rem;
  height: 1rem;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--rust);
  min-height: 1.2em;
  text-align: center;
}

.form-foot {
  margin-top: 1.2rem;
  text-align: center;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

.thank-you {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem) 1rem;
}

.thank-you[hidden] {
  display: none;
}

.thank-you .rule {
  margin: 0 auto 1.8rem;
}

.thank-you h3 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.thank-you h3 em {
  font-style: italic;
  color: var(--primary);
}

.thank-you p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 46ch;
  margin: 0 auto 1.4rem;
}

.thank-you .sign {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--primary);
}

@media (max-width: 820px) {
  .invite-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
  padding: clamp(4rem, 8vh, 6rem) 0 2.5rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.7rem);
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.footer-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.footer-logo-secondary {
  height: 100px;
}

.footer-tag {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--text);
  max-width: 24ch;
}

.footer-col h4 {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.footer-col a,
.footer-col li {
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-col small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.76rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* ── Reveal ─────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-bg img {
    transform: none;
  }

  .hero-scroll .line {
    animation: none;
  }
}


/* ── Preloader ─────────────────────────────────────── */
body.loading {
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--bg);
  color: var(--text);
  will-change: clip-path;
  clip-path: inset(0 0 0 0);
}

.preloader::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 38%, transparent 55%, color-mix(in srgb, var(--primary) 7%, transparent) 100%);
}

.pre-logo {
  width: clamp(116px, 15vw, 172px);
  height: auto;
  opacity: 0;
  transform: translateY(14px);
  animation: pre-in 1s var(--ease) 0.08s forwards;
}

[data-theme="dark"] .pre-logo {
  filter: brightness(0) invert(0.92);
}

.pre-tagline {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  color: var(--muted);
  letter-spacing: 0.005em;
  text-align: center;
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  animation: pre-in 1s var(--ease) 0.34s forwards;
}

@keyframes pre-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.pre-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.5rem;
  opacity: 0;
  animation: pre-in 1s var(--ease) 0.55s forwards;
}

.pre-bar {
  width: clamp(170px, 27vw, 290px);
  height: 1px;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  overflow: hidden;
}

.pre-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s linear;
}

.pre-pct {
  font-family: var(--ff-sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

.preloader.done {
  animation: pre-reveal 2.1s var(--ease) forwards;
}

@keyframes pre-reveal {
  0% {
    clip-path: inset(0 0 0 0);
  }

  100% {
    clip-path: inset(0 0 0 100%);
  }
}

@media (prefers-reduced-motion: reduce) {

  .pre-logo,
  .pre-tagline,
  .pre-meter {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .preloader.done {
    animation: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease;
  }
}

/* ── Scroll to top ─────────────────────────────────── */
.to-top {
  position: fixed;
  right: clamp(1.1rem, 2.5vw, 2.2rem);
  bottom: clamp(1.1rem, 2.5vw, 2.2rem);
  z-index: 80;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--primary);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease),
    visibility 0.55s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.to-top svg {
  width: 1.15rem;
  height: 1.15rem;
}

@media (max-width: 640px) {
  .to-top {
    right: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transform: none;
  }

  .to-top.show {
    transform: none;
  }

  .to-top:hover {
    transform: none;
  }
}
