/* ==========================================================
   GOLDEN QUILL THEME — Style System
   Warm gold + cream editorial portal
   Inspired by CaterServ catering template visual DNA
   ========================================================== */

/* --- CSS Variables --- */
:root {
  --gold: #D4A762;
  --gold-light: #E8C98A;
  --gold-dark: #B8893E;
  --cream: #FFFCF8;
  --cream-mid: #FFF7ED;
  --ink: #0A0B0D;
  --ink-soft: #3A3A3C;
  --ink-muted: #6E6E73;
  --border-light: rgba(212, 167, 98, 0.2);
  --shadow-soft: 0 2px 32px rgba(10, 11, 13, 0.06);
  --shadow-hover: 0 8px 40px rgba(212, 167, 98, 0.15);
  --radius: 8px;
  --radius-pill: 100px;
  --font-heading: Georgia, "Times New Roman", "Palatino Linotype", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --section-pad: 5rem;
  --container-width: 1140px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-dark); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--ink); }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: 780px;
}

/* --- Section Label (pill badge) --- */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-pill);
  padding: 0.4em 1.4em;
  margin-bottom: 1rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.75em 2em;
  cursor: pointer;
  transition: background 0.4s, color 0.4s, transform 0.25s;
}

.btn--primary {
  background: var(--gold);
  color: var(--ink);
}
.btn--primary:hover {
  background: var(--ink);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand img { height: 36px; width: auto; }
.brand span { color: var(--ink); }

/* Desktop nav */
.main-nav { display: flex; align-items: center; gap: 0.15rem; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.5em 0.9em;
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  transition: color 0.3s, background 0.3s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--gold-dark);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--border-light);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.65em 0;
  color: var(--ink-soft);
}
.mobile-nav a:hover { color: var(--gold-dark); }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
}

/* ========================================
   HERO
   ======================================== */
.hero {
  background: var(--cream-mid);
  padding: var(--section-pad) 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 3rem;
  align-items: center;
}

.hero .section-label { margin-bottom: 1.2rem; }

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 1.25rem;
}
.hero-title em {
  color: var(--gold);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin-bottom: 2rem;
  line-height: 1.75;
}
.hero-subtitle p { margin-bottom: 0.5em; }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  position: relative;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  opacity: 0.3;
  pointer-events: none;
}
.hero-visual-img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

/* ========================================
   LATEST POSTS
   ======================================== */
.latest-posts {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.section-header {
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-top: 0.5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Featured (first) post — large card */
.post-card { position: relative; }

.post-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.4s;
}
.post-card--featured:hover { box-shadow: var(--shadow-hover); }

.post-card--featured .post-card__img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.post-card--featured .post-card__body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card--featured .post-card__title {
  font-size: 1.55rem;
}

/* Standard post cards */
.post-card--standard {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.4s, transform 0.35s;
}
.post-card--standard:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.post-card__img-wrap {
  overflow: hidden;
  position: relative;
}
.post-card__img-wrap img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  transition: transform 0.5s;
}
.post-card--standard:hover .post-card__img-wrap img {
  transform: scale(1.06);
}

/* Date badge — overlapping, inspired by source blog cards */
.post-card__date-badge {
  position: absolute;
  bottom: 0;
  left: 1.25rem;
  transform: translateY(50%);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45em 1em;
  border-radius: var(--radius-pill);
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.post-card__body {
  padding: 1.75rem 1.25rem 1.5rem;
}

.post-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--gold-dark); }

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.post-card__meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.post-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  transition: gap 0.3s;
}
.post-card__link:hover { gap: 0.7em; color: var(--ink); }
.post-card__link::after { content: "\2192"; }

@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-card--featured { grid-template-columns: 1fr; }
  .post-card--featured .post-card__img { aspect-ratio: 16/9; }
}

/* ========================================
   TOPICS
   ======================================== */
.topics {
  padding: var(--section-pad) 0;
  background: var(--cream-mid);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.topic-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.4s, transform 0.35s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.topic-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 0;
}
.topic-card:hover::after {
  opacity: 0.06;
}
.topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.topic-card > * { position: relative; z-index: 1; }

.topic-card__name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.topic-card__desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.65;
}
.topic-card__desc p { margin-bottom: 0.5em; }
.topic-card__desc p:last-child { margin-bottom: 0; }

/* ========================================
   FAQ
   ======================================== */
.faq {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.faq-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 3.5rem;
  align-items: start;
}

.faq-intro h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
.faq-intro p {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.faq-list { list-style: none; }

.faq-item {
  border-bottom: 1px solid var(--border-light);
}
.faq-item:first-child { border-top: 1px solid var(--border-light); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}
.faq-question:hover { color: var(--gold-dark); }
.faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.3s;
}
.faq-item.is-open .faq-question::after {
  content: "\2212";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}
.faq-item.is-open .faq-answer {
  max-height: 600px;
  padding-bottom: 1.25rem;
}

.faq-answer-inner {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.7;
}
.faq-answer-inner p { margin-bottom: 0.5em; }
.faq-answer-inner p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
  .faq-layout { grid-template-columns: 1fr; gap: 2rem; }
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--cream-mid);
  border-top: 1px solid var(--border-light);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.footer-brand span { color: var(--ink); }

.footer-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  font-size: 0.88rem;
  color: var(--ink-muted);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--gold-dark); }

.footer-contact a {
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.footer-contact a:hover { color: var(--gold-dark); }

.footer-bottom {
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ========================================
   PAGE (generic content page)
   ======================================== */
.page-header {
  background: var(--cream-mid);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-light);
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.page-content {
  padding: 3rem 0 var(--section-pad);
}

.prose {
  max-width: 740px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.prose h2 {
  font-size: 1.6rem;
  margin: 2rem 0 0.75rem;
}
.prose h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.65rem;
}
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { margin: 0.5em 0 1em 1.25em; }
.prose li { margin-bottom: 0.35em; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose a { color: var(--gold-dark); text-decoration: underline; }
.prose a:hover { color: var(--ink); }
.prose blockquote {
  border-left: 4px solid var(--gold);
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  color: var(--ink-muted);
  font-style: italic;
}

/* ========================================
   BLOG INDEX
   ======================================== */
.blog-index {
  padding: var(--section-pad) 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.75em;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-light);
  color: var(--ink-soft);
  transition: all 0.3s;
}
.pagination a:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}
.pagination a.active,
.pagination span.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.pagination__prev,
.pagination__next {
  font-weight: 600;
}

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ========================================
   POST (single)
   ======================================== */
.post-header {
  padding: 3.5rem 0 2rem;
  background: var(--cream-mid);
  border-bottom: 1px solid var(--border-light);
}
.post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.75rem;
}
.post-header__meta {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.post-cover {
  margin: 2rem auto;
  max-width: 860px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.post-body {
  padding: 0 0 var(--section-pad);
}

.post-excerpt {
  max-width: 740px;
  font-size: 1.1rem;
  color: var(--ink-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
}

/* ========================================
   SKIP LINK & A11Y
   ======================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5em 1.5em;
  z-index: 999;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, background 0.3s;
  z-index: 50;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--ink);
  color: var(--gold);
}

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