@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,300;1,400;1,500&family=Source+Serif+4:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:wght@400;500&family=DM+Mono:wght@400;500&display=swap');

:root {
  --ink:          #1c1814;
  --ink-soft:     #2c2620;
  --body:         #3a342c;
  --text-lede:    #2c2620;
  --secondary:    #5a5248;
  --tertiary:     #7a7068;
  --gold:         #d4a84a;
  --amber:        #b8862e;
  --cream:        #f7f2e8;
  --dark-card:    #292b2d;
  --border-light: rgba(180,175,165,0.28);
  --font-display: 'Cormorant Garamond', serif;
  --font-reading: 'Source Serif 4', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --max-width:    1060px;
  --nav-height:   86px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #a8a398 0px, #8c8780 175px, #f7f2e8 775px, #f7f2e8 100%);
  background-attachment: fixed;
  color: var(--body);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix type='matrix' values='0 0 0 0 0.55  0 0 0 0 0.36  0 0 0 0 0.18  0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.nav-logo-bar {
  height: 52px;
  background: linear-gradient(135deg, #f7f2e8 0%, #1c1814 65%, #1c1814 100%);
  border-bottom: 1px solid rgba(184,115,42,0.22);
  display: flex;
  align-items: center;
}

.nav-logo-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo-inner img {
  height: 32px;
  width: auto;
  mix-blend-mode: normal;
}

.nav-sub-bar {
  height: 34px;
  background: linear-gradient(to bottom, #eceae4 0%, #d8d4cc 48%, #eceae4 100%);
  position: relative;
  display: flex;
  align-items: center;
}

.nav-sub-bar::before,
.nav-sub-bar::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.96), transparent);
}
.nav-sub-bar::before { top: 0; }
.nav-sub-bar::after  { bottom: 0; }

.nav-sub-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
  z-index: 1;
}

.nav-sub-inner a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #3a342c;
  text-decoration: none;
  padding: 0 13px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border-light);
  transition: background 0.15s, color 0.15s;
}
.nav-sub-inner a:first-child { padding-left: 0; }
.nav-sub-inner a:last-child  { border-right: none; }
.nav-sub-inner a:hover {
  background: rgba(255,255,255,0.35);
  color: var(--ink);
}

/* ── LAYOUT ── */
.site-main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 48px) 32px 64px;
}

/* ── POST FEED ── */
.post-feed {
  display: grid;
  gap: 32px;
}

.post-card {
  background: rgba(247,242,232,0.82);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 28px 32px;
  box-shadow: 0 2px 12px rgba(28,24,20,0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 4px;
  background: linear-gradient(to bottom,
    #8c5a18 0%, #b8862e 20%, #ecb438 38%,
    #fef0a0 50%, #ecb438 62%, #b8862e 78%, #7a5010 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover {
  background: rgba(232,226,212,0.95);
  box-shadow: inset 0 2px 8px rgba(28,24,20,0.15), inset 0 1px 3px rgba(28,24,20,0.08);
  transform: scale(0.99);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 10px;
}
.post-card-title a {
  color: inherit;
  text-decoration: none;
}
.post-card-title a:hover { color: var(--amber); }

.post-card-excerpt {
  font-family: var(--font-reading);
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.post-card-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--tertiary);
}

/* ── POST ARTICLE ── */
.post-article {
  max-width: 720px;
  margin: 0 auto;
}

.post-header { margin-bottom: 40px; }

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.post-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 16px;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--secondary);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.post-content {
  font-family: var(--font-reading);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--body);
}
.post-content p  { margin-bottom: 1.4em; }
.post-content h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; color: var(--ink); margin: 2em 0 0.6em; }
.post-content h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; color: var(--ink); margin: 1.6em 0 0.5em; }
.post-content a  { color: var(--amber); text-decoration-thickness: 1px; }

/* ── KOENIG CARD WIDTHS (required) ── */
.kg-width-wide { width: 85vw; margin-left: calc(50% - 42.5vw); }
.kg-width-full { width: 100vw; margin-left: calc(50% - 50vw); }
/* ── NAVIGATION HELPER OVERRIDES ── */
.nav-sub-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-sub-inner ul li {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-sub-inner ul li a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #3a342c;
  text-decoration: none;
  padding: 0 13px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border-light);
  transition: background 0.15s, color 0.15s;
}

.nav-sub-inner ul li:first-child a { padding-left: 0; }
.nav-sub-inner ul li:last-child a { border-right: none; }
.nav-sub-inner ul li a:hover {
  background: rgba(255,255,255,0.35);
  color: var(--ink);
}

/* ── NAV MEMBER AREA ── */
.nav-member-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-signin-link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(247,242,232,0.7);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-signin-link:hover { color: var(--gold); }

.nav-join-link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(135deg, #ecb438 0%, #b8862e 100%);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: 2px;
  transition: opacity 0.15s;
}
.nav-join-link:hover { opacity: 0.88; }

.nav-member-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: rgba(247,242,232,0.82);
  font-family: var(--font-body);
  font-size: 0.8rem;
  transition: color 0.15s;
}
.nav-member-link:hover { color: var(--gold); }

.nav-member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212,168,74,0.4);
}

.nav-member-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212,168,74,0.18);
  border: 1px solid rgba(212,168,74,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold);
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-member-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── FEED JOIN CTA ── */
.feed-join-cta {
  margin-top: 16px;
  padding: 40px 40px 36px;
  background: rgba(28,24,20,0.88);
  border: 1px solid rgba(184,134,46,0.3);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.feed-join-label {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.01em;
}

.feed-join-sub {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(247,242,232,0.55);
  max-width: 480px;
  line-height: 1.6;
}

.feed-join-btn {
  margin-top: 8px;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(135deg, #ecb438 0%, #b8862e 100%);
  text-decoration: none;
  padding: 10px 28px;
  border-radius: 2px;
  transition: opacity 0.15s;
}
.feed-join-btn:hover { opacity: 0.88; }

.feed-join-signin {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(247,242,232,0.35);
  text-decoration: none;
  transition: color 0.15s;
}
.feed-join-signin:hover { color: var(--gold); }

/* ── PROFILE PAGE GATE ── */
.dialecta-profile-page .profile-gate {
  text-align: center;
  padding: 80px 32px;
  font-family: var(--font-body);
  color: var(--secondary);
}
.dialecta-profile-page .profile-gate a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 500;
}
.dialecta-profile-page .profile-gate a:hover { color: var(--gold); }
