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

:root {
  --primary: #17607d;
  --primary-btn: #0f8aa6;
  --accent: #d95d39;
  --ink: #172126;
  --text: #26343b;
  --muted: #69777d;
  --line: #dbe5e8;
  --bg: #f6faf9;
  --panel: #ffffff;
  --radius: 8px;
  --max-width: 1160px;
  --shadow: 0 18px 50px rgba(23, 33, 38, 0.12);
}

html {
  scroll-behavior: smooth;
}

#home,
#content,
#blog-preview {
  scroll-margin-top: 86px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: var(--primary-btn);
  text-decoration: none;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(219, 229, 232, 0.82);
  background: rgba(246, 250, 249, 0.92);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  max-width: var(--max-width);
  min-height: 66px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-branding {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-branding .custom-logo {
  width: auto;
  max-height: 38px;
}

.site-branding__name {
  min-width: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.site-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.site-nav__link {
  min-width: 72px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 8px 13px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: #fff;
  background: var(--primary);
}

.hero {
  position: relative;
  min-height: clamp(520px, 76vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__media,
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__media {
  width: 100%;
  height: 116%;
  object-fit: cover;
  z-index: -3;
  will-change: transform;
}

.hero__media--fallback {
  background:
    linear-gradient(90deg, rgba(12, 24, 31, 0.78), rgba(12, 24, 31, 0.36)),
    linear-gradient(135deg, #17607d 0%, #13b59b 48%, #f2b15f 100%);
  background-size: cover;
  background-position: center;
}

.hero__overlay {
  z-index: -2;
  background: linear-gradient(0deg, rgba(10, 21, 27, 0.26), rgba(10, 21, 27, 0.08));
}

.hero__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 74px 24px 68px;
}

.hero__content {
  max-width: 760px;
  will-change: transform;
}

.eyebrow,
.section__heading span,
.feature-card__body span {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(19, 181, 155, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--primary);
  background: rgba(19, 181, 155, 0.12);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffe4d9;
  border-color: rgba(255, 228, 217, 0.3);
  background: rgba(217, 93, 57, 0.2);
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(2.75rem, 7vw, 5.4rem);
  font-weight: 850;
  line-height: 1;
}

.hero p {
  max-width: 590px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero__actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
}

.button--primary {
  color: #fff;
  background: var(--accent);
}

.button--secondary {
  color: #fff;
  background: var(--primary);
}

.button--ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.1);
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 76px;
}

.section {
  display: grid;
  gap: 26px;
}

.section + .section {
  margin-top: 66px;
}

.section__heading {
  max-width: 760px;
}

.section__heading h1,
.section__heading h2 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.08;
}

.section__heading p {
  margin: 14px 0 0;
  color: var(--muted);
}

.section__header-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.feature-card {
  min-height: 292px;
  display: grid;
  grid-template-rows: minmax(156px, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(23, 33, 38, 0.08);
}

.feature-card--large {
  grid-row: span 2;
  min-height: 602px;
}

.feature-card__media {
  min-height: 180px;
  background:
    linear-gradient(145deg, rgba(23, 96, 125, 0.72), rgba(19, 181, 155, 0.72)),
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.34), transparent 28%);
  background-size: cover;
  background-position: center;
}

.feature-card__body {
  display: grid;
  gap: 9px;
  padding: 20px;
}

.feature-card__body h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.25;
}

.feature-card--large h3 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.feature-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(23, 33, 38, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 138, 166, 0.34);
  box-shadow: 0 18px 46px rgba(23, 33, 38, 0.13);
}

.post-card__link {
  height: 100%;
  display: grid;
  color: inherit;
}

.post-card__image,
.post-card__placeholder {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
}

.post-card__placeholder {
  background:
    linear-gradient(145deg, rgba(23, 96, 125, 0.92), rgba(19, 181, 155, 0.92)),
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.46), transparent 22%);
}

.post-card__body {
  display: grid;
  gap: 9px;
  padding: 17px;
}

.post-card__date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.post-card__title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-post {
  max-width: 780px;
  margin: 0 auto;
}

.single-post__header {
  margin-bottom: 26px;
}

.single-post__back {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--primary-btn);
  font-size: 14px;
  font-weight: 800;
}

.single-post__header h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 850;
  line-height: 1.08;
}

.single-post__header time {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.single-post__image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.single-post__content {
  color: #223037;
  font-size: 17px;
  line-height: 1.82;
}

.single-post__content p {
  margin: 0 0 1.25rem;
}

.single-post__content h2 {
  margin: 2rem 0 0.75rem;
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.25;
}

.single-post__content h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
  font-size: 1.22rem;
}

.single-post__content h4 {
  margin: 1.35rem 0 0.45rem;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.35;
}

.single-post__content ul,
.single-post__content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.single-post__content li {
  margin-bottom: 0.4rem;
}

.single-post__content blockquote {
  margin: 1.5rem 0;
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
}

.single-post__content a {
  color: var(--primary-btn);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.single-post__content figure {
  margin: 1.5rem 0;
}

.single-post__content figure img {
  margin: 0;
}

.single-post__content figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.pagination a,
.pagination span {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel);
  font-size: 13px;
  font-weight: 800;
}

.pagination .current {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 24px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  background: #fff;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 920px) {
  .feature-grid,
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card--large {
    grid-column: 1 / -1;
    min-height: 460px;
  }

  .section__header-row {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .site-header__inner {
    min-height: 62px;
    padding: 10px 16px;
    gap: 12px;
  }

  .site-branding__name {
    font-size: 0.98rem;
  }

  .site-nav {
    flex-shrink: 0;
  }

  .site-nav__link {
    min-width: 58px;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner {
    padding: 58px 18px 48px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.4rem);
  }

  .hero__actions,
  .button {
    width: 100%;
  }

  .site-main {
    padding: 34px 16px 56px;
  }

  .feature-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card--large {
    min-height: 0;
  }

  .feature-card__media {
    min-height: 190px;
  }
}

@media (max-width: 420px) {
  .site-header__inner {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav__link {
    flex: 1;
  }
}
