/* Char House — shared structure only. Page soul lives in each template. */
:root {
  --paper: #f6f0e8;
  --paper-deep: #ebe2d4;
  --ink: #1c1714;
  --ink-soft: #4a3f38;
  --muted: #7a6b60;
  --line: rgba(28, 23, 20, 0.12);
  --wine: #9c3d55;
  --wine-deep: #6f2a3c;
  --wine-soft: #c46b7e;
  --cream: #fffaf4;
  --nav-h: 72px;
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", sans-serif;
  --shadow: 0 18px 40px rgba(28, 23, 20, 0.08);
  --radius: 14px;
  --page-pad: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  /* sticky chrome — no fixed padding math */
  padding-top: 0;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

.demo-banner {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem var(--page-pad);
  background: #2a171d;
  color: #f7efe7;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.3;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem var(--page-pad);
  background: rgba(246, 240, 232, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(28, 23, 20, 0.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wine);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.4rem 0.15rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  border-bottom-color: var(--wine);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--wine);
  color: #fff !important;
  border-bottom-color: transparent !important;
  padding: 0.55rem 0.9rem !important;
  border-radius: 999px;
  font-weight: 700 !important;
  box-shadow: 0 8px 18px rgba(156, 61, 85, 0.22);
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--wine-deep);
}

.site-footer {
  background: #171311;
  color: #f3ebe3;
  padding: 3rem var(--page-pad) 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.footer-brand {
  font-family: var(--display);
  font-size: 1.8rem;
  margin: 0 0 0.4rem;
}

.footer-copy {
  color: rgba(243, 235, 227, 0.72);
  max-width: 34ch;
  margin: 0;
}

.footer-social {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.footer-social a {
  color: #f0c4cf;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-social a:hover {
  color: #fff;
}

.footer-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wine-soft);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-links a {
  text-decoration: none;
  color: rgba(243, 235, 227, 0.88);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(243, 235, 227, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: rgba(243, 235, 227, 0.55);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: rgba(243, 235, 227, 0.75);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--wine);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* Shared mobile utilities used by page styles */
.u-page {
  width: min(1100px, calc(100% - (var(--page-pad) * 2)));
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  :root {
    --page-pad: 1rem;
    --nav-h: 64px;
  }

  body {
    font-size: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: rgba(246, 240, 232, 0.98);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: calc(var(--nav-h) + 0.75rem) var(--page-pad) 1.5rem;
    gap: 0.1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  body.has-demo-banner .nav-links {
    padding-top: calc(var(--nav-h) + 2.75rem);
  }

  .nav-links.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }

  .nav-cta {
    margin-top: 0.75rem;
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem !important;
    text-align: center;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-mark {
    font-size: 1.15rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .site-footer {
    padding: 2.25rem var(--page-pad) 1.5rem;
    margin-top: 3rem;
  }

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

@media (max-width: 480px) {
  :root {
    --page-pad: 0.85rem;
  }

  .demo-banner {
    font-size: 0.74rem;
    padding: 0.4rem 0.7rem;
  }

  .brand-sub {
    letter-spacing: 0.08em;
    font-size: 0.64rem;
  }

  .nav-toggle {
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
  }
}

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

  .nav-links {
    transition: none;
  }
}
