:root {
  /* Palette: Royal Blue & Silver on Dark */
  --c-bg: #0f172a;
  --c-surface: #1e293b;
  --c-text-main: #e2e8f0;
  --c-text-muted: #94a3b8;
  --c-primary: #2563eb; /* Royal Blue */
  --c-primary-hover: #1d4ed8;
  --c-accent: #34d399; /* Neon Mint */
  --c-white: #ffffff;
  
  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif-accent: 'Georgia', 'Times New Roman', serif;
  
  /* Spacing & Radius */
  --radius-pill: 9999px;
  --spacing-container: 1200px;
  --header-height: 80px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  /* Noise + Grid Background */
  background-image: 
    linear-gradient(rgba(52, 211, 153, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.05) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 40px 40px, 40px 40px, 200px 200px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul { list-style: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--c-primary);
  color: var(--c-white);
}

.btn-primary:hover {
  background-color: var(--c-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background-color: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-container {
  max-width: var(--spacing-container);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--c-white);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-logo svg {
  height: 32px;
  width: auto;
  color: var(--c-accent);
}

.desktop-nav {
  display: none;
}

.nav-list {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  color: var(--c-text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--c-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--c-white);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Mobile Toggle */
.mobile-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--c-white);
  z-index: 1001;
}

.hamburger-box {
  width: 24px;
  height: 24px;
  position: relative;
}

.hamburger-inner {
  width: 24px;
  height: 2px;
  background-color: currentColor;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  width: 24px;
  height: 2px;
  background-color: currentColor;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-inner::before { top: -8px; }
.hamburger-inner::after { top: 8px; }

body.menu-open .hamburger-inner { background-color: transparent; }
body.menu-open .hamburger-inner::before { top: 0; transform: rotate(45deg); }
body.menu-open .hamburger-inner::after { top: 0; transform: rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--c-bg);
  padding-top: var(--header-height);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.menu-open .mobile-menu {
  transform: translateX(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-link {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-white);
}

.mobile-link:hover {
  color: var(--c-accent);
}

/* Footer */
.site-footer {
  background-color: #0b1120;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 5rem 0 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--spacing-container);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-heading {
  color: var(--c-white);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-white);
  margin-bottom: 1rem;
}

.footer-brand svg {
  height: 28px;
  width: auto;
  color: var(--c-accent);
}

.footer-tagline {
  color: var(--c-text-muted);
  font-family: var(--font-serif-accent);
  font-size: 1.1rem;
  font-style: italic;
  max-width: 300px;
  line-height: 1.6;
}

.footer-nav li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: var(--c-text-muted);
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-style: normal;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--c-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-item .icon {
  width: 20px;
  height: 20px;
  color: var(--c-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item a:hover {
  color: var(--c-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .desktop-nav { display: block; }
  .mobile-toggle, .mobile-menu { display: none; }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.5fr;
  }
  
  .footer-bottom {
    text-align: left;
  }
}
/* footer extras */
.footer__extras{margin-top:16px;}
.footer__extrasInner{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;justify-content:space-between;}
.footer__social{display:flex;gap:10px;align-items:center;}
.footer-social{display:inline-flex;gap:8px;align-items:center;text-decoration:none;}
.footer-social__icon{display:block;}
.footer__poemWrap{max-width:520px;}
.footer-poem{opacity:0.9;font-size:0.95em;line-height:1.35;}

/* =========================================================
   LatticeKit utility shims
   (keeps the site readable even when Tailwind build is minimal)
   ========================================================= */

/* Brand accent */
.bg-neon-mint { background-color: var(--c-accent) !important; }
.text-neon-mint { color: var(--c-accent) !important; }
.border-neon-mint { border-color: var(--c-accent) !important; }

/* Tailwind-like variant helpers (escaped selectors) */
.hover\:border-neon-mint:hover { border-color: var(--c-accent) !important; }
.hover\:border-neon-mint\/50:hover { border-color: rgba(52, 211, 153, 0.5) !important; }
.hover\:shadow-neon:hover { box-shadow: 0 0 30px rgba(52, 211, 153, 0.28) !important; }

/* Shadows used in markup */
.shadow-neon { box-shadow: 0 0 22px rgba(52, 211, 153, 0.22) !important; }
.shadow-neon-hover:hover { box-shadow: 0 0 34px rgba(52, 211, 153, 0.38) !important; }

/* Template page accent aliases */
.bg-accent { background-color: var(--c-accent) !important; }
.text-accent { color: var(--c-accent) !important; }

/* Typography helper */
.font-serif-accent { font-family: var(--font-serif-accent) !important; }

/* Background helpers referenced by HTML */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(52, 211, 153, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.bg-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* =========================================================
   Readability + controls (templates + contact)
   ========================================================= */

.lk-hero-readable {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.lk-hero-panel {
  padding: 28px 22px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .lk-hero-panel { padding: 34px 30px; border-radius: 32px; }
}

.lk-btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 800;
  background: var(--c-accent);
  color: #0f172a;
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.lk-btn-accent:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 0 34px rgba(52, 211, 153, 0.34);
}

.lk-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 800;
  background: rgba(30, 41, 59, 0.72);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.lk-btn-outline:hover {
  transform: translateY(-2px);
  background: rgba(51, 65, 85, 0.78);
  border-color: rgba(52, 211, 153, 0.45);
}

.lk-filter-btn {
  padding: 0.55rem 1.4rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.875rem;
  background: rgba(15, 23, 42, 0.35);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.20);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.lk-filter-btn:hover {
  background: rgba(30, 41, 59, 0.70);
  border-color: rgba(52, 211, 153, 0.55);
  color: #ffffff;
}

.lk-filter-btn.is-active {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(52, 211, 153, 0.72);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.10), 0 10px 28px rgba(0, 0, 0, 0.30);
}

.lk-surface-card {
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  padding: 26px 22px;
  backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .lk-surface-card { padding: 30px 26px; }
}

.lk-input {
  width: 100%;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.45);
  color: #e2e8f0;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.lk-input::placeholder { color: rgba(148, 163, 184, 0.70); }

.lk-input:focus {
  border-color: rgba(52, 211, 153, 0.60);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
  background: rgba(2, 6, 23, 0.62);
}

.lk-bullet {
  position: relative;
  padding-left: 22px;
}

.lk-bullet::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.22);
}

.lk-quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.lk-quick-link:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(2, 6, 23, 0.52);
}

/* Make template card actions usable on touch (no hover) and keyboard. */
@media (hover: none) {
  .lk-card-overlay {
    opacity: 1 !important;
    align-items: flex-end !important;
    padding: 12px !important;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18)) !important;
  }
}

[data-template-card]:focus-within .lk-card-overlay {
  opacity: 1 !important;
}
