/* ya-copy.ru — общие стили портфолио копирайтера */

:root {
  --ink: #14121a;
  --ink-soft: #3d3848;
  --paper: #f6f1e8;
  --paper-hot: #fff9f0;
  --accent: #ff3366;
  --accent-2: #6c3bff;
  --accent-3: #00c6b3;
  --sun: #ffd447;
  --grid-line: rgba(20, 18, 26, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(20, 18, 26, 0.12);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  /* Как подчёркивание у логотипа: коралл → жёлтый акцент */
  --gradient-brand: linear-gradient(90deg, var(--accent), var(--sun));
}

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

html {
  scroll-behavior: smooth;
  /* Резервируем ширину под скроллбар — шапка/футер не смещаются между страницами */
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 120% 80% at 0% -20%, rgba(255, 51, 102, 0.14), transparent 50%),
    radial-gradient(ellipse 100% 60% at 100% 0%, rgba(108, 59, 255, 0.12), transparent 45%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0, 198, 179, 0.08), transparent 40%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: var(--accent-2);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

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

/* Скрытый SVG с defs (градиенты для иконок на странице контактов) */
.svg-resource {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.site-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(246, 241, 232, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(20, 18, 26, 0.06);
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
}

.logo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: 2px;
  opacity: 0.85;
}

.logo:hover {
  color: var(--accent-2);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
}

.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(20, 18, 26, 0.08);
  color: var(--ink);
}

.nav a.is-active {
  background: var(--ink);
  color: var(--paper-hot);
  border-color: var(--ink);
}

.nav a.is-active:hover {
  color: var(--sun);
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem) clamp(4rem, 8vw, 6rem);
}

.hero-deco {
  position: relative;
}

.hero-deco::before {
  content: "«";
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 12rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  left: -0.05em;
  top: -0.35em;
  pointer-events: none;
  z-index: 0;
}

.page-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin: 0 0 2.5rem;
  max-width: 20ch;
}

.page-title--contacts {
  max-width: none;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Кейсы: текст на всю ширину, макеты снизу — полная высота скриншотов, без обрезки */
.case {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--paper-hot);
  border-radius: var(--radius);
  border: 1px solid rgba(20, 18, 26, 0.07);
  box-shadow: 0 12px 40px rgba(20, 18, 26, 0.07);
}

.case-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--ink);
  margin: 0 0 1.25rem;
  line-height: 1.35;
}

.case__intro p {
  margin: 0 0 1rem;
  max-width: 65ch;
}

.case__intro p:last-child {
  margin-bottom: 0;
}

.case__mockups {
  display: grid;
  /* На узких экранах — одна колонка на всю ширину */
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: start;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 2px dashed rgba(20, 18, 26, 0.1);
}

.case__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(20, 18, 26, 0.08);
  box-shadow: 0 10px 32px rgba(20, 18, 26, 0.08);
  background: rgba(20, 18, 26, 0.03);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.case__figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(108, 59, 255, 0.12);
}

.case__mockup-link {
  display: block;
  line-height: 0;
  outline-offset: 4px;
}

.case__mockup-link:focus-visible {
  outline: 3px solid var(--accent-2);
}

.case__figure img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.case__caption {
  font-size: 0.92rem;
  padding: 0.85rem 1rem 1rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  border-top: 3px solid;
  border-image: linear-gradient(90deg, var(--accent-3), var(--accent-2), var(--accent)) 1;
  background: var(--paper-hot);
}

/* Та же ширина одного макета, что и в первом кейсе (1/3 ряда); лишние ячейки пустые */
@media (min-width: 900px) {
  .case__mockups {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cta-band {
  margin: 2.5rem 0;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, var(--ink) 0%, #2d2640 50%, #1f1a2e 100%);
  color: var(--paper-hot);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  right: -60%;
  background: radial-gradient(circle, rgba(255, 51, 102, 0.35) 0%, transparent 55%);
  pointer-events: none;
}

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

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #fff;
}

.cta-band p {
  margin: 0 0 1.25rem;
  opacity: 0.92;
  max-width: 40ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(105deg, var(--accent) 0%, #ff6b4a 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(255, 51, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 36px rgba(255, 51, 102, 0.5);
  color: #fff;
}

.btn:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.contacts-page {
  min-height: 60vh;
}

.contact-card {
  margin-top: 2rem;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--paper-hot);
  border-radius: var(--radius);
  border: 1px solid rgba(20, 18, 26, 0.08);
  box-shadow: var(--shadow);
  max-width: 520px;
  position: relative;
}

.contact-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
}

/* Цвет иконок как в мокапе Контакты.svg (#1c4587) */
.contact-card__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.contact-card__row:last-child {
  margin-bottom: 0;
}

.contact-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 51, 102, 0.1);
}

.contact-card__icon svg {
  display: block;
}

.contact-card__link {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
  min-width: 0;
  flex: 1;
}

.contact-card__link:hover {
  color: var(--accent);
}

.contact-card__row:hover .contact-card__icon {
  background: rgba(255, 107, 74, 0.14);
}

.contact-card__mail {
  font-size: 1.1rem;
  font-weight: 600;
}

.site-footer {
  flex-shrink: 0;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid rgba(20, 18, 26, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

.site-footer .nav {
  gap: 0.5rem 1rem;
}

.site-footer .nav a {
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

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

  .btn:hover,
  .case__figure:hover {
    transform: none;
  }
}
