/* Egon Clausen — light flex layout, site palette */
:root {
  --gold: #cd9b54;
  --gold-dark: #a87a38;
  --cream: #fbfaff;
  --ink: #2a2a2a;
  --muted: #4d4d4d;
  --line: #e4d5bc;
  --bg: #f3efe6;
  --white: #ffffff;
  --font-serif: "Libre Baskerville", "Times New Roman", Times, serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 720px;
  --wide: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(205, 155, 84, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(205, 155, 84, 0.12), transparent 50%),
    linear-gradient(180deg, #efe8da 0%, var(--bg) 40%, #ebe4d6 100%);
}

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

a {
  color: var(--gold-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

.site-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 250, 255, 0.88));
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.site-header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 44px;
  height: 29px;
  object-fit: cover;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-tag {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.site-nav {
  background: var(--gold);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
}

.site-nav-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin-block: 0;
}

.site-nav a {
  display: block;
  padding: 0.85rem 1rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(0, 0, 0, 0.12);
  color: #fff;
}

.nav-item {
  position: relative;
}

.nav-item.has-sub:hover .submenu,
.nav-item.has-sub:focus-within .submenu {
  display: flex;
}

.submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 12rem;
  flex-direction: column;
  background: var(--gold-dark);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 50;
}

.submenu a {
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  font-family: var(--font-sans);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 0.45rem 0.75rem;
  margin: 0.5rem;
  cursor: pointer;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.page-content {
  background: var(--cream);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(80, 55, 20, 0.06);
}

.page-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.3;
  font-weight: 700;
}

.hero {
  margin: -0.25rem 0 1.5rem;
  overflow: hidden;
}

.hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center top;
}

.hero-caption {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.content-body p {
  margin: 0 0 1rem;
}

.content-body h2,
.content-body h3 {
  margin: 1.5rem 0 0.65rem;
  line-height: 1.35;
}

.content-body ul,
.content-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.content-body li {
  margin-bottom: 0.35rem;
}

.content-body .page-figure {
  margin: 1.25rem 0;
}

.content-body .page-figure img {
  margin: 0 auto;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.link-list a {
  font-family: var(--font-sans);
  font-size: 0.98rem;
}

.romlidata {
  margin-top: 2rem;
}

.site-footer {
  background: #3a3228;
  color: #e8e0d4;
  padding: 2rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

.site-footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer a {
  color: #f0d9a8;
}

.site-footer h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: #fff;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.site-footer .copy {
  opacity: 0.75;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* Blog list (r-template_blog) */
.blog-container {
  margin-top: 0.5rem;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.blog-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.blog-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Article shell */
.romlicontainer {
  max-width: 100%;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav-inner {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 0.5rem;
  }

  .site-nav.is-open .site-nav-inner {
    display: flex;
  }

  .submenu {
    position: static;
    display: flex;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.15);
  }

  .nav-item.has-sub .submenu {
    display: flex;
  }
}

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

  .site-nav a {
    transition: none;
  }
}
