:root {
  /* =========================
     Color palette
     Core site colors and semantic tokens
     ========================= */

  /* Brand / primary */
  --color-primary: #52131c;
  --color-primary-hover: #6a1a26;
  --color-primary-soft: #f3e3e7;

  /* Backgrounds and surfaces */
  --color-bg: #dbcfbf;
  --color-surface: rgba(255, 252, 246, 0.82);
  --color-surface-strong: rgba(255, 249, 240, 0.96);
  --color-surface-alt: #f6eee8;

  /* Text */
  --color-text: #3d3125;
  --color-text-soft: #6a5948;

  /* Secondary accent */
  --color-accent: #6e8b6b;
  --color-accent-dark: #4f674d;
  --color-accent-soft: #dfe8dd;

  /* Borders and effects */
  --color-border: #b79055;
  --color-border-soft: rgba(183, 144, 85, 0.45);
  --color-shadow: rgba(61, 49, 37, 0.08);
  --frame-line-color: var(--color-border);

  /* Utility */
  --color-white: #ffffff;
  --color-black: #000000;

  /* =========================
     Typography
     Shared font stacks
     ========================= */

  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Helvetica Neue", Arial, sans-serif;

  /* =========================
     Layout
     Shared sizing constraints
     ========================= */

  --site-max-width: 1120px;
  --content-max-width: 760px;
  --header-height: 88px;

  /* =========================
     Spacing scale
     Consistent spacing rhythm
     ========================= */

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;

  /* =========================
     Radius and motion
     Corners and transitions
     ========================= */

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --transition: 180ms ease;

  /* =========================
     Frame
     ========================= */

  --frame-outer-line-width: 3px;
  --frame-inner-line-width: 1px;
  --frame-line-gap: 10px;
  --frame-side-offset: clamp(1rem, 2.2vw, 1.5rem);
  --frame-top-height: 34px;
  --frame-bottom-height: 34px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.65;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition:
    color var(--transition),
    opacity var(--transition),
    border-color var(--transition),
    background-color var(--transition);
}

a:hover,
a:focus {
  color: var(--color-primary-hover);
}

button,
.button {
  background: var(--color-primary);
  color: var(--color-white);
  border: 1px solid var(--color-primary);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

button:hover,
.button:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* Base layout */

.site-shell {
  position: relative;
  width: min(calc(100% - 2rem), var(--site-max-width));
  margin: 0 auto;
  padding: 0 0 var(--space-6);
}

.site-main {
  display: block;
  min-height: 50vh;
}

.page-section {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px var(--color-shadow);
  backdrop-filter: blur(3px);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--space-3) 0;
  background: var(--color-primary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(183, 144, 85, 0.18);
}

.site-header::after {
  content: "";
  display: block;
  width: min(100%, 820px);
  height: 1px;
  margin: var(--space-3) auto 0;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border),
    transparent
  );
  opacity: 0.75;
}

.header-inner {
  width: min(calc(100% - 2rem), var(--site-max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: calc(var(--header-height) - 24px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  color: var(--color-text);
}

.site-brand:hover,
.site-brand:focus-visible {
  color: var(--color-accent-dark);
}

.site-brand-mark {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--color-border);
}

.site-brand-text {
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-serif);
}

/* Nav */

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: var(--color-text-soft);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0.35rem;
  height: 1px;
  background: var(--color-border);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.32);
}

.nav-link.is-active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.42);
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.85);
  color: var(--color-text);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--color-surface-strong);
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

.nav-toggle.is-active .nav-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Footer */

.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-6) 0 var(--space-5);
}

.footer-inner {
  width: min(calc(100% - 2rem), 760px);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px var(--color-shadow);
}

.footer-ornament {
  margin-bottom: var(--space-3);
  font-size: 1.5rem;
  color: var(--color-border);
}

.footer-title {
  margin: 0 0 var(--space-2);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-text {
  margin: 0 0 var(--space-4);
  color: var(--color-text-soft);
}

.footer-nav {
  margin-bottom: var(--space-4);
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
}

.footer-nav-list a {
  position: relative;
  padding-bottom: 0.2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.footer-nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--color-border);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.footer-nav-list a:hover::after,
.footer-nav-list a:focus-visible::after {
  transform: scaleX(1);
}

.footer-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

/* Generic content helpers for the homepage */

.hero {
  padding: var(--space-7) var(--space-4) var(--space-6);
  text-align: center;
}

.hero-kicker {
  margin: 0 0 var(--space-2);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.hero-title {
  margin: 0 0 var(--space-3);
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 1.05;
  font-weight: normal;
}

.hero-text {
  width: min(100%, 42rem);
  margin: 0 auto;
  color: var(--color-text-soft);
  font-size: 1.05rem;
}

/* Responsive */

@media (max-width: 980px) {
  .site-brand-text {
    font-size: 1.05rem;
  }

  .nav-link {
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 800px) {
  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding-top: var(--space-2);
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: var(--space-2);
    background: rgba(255, 252, 246, 0.92);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 24px var(--color-shadow);
  }

  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.9rem 1rem;
  }

  .nav-link::after {
    left: 28%;
    right: 28%;
    bottom: 0.5rem;
  }

  .footer-inner {
    padding: var(--space-4);
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: var(--space-2) 0;
  }

  .site-brand {
    max-width: calc(100% - 64px);
  }

  .site-brand-text {
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .hero {
    padding-top: var(--space-6);
  }

  .page-section {
    padding: var(--space-5) var(--space-3);
  }
}

/* =========================
   Frame modules
   Simplified double-line frame
   ========================= */

.frame-top,
.frame-bottom {
  position: relative;
  width: 100%;
  pointer-events: none;
  user-select: none;
}

.frame-top {
  height: var(--frame-top-height);
  margin: 0 auto var(--space-4);
}

.frame-bottom {
  height: var(--frame-bottom-height);
  margin: var(--space-5) auto 0;
}

.frame-top-svg,
.frame-bottom-svg {
  display: none;
}

/* Framed page shell */

.site-shell--framed {
  position: relative;
  width: min(calc(100% - 2rem), var(--site-max-width));
  margin: 0 auto;
  padding-left: clamp(1rem, 2vw, 1.5rem);
  padding-right: clamp(1rem, 2vw, 1.5rem);
}

/* Main body of the frame */

.frame-body {
  position: relative;
  width: 100%;
  padding: 0 clamp(1.4rem, 3.2vw, 2.75rem);
}

/* Outer side lines */

.frame-body::before,
.frame-body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--frame-outer-line-width);
  background: var(--frame-line-color);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.frame-body::before {
  left: var(--frame-side-offset);
}

.frame-body::after {
  right: var(--frame-side-offset);
}

/* Inner side lines */

.site-main {
  position: relative;
  padding-left: clamp(0.75rem, 1.5vw, 1.25rem);
  padding-right: clamp(0.75rem, 1.5vw, 1.25rem);
}

.site-main::before,
.site-main::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--frame-inner-line-width);
  background: var(--frame-line-color);
  pointer-events: none;
  z-index: 0;
}

.site-main::before {
  left: calc(var(--frame-side-offset) + var(--frame-outer-line-width) + var(--frame-line-gap));
}

.site-main::after {
  right: calc(var(--frame-side-offset) + var(--frame-outer-line-width) + var(--frame-line-gap));
}

/* Top horizontal lines */

.frame-top::before,
.frame-top::after {
  content: "";
  position: absolute;
  left: var(--frame-side-offset);
  right: var(--frame-side-offset);
  background: var(--frame-line-color);
  pointer-events: none;
}

.frame-top::before {
  top: 0;
  height: var(--frame-outer-line-width);
}

.frame-top::after {
  top: calc(var(--frame-outer-line-width) + var(--frame-line-gap));
  height: var(--frame-inner-line-width);
  left: calc(var(--frame-side-offset) + var(--frame-outer-line-width) + var(--frame-line-gap));
  right: calc(var(--frame-side-offset) + var(--frame-outer-line-width) + var(--frame-line-gap));
}

/* Bottom horizontal lines */

.frame-bottom::before,
.frame-bottom::after {
  content: "";
  position: absolute;
  left: var(--frame-side-offset);
  right: var(--frame-side-offset);
  background: var(--frame-line-color);
  pointer-events: none;
}

.frame-bottom::before {
  bottom: 0;
  height: var(--frame-outer-line-width);
}

.frame-bottom::after {
  bottom: calc(var(--frame-outer-line-width) + var(--frame-line-gap));
  height: var(--frame-inner-line-width);
  left: calc(var(--frame-side-offset) + var(--frame-outer-line-width) + var(--frame-line-gap));
  right: calc(var(--frame-side-offset) + var(--frame-outer-line-width) + var(--frame-line-gap));
}

/* Keep content above frame lines */

.frame-body > *,
.site-main > * {
  position: relative;
  z-index: 1;
}

.site-main > .page-section,
.site-main .page-section + .page-section {
  margin-top: var(--space-5);
}

.site-main::before,
.site-main::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(183, 144, 85, 0),
    rgba(183, 144, 85, 0.55) 12%,
    rgba(183, 144, 85, 0.55) 88%,
    rgba(183, 144, 85, 0)
  );
}

.site-main::before {
  left: 0;
}

.site-main::after {
  right: 0;
}

.site-main > .page-section,
.site-main .page-section + .page-section {
  margin-top: var(--space-5);
}
