/* BriMic modern — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,500&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --bg: #faf8f5;
  --bg-soft: #f3efe8;
  --surface: #ffffff;
  --text: #3a342f;
  --muted: #6b645c;
  --faint: #9a9187;
  --accent: #7d6e5f;
  --accent-soft: #a89886;
  --border: #e6dfd4;
  --shadow: 0 12px 40px -18px rgb(58 52 47 / 0.28);
  --shadow-sm: 0 6px 20px -10px rgb(58 52 47 / 0.18);
  --radius: 16px;
  --nav-h: 64px;
  --max: 1100px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Source Sans 3', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--text); }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* —— Nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-nav .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
  position: relative;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }

.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1.5px;
  background: var(--accent-soft);
}

.nav-links a.nav-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 0.25rem;
  border-radius: 8px;
}
.nav-links a.nav-edit:hover,
.nav-links a.nav-edit[aria-current="page"] {
  color: var(--text);
  background: var(--bg-soft);
}
.nav-links a.nav-edit[aria-current="page"]::after {
  display: none;
}
.nav-edit svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}
.mobile-menu a.nav-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: white;
  padding: 0.75rem 0 1rem;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.7rem 0;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
}

/* —— Typography —— */
.serif { font-family: var(--font-serif); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2rem, 4vw, 2.85rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* —— Sections —— */
.section { padding: 3.5rem 0; }
.section-tight { padding: 2.5rem 0; }
.section-soft { background: rgb(255 255 255 / 0.55); }
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  border: 0;
  margin: 0;
}

/* —— Hero —— */
.hero {
  padding: 2.75rem 0 2rem;
  text-align: center;
}
.hero h1 { margin-bottom: 1.25rem; }

.hero-photo-wrap {
  position: relative;
  margin: 0 auto 1.25rem;
  max-width: 52rem;
}
.hero-photo-wrap img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 4px;
}
.hero-photo-wrap::before,
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2.5rem, 8vw, 5rem);
  pointer-events: none;
  z-index: 1;
}
.hero-photo-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.hero-photo-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.hero-caption {
  font-size: 1.15rem;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 1.5rem;
}
.story {
  max-width: 38rem;
  margin: 0 auto;
  text-align: left;
  color: var(--muted);
}
.story p { margin: 0 0 1rem; }
.story p:last-child { margin-bottom: 0; }
.story strong { color: var(--text); font-weight: 600; }

/* —— Cards / blogs —— */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.card:hover,
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: inherit;
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body { padding: 1.15rem 1.25rem 1.35rem; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.82rem;
  color: var(--faint);
  margin-bottom: 0.45rem;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
  color: var(--text);
}
.card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}
.tab-btn {
  border: 1px solid var(--border);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}
.tab-btn:hover { border-color: var(--accent-soft); color: var(--text); }
.tab-btn[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* —— Feature / Neive —— */
.feature {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 1.5rem; }
}
.video-frame {
  background: #141210;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* —— Post detail —— */
.post-hero {
  max-width: 46rem;
  margin: 0 auto;
}
.post-hero .card-media {
  border-radius: var(--radius);
  margin: 1.25rem 0 1.5rem;
  box-shadow: var(--shadow-sm);
}
.post-body {
  max-width: 40rem;
  margin: 0 auto;
  color: var(--muted);
  white-space: pre-wrap;
  font-size: 1.08rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* —— Buttons / forms —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: #6a5d50; color: white; }
.btn-secondary {
  background: white;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent-soft); }
.btn-danger {
  background: #fff5f3;
  border-color: #efc4bb;
  color: #9b3b2e;
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.88rem; }

.form-stack {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}
label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: white;
}
textarea { min-height: 10rem; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgb(125 110 95 / 0.35);
  border-color: var(--accent-soft);
}

.notice {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  background: #f4f0e8;
  border: 1px solid var(--border);
  color: var(--muted);
}
.notice.ok {
  background: #eef7ef;
  border-color: #c5dfc8;
  color: #2f5d38;
}
.notice.err {
  background: #fdf0ee;
  border-color: #efc4bb;
  color: #8a3328;
}

.edit-bar {
  display: none;
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: #2f2a26;
  color: #f4efe8;
  font-size: 0.88rem;
  padding: 0.55rem 0;
}
.edit-bar.visible { display: block; }
.edit-bar .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.edit-bar a, .edit-bar button {
  color: #f4efe8;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.edit-bar a:hover, .edit-bar button:hover {
  background: rgb(255 255 255 / 0.1);
  color: white;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgb(255 255 255 / 0.7);
  padding: 2rem 0;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer .fine {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--faint);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: white;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: var(--bg-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
