/* =========================================================
   SPRING-NAILS — "Where Beauty Blossoms."
   Custom editorial design system
   ========================================================= */

:root {
  --bg: #fdf8f4;
  --bg-soft: #f8efe8;
  --surface: #ffffff;
  --ink: #3b2b30;
  --ink-soft: #6b565d;
  --muted: #a08b91;
  --rose: #c9859a;
  --rose-dark: #a85f77;
  --rose-light: #f3dce3;
  --sage: #7a9e7e;
  --sage-light: #e4eee4;
  --gold: #c9a86a;
  --gold-light: #f4ead6;
  --border: #f0e2da;
  --shadow-sm: 0 2px 10px rgba(160, 95, 119, 0.06);
  --shadow-md: 0 10px 30px rgba(160, 95, 119, 0.10);
  --shadow-lg: 0 24px 60px rgba(160, 95, 119, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 100% -100px, var(--rose-light) 0%, transparent 60%),
    radial-gradient(900px 420px at -100px 20%, var(--sage-light) 0%, transparent 55%),
    var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Top ribbon ---------- */
.top-ribbon {
  background: linear-gradient(90deg, var(--rose), #d79ab0 50%, var(--sage));
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 16px;
}
.top-ribbon span { opacity: 0.95; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 244, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.brand-text { line-height: 1.1; }
.brand-text strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand-text small {
  font-size: 0.72rem;
  color: var(--rose-dark);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.5rem; color: var(--ink);
  cursor: pointer;
}
.main-nav ul { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--rose-light);
  color: var(--rose-dark);
}
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: "▾"; margin-left: 5px; font-size: 0.7rem; }
.dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: 0.2s;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; border-radius: 8px; }

.search-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid; place-items: center;
  transition: 0.2s;
}
.search-toggle:hover { background: var(--rose-light); color: var(--rose-dark); }

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(59, 43, 48, 0.5);
  backdrop-filter: blur(6px);
  display: none;
  place-items: start center;
  padding-top: 12vh;
}
.search-overlay.open { display: grid; }
.search-box {
  width: min(560px, 90vw);
  background: #fff; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-lg);
  animation: pop 0.25s ease;
}
.search-box form { display: flex; gap: 10px; }
.search-box input {
  flex: 1; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.95rem; font-family: inherit;
}
.search-box input:focus { outline: 2px solid var(--rose); border-color: transparent; }
.search-close {
  position: absolute; top: 20px; right: 28px;
  background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer;
}
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ---------- Hero / masthead ---------- */
.masthead {
  text-align: center;
  padding: 64px 24px 40px;
}
.masthead .eyebrow {
  display: inline-block;
  font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--rose-dark);
  background: var(--rose-light);
  padding: 6px 16px; border-radius: 999px;
  margin-bottom: 18px;
}
.masthead h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.masthead h1 em { font-style: italic; color: var(--rose-dark); }
.masthead p {
  max-width: 620px; margin: 18px auto 0;
  color: var(--ink-soft); font-size: 1.05rem;
}
.masthead .flourish { color: var(--gold); font-size: 1.4rem; letter-spacing: 0.5em; margin-top: 14px; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding: 24px 0 72px;
}

/* ---------- Post grid ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: 0.28s ease;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.post-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.post-card:hover .thumb img { transform: scale(1.06); }
.post-card .cat-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,0.92);
  color: var(--rose-dark);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 {
  font-family: var(--font-serif);
  font-size: 1.38rem; line-height: 1.25; font-weight: 700;
  margin-bottom: 10px;
}
.post-card h3 a:hover { color: var(--rose-dark); }
.post-card .meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 12px; }
.post-card .meta a { color: var(--rose-dark); font-weight: 500; }
.post-card p.excerpt { font-size: 0.92rem; color: var(--ink-soft); flex: 1; }
.post-card .read-more {
  margin-top: 16px; align-self: flex-start;
  font-size: 0.82rem; font-weight: 600; color: var(--rose-dark);
  letter-spacing: 0.03em;
}
.post-card .read-more::after { content: " →"; transition: 0.2s; }
.post-card .read-more:hover::after { margin-left: 4px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: #fff; font-size: 0.9rem; color: var(--ink-soft);
  transition: 0.2s;
}
.pagination .current { background: var(--rose); color: #fff; border-color: var(--rose); }
.pagination a:hover { background: var(--rose-light); color: var(--rose-dark); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.widget h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 700;
  padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 2px solid var(--rose-light);
  position: relative;
}
.widget h4::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 44px; height: 2px; background: var(--rose);
}
.widget.recent ul li { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.widget.recent ul li:last-child { border-bottom: none; }
.widget.recent a { font-size: 0.9rem; line-height: 1.4; color: var(--ink); }
.widget.recent a:hover { color: var(--rose-dark); }
.widget.categories ul li { border-bottom: 1px dashed var(--border); }
.widget.categories ul li:last-child { border-bottom: none; }
.widget.categories a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; font-size: 0.9rem; color: var(--ink-soft);
  transition: 0.2s;
}
.widget.categories a:hover { color: var(--rose-dark); padding-left: 6px; }
.widget.categories .count {
  font-size: 0.72rem; background: var(--rose-light);
  color: var(--rose-dark); border-radius: 999px; padding: 2px 9px;
}
.widget.search form { display: flex; }
.widget.search input {
  flex: 1; padding: 11px 15px; border: 1px solid var(--border);
  border-radius: 999px 0 0 999px; font-family: inherit; font-size: 0.9rem;
}
.widget.search button {
  border: none; background: var(--rose); color: #fff;
  padding: 0 18px; border-radius: 0 999px 999px 0; cursor: pointer;
}
.widget.search input:focus { outline: 2px solid var(--rose); }

/* ---------- Page header (archive / static) ---------- */
.page-header {
  padding: 56px 24px 8px;
  text-align: center;
}
.page-header .breadcrumb { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; }
.page-header .breadcrumb a:hover { color: var(--rose-dark); }
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}
.page-header p { max-width: 640px; margin: 14px auto 0; color: var(--ink-soft); }

/* ---------- Prose (static pages + articles) ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 40px 24px 72px; }
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem; font-weight: 700;
  margin: 40px 0 14px; color: var(--ink);
}
.prose h3 { font-family: var(--font-serif); font-size: 1.3rem; margin: 28px 0 10px; }
.prose p { margin: 0 0 16px; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--ink-soft); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 6px 0; }
.prose a { color: var(--rose-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose .lead { font-size: 1.15rem; color: var(--ink); }

/* ---------- Article layout ---------- */
.article-hero { padding: 48px 24px 8px; text-align: center; }
.article-hero .cat-badge {
  display: inline-block; background: var(--rose-light); color: var(--rose-dark);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
}
.article-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1; font-weight: 700; max-width: 820px; margin: 0 auto;
}
.article-hero .meta { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
.article-hero .meta a { color: var(--rose-dark); font-weight: 500; }
.article-hero .meta .dot { margin: 0 8px; color: var(--gold); }

.article-featured {
  max-width: 920px; margin: 28px auto 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.article-featured img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.article-body { max-width: 760px; margin: 0 auto; padding: 40px 24px 24px; }
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.65rem; font-weight: 700; margin: 44px 0 14px;
  color: var(--ink);
}
.article-body h2 .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-right: 10px;
  background: var(--rose-light); color: var(--rose-dark);
  border-radius: 50%; font-family: var(--font-sans); font-size: 0.85rem; font-weight: 700;
  vertical-align: middle;
}
.article-body p { margin: 0 0 16px; color: var(--ink-soft); }
.article-body .figure { margin: 22px 0; border-radius: var(--radius); overflow: hidden; }
.article-body .figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.toc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 28px 0 8px;
}
.toc h4 {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.toc ol { margin-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin: 6px 0; font-size: 0.9rem; break-inside: avoid; }
.toc a { color: var(--ink-soft); }
.toc a:hover { color: var(--rose-dark); }

/* ---------- Related posts ---------- */
.related { max-width: 1000px; margin: 0 auto; padding: 24px 24px 56px; }
.related h2 { font-family: var(--font-serif); font-size: 1.6rem; margin-bottom: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.related-card img { aspect-ratio: 16/10; object-fit: cover; }
.related-card .rc-body { padding: 14px 16px 18px; }
.related-card h3 { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.3; }
.related-card .date { font-size: 0.75rem; color: var(--muted); margin-top: 6px; }

/* ---------- Author box ---------- */
.author-box {
  max-width: 760px; margin: 0 auto 40px; padding: 0 24px;
}
.author-box .inner {
  display: flex; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.author-box .avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; flex-shrink: 0;
}
.author-box h4 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 4px; }
.author-box p { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(120deg, var(--rose), #b86a86);
  color: #fff; border-radius: var(--radius);
  padding: 44px 40px; text-align: center; margin: 0 0 48px;
}
.newsletter h3 { font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 8px; }
.newsletter p { opacity: 0.92; margin-bottom: 20px; }
.newsletter form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.newsletter input {
  flex: 1; padding: 13px 18px; border: none; border-radius: 999px; font-family: inherit;
}
.newsletter button {
  border: none; background: var(--ink); color: #fff; padding: 0 24px;
  border-radius: 999px; cursor: pointer; font-weight: 600;
}
.newsletter input:focus { outline: 2px solid #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: #332328;
  color: #d9c7cc;
  margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px; padding: 56px 24px 40px;
}
.footer-col h4 {
  color: #fff; font-family: var(--font-serif);
  font-size: 1.1rem; margin-bottom: 18px; letter-spacing: 0.03em;
}
.footer-col .brand-text strong { color: #fff; }
.footer-col .brand-text small { color: var(--rose); }
.footer-col p { font-size: 0.9rem; line-height: 1.7; margin-top: 12px; }
.footer-col ul li { margin: 10px 0; }
.footer-col ul a { font-size: 0.9rem; transition: 0.2s; }
.footer-col ul a:hover { color: var(--rose); padding-left: 4px; }
.footer-col .contact-line { display: block; font-size: 0.9rem; margin: 10px 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 24px; text-align: center; font-size: 0.8rem; color: #a89299;
}
.footer-bottom a { color: #d9c7cc; }
.footer-bottom a:hover { color: var(--rose); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem; transition: 0.2s; border: none; cursor: pointer;
}
.btn-primary { background: var(--rose); color: #fff; box-shadow: 0 8px 20px rgba(168,95,119,0.3); }
.btn-primary:hover { background: var(--rose-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--rose-dark); border: 1px solid var(--rose); }
.btn-ghost:hover { background: var(--rose-light); }

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar .widget { flex: 1 1 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .toc ol { columns: 1; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0; z-index: 60;
    background: var(--bg); padding: 80px 28px;
    transform: translateX(100%); transition: 0.3s;
    display: none;
  }
  .main-nav.open { display: block; transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .main-nav a { font-size: 1.05rem; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 14px; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
  .newsletter button { padding: 13px; }
}
