:root {
  --bg: #f8f6ef;
  --ink: #1f2533;
  --ink-soft: #505972;
  --accent: #f0582d;
  --accent-dark: #b93f1d;
  --card: #fffdf9;
  --line: #d2cdc0;
  --shadow: 0 20px 45px rgba(31, 37, 51, 0.12);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 12%, #ffe5c2 0%, transparent 35%),
    radial-gradient(circle at 85% 10%, #ffd4c8 0%, transparent 33%),
    linear-gradient(180deg, #f9f8f2 0%, #f3efe4 100%);
  position: relative;
}

.background-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: linear-gradient(
      90deg,
      rgba(31, 37, 51, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(rgba(31, 37, 51, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

.site-header,
main,
.site-footer {
  width: min(1100px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 4rem 0 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}

.brand-kicker {
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Archivo", "Trebuchet MS", sans-serif;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  letter-spacing: -0.02em;
}

.brand p {
  margin: 1rem 0 0;
  max-width: 56ch;
  color: var(--ink-soft);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

a {
  color: inherit;
}

.button {
  display: inline-block;
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  text-decoration: none;
  font-weight: 700;
  transition: 0.22s ease;
}

.button:hover {
  background: var(--ink);
  color: var(--card);
}

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

.button-solid:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.featured {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.featured-header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1rem;
}

.label {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  color: var(--accent-dark);
  font-weight: 700;
}

.feature-switch {
  display: inline-flex;
  background: #f1ece0;
  border-radius: 999px;
  padding: 0.22rem;
}

.feature-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.feature-tab.is-active {
  background: #fff;
  box-shadow: 0 3px 9px rgba(20, 22, 30, 0.12);
}

.feature-panel {
  display: none;
}

.feature-panel.is-visible {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
  align-items: stretch;
  animation: fade-slide 280ms ease;
}

.media-frame {
  background: #111;
  border-radius: 0.95rem;
  overflow: hidden;
  min-height: 280px;
}

.media-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
}

.feature-copy {
  background: #f6f2e9;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
}

.feature-copy p {
  margin: 0;
  color: var(--ink-soft);
}

.feature-type {
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.feature-copy-blog {
  width: min(680px, 100%);
}

.previous-posts {
  margin-top: 2.2rem;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-title-row a {
  color: var(--accent-dark);
  font-weight: 700;
}

.post-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(26, 29, 39, 0.07);
  display: grid;
  gap: 0.7rem;
}

.post-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.post-card h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.post-card a {
  color: var(--accent-dark);
  font-weight: 700;
}

.site-footer {
  margin-top: 2.6rem;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
  font-weight: 800;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .feature-panel.is-visible {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 2.4rem;
  }

  .featured {
    padding: 0.9rem;
  }

  .featured-header {
    align-items: start;
    flex-direction: column;
  }

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

  .site-footer {
    flex-direction: column;
    align-items: start;
    gap: 0.5rem;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
