:root {
  --envila-primary: #172433;
  --envila-accent: #c9a46a;
  --envila-secondary: #4b6486;
  --envila-surface: #f4eee3;
  --envila-surface-strong: #fbf7ef;
  --envila-text: #23262d;
  --envila-muted: #6b6c73;
  --envila-border: rgba(23, 36, 51, 0.12);
  --envila-shadow: 0 24px 60px rgba(23, 36, 51, 0.12);
  /* typography tokens: h1 56/700, h2 38/650, h3 26/650, h4 20/600, body 18/500, small 14/500, Georgia */
}

html {
  background: var(--envila-surface);
}

body.site-body {
  background:
    radial-gradient(circle at top left, rgba(201, 164, 106, 0.12), transparent 28%),
    linear-gradient(180deg, #f9f4ea 0%, #f4eee3 100%);
  color: var(--envila-text);
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 500;
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-main {
  padding-top: 5rem;
}

.site-shell {
  padding-left: 2rem;
  padding-right: 2rem;
}

.site-navbar {
  background: rgba(249, 244, 234, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--envila-border);
}

.site-wordmark,
.footer-wordmark {
  color: var(--envila-primary);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-nav-link,
.navbar-link.site-nav-link {
  color: var(--envila-primary) !important;
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
}

.site-nav-link::after,
.navbar-link.site-nav-link::after {
  background: var(--envila-accent);
  bottom: 0.5rem;
  content: "";
  height: 1px;
  left: 1rem;
  position: absolute;
  right: 1rem;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav-link:hover::after,
.navbar-link.site-nav-link:hover::after {
  transform: scaleX(1);
}

.hero-shell {
  background: linear-gradient(135deg, rgba(23, 36, 51, 0.96), rgba(23, 36, 51, 0.72));
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero-shell::before {
  background-image: linear-gradient(145deg, rgba(201, 164, 106, 0.2), transparent 55%);
  content: "";
  inset: 0;
  position: absolute;
}

.hero-media {
  inset: 0;
  opacity: 0.28;
  position: absolute;
}

.hero-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-inner {
  padding: 6rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

.hero-title {
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1rem;
  max-width: 12ch;
}

.hero-summary {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 42rem;
}

.page-wrap {
  padding: 2rem 0 5rem;
}

.editorial-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
}

.paper-panel {
  background: rgba(255, 251, 245, 0.92);
  border: 1px solid rgba(201, 164, 106, 0.22);
  border-radius: 1.5rem;
  box-shadow: var(--envila-shadow);
  padding: 2rem;
}

.paper-panel--raised {
  margin-top: -3.5rem;
  position: relative;
  z-index: 2;
}

.page-title {
  color: var(--envila-primary);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.page-meta {
  color: var(--envila-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.content-stream > * + * {
  margin-top: 1.25rem;
}

.content-stream h1,
.content-stream h2,
.content-stream h3,
.content-stream h4,
.content-stream h5,
.content-stream h6 {
  color: var(--envila-primary);
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.content-stream h1 {
  font-size: 56px;
  font-weight: 700;
}

.content-stream h2 {
  font-size: 38px;
  font-weight: 650;
}

.content-stream h3 {
  font-size: 26px;
  font-weight: 650;
}

.content-stream h4 {
  font-size: 20px;
  font-weight: 600;
}

.content-stream small,
.story-card__meta {
  font-size: 14px;
  font-weight: 500;
}

.content-stream p,
.content-stream li,
.content-stream td,
.content-stream th,
.content-stream blockquote {
  color: var(--envila-text);
  font-size: 1rem;
  line-height: 1.85;
}

.content-stream a {
  color: var(--envila-secondary);
}

.content-stream img {
  border-radius: 1rem;
  display: block;
  height: auto;
  max-width: 100%;
}

.content-stream figure {
  margin: 1.5rem 0;
}

.content-stream figcaption {
  color: var(--envila-muted);
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

.content-stream blockquote {
  border-left: 3px solid var(--envila-accent);
  font-style: italic;
  margin-left: 0;
  padding-left: 1rem;
}

.content-stream pre {
  background: rgba(23, 36, 51, 0.94);
  border-radius: 1rem;
  color: #fff;
  overflow-x: auto;
  padding: 1rem;
}

.content-stream table {
  background: #fff;
  border-collapse: collapse;
  width: 100%;
}

.content-stream th,
.content-stream td {
  border: 1px solid var(--envila-border);
  padding: 0.85rem 1rem;
}

.story-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.story-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(75, 100, 134, 0.16);
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 100%;
  padding: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover {
  box-shadow: 0 16px 36px rgba(23, 36, 51, 0.12);
  transform: translateY(-4px);
}

.story-card__title {
  color: var(--envila-primary);
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
}

.story-card__image {
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
}

.story-card__image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.story-card__meta {
  color: var(--envila-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-panel {
  background: rgba(23, 36, 51, 0.98);
  border-radius: 1.4rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  padding: 1.25rem;
}

.sidebar-portrait img {
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  object-fit: cover;
  width: 100%;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.9rem 0;
}

.sidebar-link:first-child {
  border-top: 0;
  padding-top: 0;
}

.asset-mosaic {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.column-stack > * + * {
  margin-top: 1rem;
}

.asset-mosaic figure {
  margin: 0;
}

.asset-mosaic img {
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  object-fit: cover;
  width: 100%;
}

.site-breadcrumbs {
  margin-bottom: 1.5rem;
}

.site-breadcrumbs a {
  color: var(--envila-secondary);
  font-weight: 600;
}

.site-footer {
  background: var(--envila-primary);
  border-top: 1px solid rgba(201, 164, 106, 0.3);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 4rem;
  padding: 2.5rem 0;
}

.site-footer .footer-wordmark {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.footer-description {
  line-height: 1.7;
  margin-top: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.86);
}

.compact-hero .hero-inner {
  padding-bottom: 2.5rem;
  padding-top: 4rem;
}

.minimal-panel {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--envila-border);
  border-radius: 1.1rem;
  padding: 1.25rem;
}

.separator {
  border: 0;
  border-top: 1px solid rgba(23, 36, 51, 0.12);
  margin: 1.5rem 0;
}

@media screen and (min-width: 1024px) {
  .editorial-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.8fr);
  }

  .editorial-grid--wide {
    grid-template-columns: minmax(0, 1.8fr) minmax(20rem, 0.7fr);
  }
}

@media screen and (max-width: 768px) {
  .site-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-inner {
    padding: 4rem 1rem 3rem;
  }

  .paper-panel,
  .paper-panel--raised {
    border-radius: 1.1rem;
    margin-top: -2rem;
    padding: 1.25rem;
  }

  .story-grid,
  .asset-mosaic {
    grid-template-columns: 1fr;
  }
}
