:root {
  --bg: #f3f0e9;
  --surface: #fffdf9;
  --ink: #23282a;
  --muted: #747a7a;
  --line: #ded9cf;
  --accent: #d35546;
  --accent-dark: #ae4034;
  --teal: #2e7d6d;
  --shadow: 0 16px 38px rgba(35, 39, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
p {
  overflow-wrap: anywhere;
}

.site-header {
  padding: 34px 0 30px;
  background: #202527;
  color: #fff;
  border-bottom: 3px solid var(--accent);
}

.site-header__inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header__mark {
  width: 52px;
  height: 52px;
  margin: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--accent);
  border-radius: var(--radius);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
  font-weight: 730;
}

.site-header__copy > p {
  margin: 7px 0 0;
  color: #c9cdca;
  font-size: 14px;
  line-height: 1.5;
}

.content {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 78px;
  flex: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.content-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(35, 39, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.content-item:hover {
  transform: translateY(-4px);
  border-color: #c9c2b6;
  box-shadow: var(--shadow);
}

.content-item__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e9e6de;
}

.content-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.content-item:hover .content-item__image img {
  transform: scale(1.025);
}

.content-item__image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #8c918f;
  font-size: 14px;
  font-weight: 650;
}

.content-item__body {
  padding: 18px 20px 20px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.content-item h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 730;
}

.content-item__text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.content-item__link {
  margin-top: auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.content-item__link:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.content-item__link.is-empty {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
}

.arrow {
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}

.empty-note {
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.56);
  color: var(--muted);
  font-size: 12px;
}

.site-footer__inner,
.site-footer p {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer p {
  width: auto;
}

.site-footer a {
  color: var(--teal);
  font-weight: 650;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid rgba(211, 85, 70, 0.28);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  .content-grid .content-item:first-child {
    grid-column: span 2;
  }

  .content-grid .content-item:first-child .content-item__image {
    aspect-ratio: 21 / 10;
  }

  .content-grid .content-item:first-child .content-item__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
  }

  .content-grid .content-item:first-child .content-item__link {
    margin-top: 0;
    min-width: 132px;
  }
}

@media (max-width: 599px) {
  .site-header {
    padding: 26px 0 24px;
  }

  .site-header__inner {
    gap: 13px;
  }

  .site-header__mark {
    width: 44px;
    height: 44px;
  }

  .site-header h1 {
    font-size: 23px;
  }

  .site-header__copy > p {
    font-size: 12px;
  }

  .content {
    padding-top: 28px;
    padding-bottom: 52px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .content-item__image {
    aspect-ratio: 16 / 9;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
