@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;900&family=PT+Sans:wght@400;700&display=swap');

:root {
  --primary: #a01f24;
  --accent: #9c7a2e;
  --bg: #f7f4ee;
  --bg-panel: #ffffff;
  --text: #2b2620;
  --text-dim: #6b625a;
  --glass: #ffffff;
  --border: rgba(43,38,32,0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'PT Sans', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, .brand-text span {
  font-family: 'Playfair Display', serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Header */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-panel);
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.header-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { height: 64px; width: 64px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text span { font-size: 22px; font-weight: 700; color: var(--primary); }
.brand-text small { font-family: 'Playfair Display', serif; color: var(--text-dim); font-size: 13px; letter-spacing: 1px; font-variant: small-caps; }

nav { display: flex; gap: 24px; flex-wrap: wrap; }
nav a {
  font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim);
  font-weight: 700; position: relative; padding: 6px 0; transition: color .2s;
}
nav a:hover, nav a.active { color: var(--primary); }
nav a.active::after, nav a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: var(--primary);
}
.nav-toggle { display: none; }

/* Hero */
.hero {
  position: relative; min-height: 46vh; display: flex; align-items: flex-end;
  background-color: #1c1a17; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-color: #1c1a17;
  animation: heroZoom 22s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,16,12,0.45) 0%, rgba(20,16,12,0.8) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 50px 24px; width: 100%; }
.eyebrow {
  display: inline-block; color: #fff; background: var(--primary); font-family: 'PT Sans', sans-serif; font-weight: 700;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px;
  border-radius: 999px; padding: 6px 16px;
}
.hero h1 { font-size: clamp(30px, 5vw, 50px); margin: 0 0 12px; font-weight: 700; color: #fff; }
.hero p { max-width: 640px; color: #e8e2d8; font-size: 19px; margin: 0; }

/* Entrance animation */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.eyebrow, .hero h1, .hero p, .cta-row { animation: fadeInUp .7s ease both; }
.hero h1 { animation-delay: .08s; }
.hero p { animation-delay: .16s; }
.cta-row { animation-delay: .24s; }

/* Scroll-triggered reveal (see assets/js/site.js) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.grid-3 .feature-card:nth-child(1) { transition-delay: 0s; }
.grid-3 .feature-card:nth-child(2) { transition-delay: .08s; }
.grid-3 .feature-card:nth-child(3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .hero h1, .hero p, .cta-row, .reveal, .hero-bg {
    animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important;
  }
}

/* Buttons */
.cta-row { display: flex; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.btn-glow, .btn-outline {
  display: inline-block; padding: 13px 26px; font-size: 14px; letter-spacing: .5px;
  border-radius: 4px; font-weight: 700; cursor: pointer; border: 2px solid transparent;
}
.btn-glow { background: var(--primary); color: #fff; transition: background .15s; }
.btn-glow:hover { background: #7f181c; }
.btn-outline { border-color: #fff; color: #fff; background: transparent; transition: background .15s, color .15s; }
.btn-outline:hover { background: #fff; color: var(--primary); }

/* Content */
main { max-width: 1000px; margin: 0 auto; padding: 50px 24px; position: relative; z-index: 1; }
.content-card { background: var(--glass); border: 1px solid var(--border); border-radius: 6px; padding: 36px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.content-card p { color: var(--text); }
.content-card h2 { color: var(--primary); margin-top: 0; }
.content-card h3 { color: var(--primary); margin: 28px 0 10px; font-size: 19px; }
.content-card ul { padding-left: 22px; color: var(--text); }
.content-card li { margin: 6px 0; }
.content-card a { color: var(--primary); text-decoration: underline; }
.content-card table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.content-card th, .content-card td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.content-card th { color: var(--primary); font-family: 'PT Sans', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

/* Feature grid on home */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
@media (max-width: 800px) { .grid-3 { grid-template-columns: 1fr; } }
.feature-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; padding: 26px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); transition: transform .2s; }
.feature-card:hover { transform: translateY(-4px); }
.feature-card .icon { font-size: 30px; margin-bottom: 12px; }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--primary); }
.feature-card p { color: var(--text-dim); font-size: 15px; margin: 0; }

/* Footer */
footer.site-footer { border-top: 3px solid var(--primary); background: var(--bg-panel); padding: 40px 24px; margin-top: 60px; position: relative; z-index: 1; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-inner p { color: var(--text-dim); font-size: 14px; margin: 4px 0; }
.footer-inner a { color: var(--primary); }

.loading-state { text-align: center; padding: 100px 20px; color: var(--text-dim); letter-spacing: 1px; }

@media (max-width: 780px) {
  nav { position: fixed; top: 84px; left: 0; right: 0; background: var(--bg-panel); flex-direction: column; padding: 20px 24px; border-bottom: 1px solid var(--border); display: none; gap: 18px; }
  nav.open { display: flex; }
  .nav-toggle { display: block; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 8px 12px; font-size: 20px; }
}

/* ===================================================================
   "Emblem 3D" UI style — a decorative layer applied on top of the same
   markup and theme variables when the active theme's preset carries
   style: '3d'. Nothing structural changes, so every page, form, table,
   and script behaves identically to the flat themes.
   =================================================================== */
body.ui-3d header.site-header {
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 60%), var(--bg-panel);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
body.ui-3d .brand img { filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }

body.ui-3d nav a {
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 55%), var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 2px 0 rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.7);
}
body.ui-3d nav a.active::after, body.ui-3d nav a:hover::after { display: none; }
body.ui-3d nav a:hover, body.ui-3d nav a.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 55%), var(--primary);
  box-shadow: 0 2px 0 rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.35);
}

body.ui-3d .eyebrow {
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%), var(--primary);
  box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 2px rgba(255,255,255,.25);
}

body.ui-3d .hero { border-bottom: 4px solid var(--primary); box-shadow: inset 0 -14px 26px -14px rgba(0,0,0,.65); }

body.ui-3d .btn-glow {
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 45%), var(--primary);
  box-shadow: 0 3px 0 rgba(0,0,0,.3), 0 6px 10px rgba(0,0,0,.2);
  border-radius: 6px; transition: transform .15s, box-shadow .15s, background .15s;
}
body.ui-3d .btn-glow:hover { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(0,0,0,.3), 0 10px 16px rgba(0,0,0,.25); }
body.ui-3d .btn-glow:active { transform: translateY(1px); box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
body.ui-3d .btn-outline { box-shadow: 0 2px 0 rgba(0,0,0,.2); border-radius: 6px; }

body.ui-3d .content-card, body.ui-3d .feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 35%), var(--glass);
  border: 1px solid var(--border);
  border-top-color: rgba(255,255,255,.8);
  box-shadow: 0 12px 26px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.1);
  border-radius: 10px;
}
body.ui-3d .feature-card { transition: transform .25s ease, box-shadow .25s ease; }
body.ui-3d .feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 34px rgba(0,0,0,.22), 0 6px 10px rgba(0,0,0,.14);
}
body.ui-3d .content-card h2, body.ui-3d .content-card h3 { text-shadow: 0 1px 0 rgba(255,255,255,.6); }

body.ui-3d footer.site-footer {
  border-top: none;
  box-shadow: 0 -3px 0 var(--primary), 0 -6px 12px -4px rgba(0,0,0,.2);
}

@media (max-width: 780px) {
  body.ui-3d nav a { border-radius: 8px; }
}

/* ===================================================================
   "Frosted Glass" UI style — translucent, blurred panels over a fixed
   full-page photo (the page's own hero image, or the site-wide
   fallback background), so the image stays visible everywhere instead
   of just in the hero band. A dark scrim + text-shadow keep every
   text element readable regardless of what the photo looks like.
   Same markup as every other theme — nothing structural changes.
   =================================================================== */
body.ui-glass::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background: var(--page-bg-image, none) center/cover no-repeat fixed, var(--bg);
}
body.ui-glass::after {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.6));
}

body.ui-glass header.site-header {
  background: var(--bg-panel);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
body.ui-glass .brand-text span { color: #fff; }
body.ui-glass .brand-text small { color: var(--text-dim); }
body.ui-glass nav a { color: rgba(255,255,255,.82); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
body.ui-glass nav a:hover, body.ui-glass nav a.active { color: #fff; }
body.ui-glass nav a.active::after, body.ui-glass nav a:hover::after { background: var(--accent); box-shadow: 0 0 8px rgba(0,0,0,.4); }
body.ui-glass .nav-toggle { color: #fff; border-color: var(--border); }

body.ui-glass .hero-bg { display: none; }
body.ui-glass .hero { background-color: transparent; border-bottom: none; min-height: 40vh; }
body.ui-glass .hero::before { background: none; }
body.ui-glass .eyebrow {
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); color: #fff;
}

body.ui-glass .content-card, body.ui-glass .feature-card {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
body.ui-glass .content-card p,
body.ui-glass .content-card li { color: var(--text); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
body.ui-glass .content-card h2,
body.ui-glass .content-card h3 { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
body.ui-glass .content-card a { color: var(--accent); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
body.ui-glass .content-card th { color: var(--accent); }
body.ui-glass .content-card th, body.ui-glass .content-card td { border-bottom-color: var(--border); }
body.ui-glass .feature-card h3 { color: #fff; }
body.ui-glass .feature-card p { color: var(--text-dim); }

body.ui-glass footer.site-footer {
  background: var(--bg-panel);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--border);
}
body.ui-glass .footer-inner p,
body.ui-glass .footer-inner a { color: var(--text-dim); text-shadow: 0 1px 2px rgba(0,0,0,.4); }

@media (max-width: 780px) {
  body.ui-glass nav { background: rgba(10,10,10,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
}
