:root {
  --blue: #4670b5;
  --blue-deep: #2f5290;
  --green: #30a948;
  --gold: #f5b837;
  --orange: #ed7d31;
  --red: #c0181a;
  --ink: #1c1c1c;
  --muted: #5a5f6a;
  --line: rgba(28, 28, 28, 0.1);
  --shadow: 0 20px 48px rgba(70, 112, 181, 0.1);
  --radius: 26px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-gap: clamp(64px, 9vw, 128px);
}

[hidden] {
  display: none !important;
}

html {
  background: #fff;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  background: #fff;
}

img {
  max-width: 100%;
  display: block;
}

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

h1,
h2,
p,
ul,
ol {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Шапка ---------- */

.site-header {
  position: relative;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  min-height: 88px;
}

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

.brand-logo {
  height: 46px;
  width: auto;
}

.brand-divider {
  width: 1px;
  height: 30px;
  background: var(--line);
}

.brand-audience {
  position: relative;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  white-space: nowrap;
}

.brand-stroke {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 8px;
  overflow: visible;
}

.brand-stroke path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3.5;
  stroke-linecap: round;
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 104px) 0 var(--section-gap);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.hero-art {
  position: relative;
  z-index: 0;
  margin: 0 calc(var(--gutter) * -1.4) 0 -14%;
  pointer-events: none;
}

.hero-art img {
  width: 100%;
  height: auto;
  opacity: 0.97;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(
    ellipse 76% 82% at 56% 50%,
    #000 42%,
    rgba(0, 0, 0, 0.72) 66%,
    transparent 88%
  );
  mask-image: radial-gradient(
    ellipse 76% 82% at 56% 50%,
    #000 42%,
    rgba(0, 0, 0, 0.72) 66%,
    transparent 88%
  );
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: -14%;
  background:
    linear-gradient(90deg, #fff 2%, rgba(255, 255, 255, 0.62) 16%, transparent 38%),
    radial-gradient(ellipse 70% 76% at 56% 50%, transparent 56%, #fff 90%);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--blue-deep);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.lead {
  max-width: 44ch;
  margin: 20px 0 32px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(70, 112, 181, 0.26);
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: var(--blue-deep);
  transform: translateY(-1px);
}

.button--ghost {
  background: #fff;
  color: var(--blue-deep);
  border: 2px solid var(--blue);
  box-shadow: none;
}

.button--ghost:hover {
  background: var(--blue);
  color: #fff;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin-top: 28px;
  list-style: none;
}

.hero-tags li {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.9rem;
}

.hero-tags li:nth-child(1) { color: var(--green); }
.hero-tags li:nth-child(2) { color: var(--blue); }
.hero-tags li:nth-child(3) { color: var(--orange); }
.hero-tags li:nth-child(4) { color: var(--red); }

@media (min-width: 1001px) {
  .hero {
    min-height: max(780px, 100svh);
    display: flex;
    align-items: center;
    padding-top: clamp(72px, 8vh, 112px);
    padding-bottom: clamp(88px, 11vh, 144px);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  .hero-copy {
    max-width: 38rem;
  }

  .hero-art {
    transform: scale(1.18);
    transform-origin: center center;
  }

  .hero .eyebrow {
    margin-bottom: 18px;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 4.6vw, 4.25rem);
    line-height: 1.08;
  }

  .hero .lead {
    max-width: 46ch;
    margin: 26px 0 38px;
    font-size: 1.2rem;
    line-height: 1.72;
  }

  .hero .button {
    min-height: 58px;
    padding: 0 31px;
    font-size: 1.02rem;
  }

  .hero .hero-tags {
    gap: 12px;
    margin-top: 34px;
  }

  .hero .hero-tags li {
    padding: 9px 16px;
    font-size: 0.98rem;
  }
}

/* ---------- История: базовый вертикальный вид ---------- */

.story {
  position: relative;
  padding-bottom: var(--section-gap);
}

.story-viewport {
  overflow: visible;
}

.story-track {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.panel {
  display: flex;
  align-items: center;
}

.panel-inner {
  width: 100%;
  max-width: 46rem;
}

.panel-kicker {
  display: inline-block;
  margin-bottom: 16px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--gold);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  max-width: 24ch;
}

.panel-text {
  max-width: 40ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.panel-text--lead {
  max-width: 34ch;
  color: var(--ink);
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  font-weight: 700;
  line-height: 1.5;
}

.panel-figure {
  margin: 24px 0 0;
  color: var(--blue-deep);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.panel-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.panel-marks li {
  padding: 14px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-marks strong {
  display: block;
  color: var(--blue-deep);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.panel-marks span {
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
  margin-top: 32px;
  padding: 0;
  counter-reset: step;
  list-style: none;
}

.panel-steps li {
  position: relative;
  padding-top: 54px;
}

.panel-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 800;
}

.panel-steps li:nth-child(2)::before { background: var(--blue); }
.panel-steps li:nth-child(3)::before { background: var(--green); }

.panel-steps strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.panel-steps span {
  color: var(--muted);
  line-height: 1.65;
}

.panel-flow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  font-weight: 800;
  font-size: 1.05rem;
}

.panel-flow span:first-child,
.panel-flow span:last-child {
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff3d6;
}

.panel-flow span:last-child {
  background: #e8f1ff;
  color: var(--blue-deep);
}

.panel-flow-arrow {
  color: var(--orange);
  font-size: 1.4rem;
}

.panel--final .button {
  margin-top: 30px;
}

/* Акцентные слова: без скрипта уже цветные */
.crayon {
  position: relative;
  display: inline-block;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.crayon[data-tone="green"] { color: var(--green); }
.crayon[data-tone="blue"] { color: var(--blue); }
.crayon[data-tone="orange"] { color: var(--orange); }
.crayon[data-tone="red"] { color: var(--red); }
.crayon[data-tone="gold"] { color: var(--gold); }

.crayon-stroke {
  position: absolute;
  left: -2%;
  bottom: -0.16em;
  width: 104%;
  height: 0.22em;
  overflow: visible;
  pointer-events: none;
}

.crayon-stroke path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
}

/* SplitText оставляет span строчным — без этого повороты символов не отрисуются */
.crayon-text > span {
  display: inline-block;
}

.story-hint {
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.story-progress {
  display: none;
}

/* ---------- История: закреплённый горизонтальный вид ---------- */

.story.is-horizontal {
  height: 100vh;
  padding-bottom: 0;
  overflow: hidden;
}

.story.is-horizontal .story-viewport {
  height: 100vh;
  overflow: hidden;
}

.story.is-horizontal .story-track {
  display: flex;
  align-items: center;
  gap: clamp(48px, 8vw, 140px);
  height: 100%;
  width: max-content;
  max-width: none;
  margin: 0;
  padding: 0 clamp(48px, 9vw, 160px);
  will-change: transform;
}

.story.is-horizontal .panel {
  flex: 0 0 auto;
  width: min(74vw, 780px);
  height: 100%;
}

.story.is-horizontal .panel--wide {
  width: min(88vw, 1020px);
}

.story.is-horizontal .panel-inner {
  max-width: none;
}

.story.is-horizontal .story-progress {
  position: absolute;
  left: clamp(48px, 9vw, 160px);
  right: clamp(48px, 9vw, 160px);
  bottom: clamp(28px, 5vh, 56px);
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(28, 28, 28, 0.08);
  overflow: hidden;
}

.story.is-horizontal .story-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--green),
    var(--blue),
    var(--gold),
    var(--orange),
    var(--red)
  );
  transform: scaleX(0);
  transform-origin: left center;
}

.site-footer {
  padding: 32px 0 56px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-art {
    order: -1;
    margin: 0 calc(var(--gutter) * -1) clamp(8px, 2vw, 24px);
  }

  .hero-art img {
    -webkit-mask-image: radial-gradient(
      ellipse 78% 76% at 50% 46%,
      #000 40%,
      rgba(0, 0, 0, 0.6) 64%,
      transparent 88%
    );
    mask-image: radial-gradient(
      ellipse 78% 76% at 50% 46%,
      #000 40%,
      rgba(0, 0, 0, 0.6) 64%,
      transparent 88%
    );
  }

  .hero-art::after {
    background:
      linear-gradient(180deg, transparent 44%, #fff 92%),
      radial-gradient(ellipse 80% 74% at 50% 46%, transparent 56%, #fff 92%);
  }

  .story-hint {
    display: none;
  }
}

/* ---------- Навигация ---------- */

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.94rem;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

/* ---------- Страница фильмов ---------- */

.films {
  padding: clamp(48px, 7vw, 96px) 0 var(--section-gap);
}

.films-head {
  max-width: 34rem;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.films-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
}

.films-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.films-sections {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
}

.films-block-title {
  margin: 0 0 22px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: clamp(20px, 2.6vw, 40px);
}

.film {
  --tone: var(--blue);
}

.film-frame {
  position: relative;
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  isolation: isolate;
  transition: transform 0.25s ease;
}

.film:hover .film-frame {
  transform: rotate(-1.2deg) translateY(-4px);
}

.film-wash {
  position: absolute;
  inset: 8px;
  z-index: 0;
  border-radius: 18px;
  background:
    repeating-linear-gradient(
      118deg,
      color-mix(in srgb, var(--tone) 42%, transparent) 0 4px,
      transparent 4px 10px
    ),
    color-mix(in srgb, var(--tone) 12%, #fff);
}

.film-sketch {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.film-outline {
  fill: none;
  stroke: var(--tone);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.film-number {
  position: relative;
  z-index: 2;
  max-width: 86%;
  color: var(--tone);
  font-family: "Caveat", "Nunito", cursive;
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
  text-shadow:
    0.6px 0.8px 0 color-mix(in srgb, var(--tone) 35%, #fff),
    -0.4px 0.4px 0 color-mix(in srgb, #fff 55%, transparent);
}

.film-number[data-long] {
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  line-height: 1;
}

.film-title {
  margin-top: 16px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.film-quality {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 620px) {
  .films-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* ---------- Обновления сайта ---------- */

.updates {
  padding: clamp(40px, 6vw, 80px) 0 var(--section-gap);
}

.updates-inner {
  max-width: 42rem;
}

.updates-head {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.updates-head h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.updates-lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.updates-prose {
  display: grid;
  gap: 12px;
}

.updates-prose h2 {
  margin-top: 18px;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.updates-prose p {
  line-height: 1.7;
}

.updates-path {
  font-weight: 800;
  color: var(--blue-deep);
}

.updates-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.updates-card h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.updates-card p {
  color: var(--ink);
  line-height: 1.65;
}

.updates-kicker {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.updates-list {
  display: grid;
  gap: 8px;
  padding-left: 1.15rem;
  line-height: 1.55;
}

.updates-card--next {
  background: color-mix(in srgb, var(--gold) 10%, #fff);
}

.updates-related {
  margin-top: clamp(32px, 5vw, 52px);
}

.updates-related h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.updates-related ul {
  display: grid;
  gap: 18px;
  padding: 0;
  list-style: none;
}

.updates-related time {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.updates-related a {
  color: var(--blue);
  font-weight: 800;
}

.updates-related a:hover {
  color: var(--blue-deep);
}

.updates-related p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer-inner a {
  color: var(--blue);
  font-weight: 800;
}

.site-footer-inner a:hover {
  color: var(--blue-deep);
}

/* ---------- Страница добрых дел ---------- */

.deeds-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 88px) 0 28px;
  background:
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 52%),
    radial-gradient(70% 60% at 0% 80%, color-mix(in srgb, var(--green) 14%, transparent), transparent 48%),
    #fff;
}

.deeds-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.deeds-hero-copy {
  max-width: 36rem;
}

.deeds-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
}

.deeds-title:hover {
  background-image: linear-gradient(
    90deg,
    var(--green),
    var(--blue),
    var(--gold),
    var(--orange),
    var(--red),
    var(--green)
  );
  background-size: 220% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: brand-shimmer 2.2s linear infinite;
}

.deeds-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.deeds-collage {
  position: relative;
  min-height: 360px;
}

.deeds-polaroid {
  position: absolute;
  width: min(42%, 210px);
  margin: 0;
  padding: 12px 12px 40px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(47, 82, 144, 0.16);
  isolation: isolate;
  transition: transform 0.22s ease;
}

.deeds-polaroid::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 10px;
  background-image: linear-gradient(
    120deg,
    var(--green),
    var(--blue),
    var(--gold),
    var(--orange),
    var(--red),
    var(--green)
  );
  background-size: 280% 280%;
  opacity: 0.35;
}

.deeds-polaroid:hover::before {
  opacity: 1;
  animation: brand-shimmer 2.2s linear infinite;
}

.deeds-polaroid svg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
}

.deeds-polaroid figcaption {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  color: var(--blue-deep);
  font-family: "Caveat", "Nunito", cursive;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}

.deeds-polaroid--left {
  top: 28px;
  left: 0;
  transform: rotate(-9deg);
}

.deeds-polaroid--mid {
  top: 78px;
  left: 28%;
  z-index: 2;
  transform: rotate(3deg);
}

.deeds-polaroid--right {
  top: 8px;
  right: 4%;
  transform: rotate(11deg);
}

.deeds-polaroid:hover {
  z-index: 3;
  transform: rotate(0deg) translateY(-6px);
}

.deeds {
  padding: 12px 0 var(--section-gap);
}

.deeds-bar {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

.deeds-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px;
  background:
    radial-gradient(80% 90% at 0% 0%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 46%),
    radial-gradient(70% 80% at 100% 100%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 42%),
    color-mix(in srgb, var(--blue) 5%, #fff);
  box-shadow: var(--shadow);
}

.deeds-empty-copy {
  max-width: 36rem;
  text-align: center;
}

.deeds-empty-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.deeds-empty-copy p {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.deeds-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.deeds-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
  transition: transform 0.22s ease;
}

.deeds-card::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  background-image: linear-gradient(
    120deg,
    var(--green),
    var(--blue),
    var(--gold),
    var(--orange),
    var(--red),
    var(--green)
  );
  background-size: 280% 280%;
  opacity: 0.22;
}

.deeds-card:hover {
  transform: translateY(-4px);
}

.deeds-card:hover::before {
  opacity: 1;
  animation: brand-shimmer 2.4s linear infinite;
}

.deeds-card-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--blue) 8%, #fff);
  cursor: pointer;
}

.deeds-card-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.deeds-card:hover .deeds-card-cover img {
  transform: scale(1.04);
}

.deeds-card-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(28, 28, 28, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.deeds-card-body {
  display: grid;
  gap: 6px;
  padding: 16px 18px 18px;
}

.deeds-card h2 {
  font-size: 1.14rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.deeds-card time,
.deeds-card .deeds-place,
.deeds-card-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.deeds-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(18, 22, 34, 0.86);
}

.deeds-lightbox[hidden] {
  display: none !important;
}

.deeds-lightbox img {
  max-width: min(920px, 100%);
  max-height: 72vh;
  object-fit: contain;
  border-radius: 16px;
}

.deeds-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
}

.deeds-lightbox-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.deeds-lightbox-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  cursor: pointer;
}

.deeds-lightbox-thumbs button.is-current {
  border-color: var(--gold);
}

.deeds-lightbox-thumbs img {
  width: 64px;
  height: 64px;
  max-height: none;
  object-fit: cover;
  border-radius: 8px;
}

@keyframes brand-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@media (max-width: 800px) {
  .deeds-hero-inner {
    grid-template-columns: 1fr;
  }

  .deeds-collage {
    min-height: 280px;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deeds-title:hover,
  .deeds-polaroid:hover::before,
  .deeds-card:hover::before,
  .site-nav a[href="deeds.html"]:hover {
    animation: none;
  }
}

.site-nav a[href="deeds.html"]:hover {
  background-image: linear-gradient(
    90deg,
    var(--green),
    var(--blue),
    var(--gold),
    var(--orange),
    var(--red),
    var(--green)
  );
  background-size: 220% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: brand-shimmer 1.8s linear infinite;
}
