/* ============================================================
 * Nomad North Studio — глобальные стили
 * Палитра:
 *   --navy   #0B1320   Midnight Navy (фон/чернила)
 *   --blue   #1E4ED8   North Blue (акцент)
 *   --ice    #DCEBFF   Ice Blue
 *   --fog    #E9EEF5   Fog Grey
 *   --white  #F8FBFF   Polar White (основной фон)
 * ============================================================ */

:root {
  --navy: #0b1320;
  --navy-soft: #1a2336;
  --blue: #1e4ed8;
  --blue-deep: #163bb0;
  --ice: #dcebff;
  --fog: #e9eef5;
  --white: #f8fbff;

  --ink: var(--navy);
  --ink-soft: #4a5670;
  --ink-muted: #8190ad;
  --line: rgba(11, 19, 32, 0.12);
  --line-soft: rgba(11, 19, 32, 0.08);

  --radius: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 0.25s;
  --t-med: 0.45s;
  --t-slow: 0.8s;

  --container: 1280px;
  --container-wide: 1480px;

  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 2px 10px rgba(11, 19, 32, 0.06);
  --shadow-md: 0 12px 36px rgba(11, 19, 32, 0.12);
  --shadow-lg: 0 24px 60px rgba(11, 19, 32, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
video,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--navy);
}
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
p {
  margin: 0 0 1em;
}
.muted {
  color: var(--ink-muted);
}
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--blue);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
 * Masthead (центрированная шапка-меню для публичных страниц)
 * ============================================================ */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: clamp(40px, 6vw, 80px) 24px clamp(28px, 4vw, 52px);
  text-align: center;
}
.masthead--compact {
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(20px, 3vw, 36px);
  gap: 20px;
}
.masthead__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--t-fast) var(--ease);
}
.masthead__logo:hover {
  opacity: 0.75;
}
.masthead__logo img {
  height: clamp(56px, 7vw, 88px);
  width: auto;
}
.masthead--compact .masthead__logo img {
  height: clamp(44px, 5vw, 60px);
}
.masthead__nav {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(18px, 3vw, 40px);
  flex-wrap: wrap;
  max-width: 100%;
}
.masthead__link {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-muted);
  padding: 4px 0;
  transition: color var(--t-fast) var(--ease);
}
.masthead__link:hover {
  color: var(--navy);
}
.masthead__link.active {
  color: var(--navy);
}
.masthead__link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 28px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}
.masthead__link--alt {
  font-style: italic;
  color: var(--blue);
  opacity: 0.85;
}
.masthead__link--alt:hover,
.masthead__link--alt.active {
  color: var(--blue);
  opacity: 1;
}
.masthead__link--alt.active::after {
  background: var(--blue);
}

/* Старая шапка — оставлена только для админки */
.site-header {
  background: rgba(248, 251, 255, 0.96);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  height: 36px;
  transition: opacity var(--t-fast) var(--ease);
}
.logo:hover {
  opacity: 0.75;
}
.logo__img {
  height: 36px;
  width: auto;
}

/* ============================================================
 * Анимация появления
 * ============================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
 * Works grid
 * ============================================================ */
.works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px) clamp(20px, 2.5vw, 36px);
  padding: clamp(20px, 3vw, 40px) 0 clamp(60px, 10vw, 120px);
}
.work {
  grid-column: span 1;
  display: block;
  position: relative;
  animation: workIn 0.55s var(--ease) both;
}
@keyframes workIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.work__media {
  position: relative;
  overflow: hidden;
  background: var(--fog);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--t-med) var(--ease),
    transform var(--t-med) var(--ease);
}
.work:hover .work__media {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
  will-change: transform;
}
.work:hover .work__media img {
  transform: scale(1.05);
}

.work__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 19, 32, 0.55) 0%,
    rgba(11, 19, 32, 0) 55%
  );
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}
.work:hover .work__overlay {
  opacity: 1;
}

.work__cat-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 12px;
  background: rgba(248, 251, 255, 0.95);
  border-radius: var(--radius-pill);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  backdrop-filter: blur(8px);
}

.work__arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transform: translate(-6px, 6px) rotate(-20deg);
  transition:
    opacity var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
  pointer-events: none;
}
.work:hover .work__arrow {
  opacity: 1;
  transform: translate(0, 0) rotate(0);
}

.work__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  text-align: center;
}
.work__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: color var(--t-fast) var(--ease);
}
.work:hover .work__title {
  color: var(--blue);
}
.work__meta {
  font-size: 12px;
  color: var(--ink-muted);
  font-feature-settings: "tnum";
  letter-spacing: 0.05em;
}

/* ============================================================
 * Reveal on scroll
 * ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
 * Project page
 * ============================================================ */
.project-header {
  padding: clamp(20px, 4vw, 56px) 0 clamp(12px, 2vw, 24px);
}
.project-header__inner {
  text-align: center;
}
.project-header__meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 22px;
}
.project-header__meta .badge {
  padding: 6px 14px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius-pill);
  letter-spacing: 0.14em;
}
.project-header__title {
  font-size: clamp(36px, 6.5vw, 88px);
  margin: 0 auto;
  max-width: 18ch;
  color: var(--navy);
}
.project-cover {
  position: relative;
  width: 100%;
  min-height: 70vh;
  overflow: hidden;
  background: var(--navy);
  display: flex;
  align-items: flex-end;
  color: var(--white);
}
.project-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  animation: zoomIn 1.4s var(--ease) both;
}
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 19, 32, 0.78) 0%,
    rgba(11, 19, 32, 0.25) 45%,
    rgba(11, 19, 32, 0.05) 80%
  );
  z-index: 1;
}
.project-cover__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 60px 32px clamp(50px, 8vw, 100px);
  max-width: var(--container-wide);
  margin: 0 auto;
}
.project-cover__meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 22px;
  opacity: 0.9;
  font-weight: 500;
}
.project-cover__meta .badge {
  padding: 6px 14px;
  background: var(--blue);
  border-radius: var(--radius-pill);
}
.project-cover__title {
  font-size: clamp(40px, 8vw, 110px);
  margin: 0 0 16px;
  max-width: 14ch;
  color: var(--white);
}
.project-cover__lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(248, 251, 255, 0.82);
  max-width: 62ch;
}

.project-body {
  padding: clamp(24px, 4vw, 56px) 0 clamp(40px, 6vw, 80px);
}
.project-description {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.7;
}

.project-video {
  max-width: var(--container-wide);
  margin: clamp(40px, 6vw, 80px) auto 0;
  padding: 0 32px;
}
.project-video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow-lg);
}
.project-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-gallery {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) 32px 0;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 48px);
}
.project-photo {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--fog);
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--t-med) var(--ease),
    transform var(--t-med) var(--ease);
}
.project-photo:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.project-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.2s var(--ease);
}
.project-photo:hover img {
  transform: scale(1.02);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 36px 0 0;
  padding: 0 32px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  transition: color var(--t-fast) var(--ease);
}
.back-link:hover {
  color: var(--blue);
}

.project-footer {
  border-top: 1px solid var(--line-soft);
  padding: clamp(50px, 8vw, 100px) 0;
  margin-top: clamp(60px, 8vw, 120px);
  text-align: center;
}
.project-footer .display {
  font-size: clamp(28px, 4vw, 52px);
  margin-bottom: 24px;
}

/* ============================================================
 * Social page (контакты)
 * ============================================================ */
.social-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: clamp(20px, 4vw, 60px) 0 clamp(60px, 10vw, 120px);
  max-width: 880px;
  margin: 0 auto;
}
.social-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line-soft);
  min-height: 150px;
  transition:
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease);
}
.social-card:hover {
  background: var(--navy);
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}
.social-card:hover .social-card__arrow {
  transform: translate(4px, -4px);
  color: var(--ice);
}
.social-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--blue);
  transition: color var(--t-fast) var(--ease);
}
.social-card:hover .social-card__label {
  color: var(--ice);
}
.social-card__arrow {
  position: absolute;
  top: 22px;
  right: 28px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--navy);
  transition:
    color var(--t-fast) var(--ease),
    transform var(--t-med) var(--ease);
}
.social-card__value {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: auto;
}

/* ============================================================
 * Lightbox
 * ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 32, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: lbIn 0.25s var(--ease);
}
.lightbox[hidden] {
  display: none;
}

/* ============================================================
 * Toast (всплывающие уведомления)
 * ============================================================ */
.toast-host {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast {
  pointer-events: auto;
  min-width: 240px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--blue);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.toast.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast--ok {
  border-left-color: #2ecc71;
}
.toast--error {
  border-left-color: #ff5a52;
}
@media (max-width: 720px) {
  .toast-host {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}
@keyframes lbIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 8px;
  cursor: zoom-out;
  transition: transform var(--t-med) var(--ease);
}
.lightbox.is-zoomed {
  overflow: auto;
  padding: 0;
  align-items: flex-start;
  justify-content: flex-start;
}
.lightbox.is-zoomed img {
  max-width: none;
  max-height: none;
  width: 180%;
  height: auto;
  cursor: zoom-out;
  border-radius: 0;
}
.lightbox__close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-pill);
  background: rgba(248, 251, 255, 0.1);
  border: 1px solid rgba(248, 251, 255, 0.22);
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
  transition: background var(--t-fast) var(--ease);
}
.lightbox__close:hover {
  background: rgba(248, 251, 255, 0.22);
}

/* ============================================================
 * Buttons & Forms
 * ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  font: 600 14px/1 var(--font-body);
  cursor: pointer;
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn--ghost {
  background: transparent;
  color: var(--navy);
}
.btn--ghost:hover {
  background: var(--navy);
  color: var(--white);
}
.btn--danger {
  background: transparent;
  color: #c0322f;
  border-color: rgba(192, 50, 47, 0.4);
}
.btn--danger:hover {
  background: #c0322f;
  color: #fff;
  border-color: #c0322f;
}
.btn--sm {
  padding: 9px 16px;
  font-size: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(11, 19, 32, 0.15);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
 * Admin
 * ============================================================ */
.admin-shell {
  padding: 40px 0 80px;
}
.admin-shell h1 {
  font-size: clamp(32px, 4vw, 52px);
  margin-bottom: 28px;
}

.auth {
  max-width: 460px;
  margin: 80px auto;
}
.auth h1 {
  font-size: 32px;
  margin-bottom: 6px;
}
.auth__sub {
  color: var(--ink-soft);
  margin-bottom: 26px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 22px;
  letter-spacing: -0.02em;
}

.field {
  display: block;
  margin-bottom: 18px;
}
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="password"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  transition:
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(30, 78, 216, 0.12);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.form-msg {
  margin: 14px 0 0;
  min-height: 1.2em;
  font-size: 14px;
}
.form-msg.is-error {
  color: #c0322f;
}
.form-msg.is-ok {
  color: #1f8c45;
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  background: var(--fog);
  cursor: pointer;
  transition:
    border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
  color: var(--ink-soft);
  font-size: 14px;
}
.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--blue);
  background: var(--ice);
  color: var(--blue);
}
.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone--filled {
  padding: 0;
  border-style: solid;
  background: var(--fog);
}
.dropzone__preview {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 11px;
}
.dropzone__preview--sm {
  height: 140px;
}
.dropzone__remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  z-index: 2;
  color: var(--navy);
  transition: background var(--t-fast) var(--ease);
}
.dropzone__remove:hover {
  background: #fff;
  color: #c0322f;
}

/* Photos builder */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.photo-slot {
  position: relative;
}
.photo-slot__tools {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}
.photo-tool {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--navy);
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}
.photo-tool:hover {
  background: var(--blue);
  color: var(--white);
}
.photo-tool:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Admin existing list */
.admin-list {
  display: grid;
  gap: 12px;
}
.admin-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--white);
  transition:
    background var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.admin-item:hover {
  box-shadow: var(--shadow-sm);
}
.admin-item__thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--fog);
  overflow: hidden;
  flex-shrink: 0;
}
.admin-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-item__body {
  flex: 1;
  min-width: 0;
}
.admin-item__title {
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}
.admin-item__desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
 * Footer
 * ============================================================ */
.site-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 36px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line-soft);
  color: var(--ink-muted);
  font-size: 13px;
  background: var(--white);
}
.footer__top {
  justify-self: start;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-soft);
  transition: color var(--t-fast) var(--ease);
}
.footer__top:hover {
  color: var(--blue);
}
.footer__copy {
  margin: 0;
  justify-self: center;
  text-align: center;
}
.footer__link {
  justify-self: end;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 15px;
  transition: color var(--t-fast) var(--ease);
}
.footer__link:hover {
  color: var(--blue);
}

/* ============================================================
 * Адаптив
 * ============================================================ */
@media (max-width: 1080px) {
  .works {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  .social-cards {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container,
  .container-wide {
    padding: 0 20px;
  }

  .masthead {
    gap: 20px;
    padding: 28px 16px 24px;
  }
  .masthead__nav {
    gap: 16px 22px;
    padding: 0 4px;
  }
  .masthead__link {
    font-size: 20px;
  }

  .header-inner {
    height: 60px;
  }
  .logo__img {
    height: 30px;
  }

  .works {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 60px;
  }
  .work__media {
    aspect-ratio: 4 / 3;
  }

  .project-cover {
    min-height: 60vh;
  }
  .project-cover__inner {
    padding: 32px 20px 36px;
  }
  .project-header {
    padding: 20px 0 8px;
  }
  .project-header__title {
    font-size: clamp(28px, 9vw, 44px);
  }
  .project-header__meta {
    margin-bottom: 14px;
  }
  .project-description,
  .project-video,
  .project-gallery,
  .back-link {
    padding-left: 20px;
    padding-right: 20px;
  }
  /* Удобнее тапать на мобильном */
  .photo-tool {
    width: 34px;
    height: 34px;
  }
  .form-actions .btn {
    width: 100%;
  }

  .social-card {
    padding: 22px 24px;
    min-height: 130px;
  }
  .social-card__arrow {
    top: 18px;
    right: 22px;
    font-size: 20px;
  }

  .card {
    padding: 22px;
  }
  .auth {
    margin: 40px auto;
  }
  .admin-item {
    flex-wrap: wrap;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 28px 20px;
    gap: 10px;
  }
  .footer__top,
  .footer__copy,
  .footer__link {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .work__media img,
  .project-photo img {
    transition: none !important;
  }
}
