/* EGYPTISSIMO design tokens
   Palette: #D4AF37 gold, #121212 charcoal, #E8E0D5 sandstone, #B87333 copper
   Typography: Cinzel headings, Montserrat body
*/

:root {
  --eg-gold: #d4af37;
  --eg-gold-soft: #f0cf66;
  --eg-charcoal: #121212;
  --eg-charcoal-deep: #080607;
  --eg-sand: #e8e0d5;
  --eg-copper: #b87333;
  --eg-panel: #181516;
  --eg-panel-strong: #211d1e;
  --eg-border: rgba(212, 175, 55, 0.22);
  --eg-copy: rgba(232, 224, 213, 0.92);
  --eg-muted: rgba(232, 224, 213, 0.62);
  --eg-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  --eg-rail-width: 16rem;
  --eg-radius: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body.eg-site-body {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--eg-copy);
  background:
    radial-gradient(circle at top right, rgba(184, 115, 51, 0.15), transparent 26%),
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.14), transparent 24%),
    linear-gradient(180deg, #090708 0%, #121212 34%, #151112 100%);
}

body.eg-site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.25;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 1rem;
  font-family: "Cinzel", Georgia, serif;
  color: var(--eg-sand);
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

p,
li,
figcaption,
blockquote,
td,
th {
  font-size: 0.98rem;
  line-height: 1.85;
}

a {
  color: var(--eg-gold-soft);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: #fff2ba;
}

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

.eg-site-frame {
  display: flex;
  min-height: 100vh;
}

.eg-main-column {
  flex: 1;
  min-width: 0;
}

.eg-page-shell {
  padding: 1.5rem 1.25rem 2.5rem;
}

.eg-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem 1.25rem 0;
  backdrop-filter: blur(14px);
}

.eg-topbar,
.eg-primary-nav,
.eg-panel,
.eg-site-footer,
.eg-error-stage__card,
.eg-side-rail__inner {
  border: 1px solid var(--eg-border);
  background: linear-gradient(180deg, rgba(24, 21, 22, 0.96), rgba(16, 13, 14, 0.98));
  box-shadow: var(--eg-shadow);
}

.eg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-radius: var(--eg-radius) var(--eg-radius) 0 0;
}

.eg-brand-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
}

.eg-brand-sub,
.eg-panel-kicker,
.eg-footer-kicker {
  display: inline-block;
  color: var(--eg-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eg-brand-wordmark {
  color: var(--eg-gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  letter-spacing: 0.08em;
}

.eg-header-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.eg-header-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--eg-sand);
  background: rgba(212, 175, 55, 0.08);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.eg-header-chip--ghost {
  background: transparent;
  color: var(--eg-muted);
}

.eg-primary-nav {
  margin-top: 0.25rem;
  padding: 0.35rem 0.8rem;
  border-top: 0;
  border-radius: 0 0 var(--eg-radius) var(--eg-radius);
}

.eg-primary-nav__list {
  gap: 0.2rem;
}

.eg-primary-nav__item > a,
.eg-nav-details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
  color: var(--eg-gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
}

.eg-primary-nav__item > a:hover,
.eg-nav-details > summary:hover {
  background: rgba(212, 175, 55, 0.1);
}

.eg-nav-details {
  position: relative;
}

.eg-nav-details > summary {
  list-style: none;
  cursor: pointer;
}

.eg-nav-details > summary::-webkit-details-marker {
  display: none;
}

.eg-nav-details__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  display: grid;
  gap: 0.35rem;
  min-width: 14rem;
  padding: 0.8rem;
  border: 1px solid var(--eg-border);
  border-radius: 1rem;
  background: rgba(18, 18, 18, 0.98);
}

.eg-nav-details__panel a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 0.8rem;
}

.eg-side-rail {
  display: none;
  width: var(--eg-rail-width);
  padding: 1.25rem 0 1.25rem 1.25rem;
}

.eg-side-rail__inner {
  position: sticky;
  top: 1.25rem;
  border-radius: 1.4rem;
  padding: 1rem;
}

.eg-side-rail__brand {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.eg-side-rail__brand img {
  width: 100%;
  max-width: 7rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.18);
}

.eg-side-rail__brand span,
.eg-side-rail__label,
.eg-side-rail__index,
.eg-footer-note strong {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eg-gold);
}

.eg-side-rail__nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.eg-side-rail__nav a {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0.8rem;
  border-radius: 1rem;
  color: var(--eg-sand);
  background: rgba(255, 255, 255, 0.02);
}

.eg-side-rail__nav a:hover,
.eg-archive-card:hover,
.eg-listing-card:hover,
.eg-category-card:hover,
.eg-support-card:hover {
  transform: translateY(-2px);
}

.eg-side-rail__card,
.eg-support-card,
.eg-support-card--plain,
.eg-footer-note {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.eg-hero {
  position: relative;
  min-height: 34rem;
  border-radius: 1.7rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.eg-hero__image,
.eg-hero__overlay {
  position: absolute;
  inset: 0;
}

.eg-hero__image {
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.eg-hero__overlay {
  background:
    linear-gradient(180deg, rgba(8, 6, 7, 0.18), rgba(8, 6, 7, 0.92)),
    linear-gradient(90deg, rgba(8, 6, 7, 0.75), rgba(8, 6, 7, 0.1));
}

.eg-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 34rem;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1.4rem, 3vw, 4rem);
  max-width: 48rem;
}

.eg-hero__lead,
.eg-lead,
.eg-footer-copy {
  color: var(--eg-copy);
  font-size: 1.05rem;
  line-height: 1.8;
}

.eg-panel {
  margin-bottom: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 1.6rem;
}

.eg-panel--intro {
  overflow: hidden;
}

.eg-section-title,
.eg-panel-head {
  margin-bottom: 1.2rem;
}

.eg-editorial-figure,
.eg-inline-hero-image,
.eg-figure,
.eg-gallery-card,
.eg-main-image,
.eg-support-card img,
.eg-visual-rail img,
.eg-category-card__media img {
  overflow: hidden;
  border-radius: 1.15rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.eg-editorial-figure {
  max-width: 22rem;
  margin: 0 auto;
}

.eg-copy-stack .eg-block--paragraph p,
.eg-rich-copy p,
.eg-block--paragraph p,
.eg-mini-list li,
.eg-category-card p,
.eg-listing-card p {
  color: var(--eg-copy);
}

.eg-rich-copy {
  display: grid;
  gap: 0.95rem;
}

.eg-list,
.eg-list--ordered,
.eg-mini-list,
.eg-content-toc ul {
  margin: 0;
  padding-left: 1.2rem;
}

.eg-mini-list {
  padding-left: 1rem;
}

.eg-mini-list li + li,
.eg-content-toc li + li {
  margin-top: 0.45rem;
}

.eg-archive-card,
.eg-listing-card,
.eg-category-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.95rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.eg-archive-card img {
  border-radius: 0.95rem;
  margin-bottom: 0.85rem;
  min-height: 14rem;
  object-fit: cover;
}

.eg-archive-card__meta {
  color: var(--eg-gold);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eg-archive-card strong {
  margin-top: 0.35rem;
  color: var(--eg-sand);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.15rem;
}

.eg-quote-band {
  padding: 2.2rem 1rem 2.8rem;
  text-align: center;
}

.eg-quote-band__icon {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--eg-gold);
  font-size: 1.8rem;
}

.eg-quote-band blockquote {
  max-width: 42rem;
  margin: 0 auto;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  line-height: 1.35;
}

.eg-article-card,
.eg-content-article {
  padding: clamp(1.1rem, 3vw, 2rem);
  border-radius: 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.eg-article-shell--gallery .eg-article-card {
  background:
    linear-gradient(180deg, rgba(184, 115, 51, 0.08), rgba(255, 255, 255, 0.03));
}

.eg-visual-rail {
  display: grid;
  gap: 1rem;
}

.eg-breadcrumbs {
  margin-bottom: 1rem;
}

.eg-breadcrumbs .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  padding: 0;
  list-style: none;
}

.eg-breadcrumbs .breadcrumbs a,
.eg-breadcrumbs .breadcrumbs span {
  color: var(--eg-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eg-breadcrumbs .current span {
  color: var(--eg-gold);
}

.eg-button,
.button.eg-button,
.button.hollow.eg-button {
  border-radius: 999px;
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--eg-gold-soft);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button.eg-button:hover,
.button.hollow.eg-button:hover {
  background: rgba(212, 175, 55, 0.1);
}

.eg-media-tile {
  position: relative;
  min-height: 18rem;
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background-position: center;
  background-size: cover;
}

.eg-media-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 6, 7, 0.18), rgba(8, 6, 7, 0.9));
}

.eg-media-tile__content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

.eg-media-tile--1 { background-image: url("/assets/images/img_57f5abec096d.png"); }
.eg-media-tile--2 { background-image: url("/assets/images/img_60f865fa89c8.png"); }
.eg-media-tile--3 { background-image: url("/assets/images/img_a76449dfdd53.png"); }
.eg-media-tile--4 { background-image: url("/assets/images/img_1d1f6b21b7c0.png"); }
.eg-media-tile--5 { background-image: url("/assets/images/img_ac9f5f261e5a.png"); }
.eg-media-tile--6 { background-image: url("/assets/images/img_88d5fe18df4d.png"); }

.eg-content-toc,
.eg-table-shell,
.eg-code {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.eg-content-toc__level--3 { padding-left: 0.9rem; }
.eg-content-toc__level--4 { padding-left: 1.4rem; }

.eg-table-shell table {
  width: 100%;
  color: var(--eg-copy);
}

.eg-table-shell th {
  color: var(--eg-gold);
}

.eg-gallery-card img {
  width: 100%;
}

.eg-gallery-card figcaption,
.eg-figure figcaption {
  padding: 0.8rem 0.9rem 0;
  color: var(--eg-muted);
}

.eg-blockquote {
  margin: 1.2rem 0;
  padding: 1.1rem 1.2rem;
  border-left: 3px solid var(--eg-gold);
  background: rgba(212, 175, 55, 0.06);
}

.eg-separator {
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  margin: 1.5rem 0;
}

.eg-listing-card h3,
.eg-category-card h2 {
  margin-bottom: 0.6rem;
}

.eg-listing-card--compact span {
  color: var(--eg-gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.eg-category-card__media {
  margin-bottom: 0.95rem;
}

.eg-category-card--horizontal {
  padding: 1rem;
}

.eg-category-card--minimal {
  justify-content: center;
}

.eg-thin-panel {
  max-width: 52rem;
}

.eg-error-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.eg-error-stage__card {
  max-width: 40rem;
  padding: 2rem;
  border-radius: 1.6rem;
  text-align: center;
}

.eg-error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.4rem;
}

.eg-site-footer {
  margin: 0 1.25rem 1.25rem;
  padding: 1.45rem clamp(1.2rem, 3vw, 2rem);
  border-radius: 1.5rem;
}

.eg-footer-title {
  max-width: 18rem;
}

.eg-footer-links {
  display: grid;
  gap: 0.45rem;
}

.eg-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  color: var(--eg-muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

@media screen and (min-width: 64em) {
  .eg-side-rail {
    display: block;
  }

  .eg-page-shell {
    padding-left: 0.75rem;
  }
}

@media screen and (max-width: 63.9375em) {
  .eg-site-header {
    padding: 0.75rem 0.75rem 0;
  }

  .eg-page-shell,
  .eg-site-footer {
    margin-left: 0;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .eg-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .eg-header-tools {
    justify-content: flex-start;
  }

  .eg-hero__content {
    min-height: 26rem;
    padding-top: 4rem;
  }
}

@media print {
  body.eg-site-body {
    background: #fff;
    color: #000;
  }

  .eg-side-rail,
  .eg-site-header,
  .eg-site-footer {
    display: none !important;
  }

  .eg-panel,
  .eg-article-card,
  .eg-content-article {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
  }
}
