/* ============================================================
   URARIIN Journal — public blog
   Warm minimal editorial system, matching the main site
   ============================================================ */

:root {
  --cream: #f7f4ef;
  --sand: #ece7e1;
  --ink: #222;
  --charcoal: #111;
  --smoke: #77716a;
  --ember: #d8792b;
  --ember-hover: #c56a20;
  --line: rgba(17, 17, 17, 0.09);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.21, 0.47, 0.32, 0.98);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Subtle paper grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 99; pointer-events: none;
  opacity: 0.03; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; }
a { color: var(--ember); text-decoration: none; }
.serif { font-family: var(--serif); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.4rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--charcoal); color: var(--cream); padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--cream) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 2rem; height: 72px; }
.brand { font-family: var(--serif); letter-spacing: 0.24em; font-size: 1.15rem; color: var(--ink); }
.site-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.site-nav a {
  color: var(--ink); font-size: 0.74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  position: relative; padding-bottom: 0.3rem;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--ember); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.btn-nav {
  background: var(--ember); color: #fff; font-size: 0.7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; padding: 0.7rem 1.4rem;
  transition: background 0.25s, transform 0.2s;
}
.btn-nav:hover { background: var(--ember-hover); transform: translateY(-1px); }
@media (max-width: 640px) { .site-nav { display: none; } .header-inner { justify-content: space-between; } }

.progress-track { height: 2px; background: transparent; }
.progress-bar { height: 100%; width: 0; background: var(--ember); transition: width 0.1s linear; }

/* ---------- Shared editorial bits ---------- */
.kicker {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--smoke); margin: 0 0 1rem;
}
.kicker span { display: inline-block; width: 42px; height: 1px; background: var(--ember); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Listing ---------- */
.journal-hero { padding: 5rem 0 3.5rem; }
.journal-hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.06; margin: 0 0 1rem;
}
.journal-hero h1 em { color: var(--ember); font-weight: 500; }
.journal-hero .sub { color: var(--smoke); max-width: 480px; margin: 0; }

.cat-rail { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 0 2.5rem; }
.cat-rail a {
  border: 1px solid var(--line); color: var(--smoke);
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em;
  padding: 0.45rem 1.1rem; border-radius: 99px;
  transition: all 0.25s;
}
.cat-rail a:hover { border-color: var(--ember); color: var(--ember); }
.cat-rail a.active { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }

/* Featured (latest) post */
.featured {
  display: grid; gap: 2.4rem; margin-bottom: 4.5rem; align-items: center;
}
@media (min-width: 900px) { .featured { grid-template-columns: 7fr 5fr; } }
.featured .media { overflow: hidden; background: var(--sand); }
.featured .media img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
  transition: transform 1.6s var(--ease);
}
.featured:hover .media img { transform: scale(1.05); }
.featured h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; margin: 0.9rem 0; }
.featured h2 a { color: var(--ink); transition: color 0.25s; }
.featured h2 a:hover { color: var(--ember); }
.featured .excerpt { color: var(--smoke); margin: 0 0 1.4rem; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; font-size: 0.74rem; color: var(--smoke); letter-spacing: 0.04em; }
.post-meta .cat { color: var(--ember); font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.66rem; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--smoke); opacity: 0.6; }

.read-more {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
}
.read-more i { transition: transform 0.3s var(--ease); font-style: normal; color: var(--ember); }
.read-more:hover i { transform: translateX(5px); }

/* Grid cards */
.post-grid { display: grid; gap: 2.6rem 2rem; padding-bottom: 4rem; }
@media (min-width: 640px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: 1fr 1fr 1fr; } }
.card .media { overflow: hidden; background: var(--sand); margin-bottom: 1.1rem; }
.card .media img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  transition: transform 1.4s var(--ease);
}
.card:hover .media img { transform: scale(1.06); }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.25; margin: 0.7rem 0 0.5rem; }
.card h3 a { color: var(--ink); transition: color 0.25s; }
.card h3 a:hover { color: var(--ember); }
.card .excerpt { color: var(--smoke); font-size: 0.88rem; margin: 0; }

/* Pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0 0 5rem; }
.pager a, .pager span {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 0.7rem; font-size: 0.85rem; color: var(--ink); border: 1px solid transparent;
}
.pager a:hover { border-color: var(--line); }
.pager .current { background: var(--charcoal); color: var(--cream); }

/* Empty state */
.journal-empty { text-align: center; padding: 5rem 1rem 7rem; color: var(--smoke); }
.journal-empty .cup { font-size: 2.2rem; margin-bottom: 1rem; }
.journal-empty h2 { font-family: var(--serif); color: var(--ink); }

/* ---------- Article ---------- */
.article-hero { padding: 4.5rem 0 2.6rem; max-width: 780px; margin: 0 auto; }
.article-hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; margin: 0.9rem 0 1.2rem;
}
.article-figure { max-width: 1160px; margin: 0 auto 3rem; padding: 0 1.4rem; }
.article-figure img { width: 100%; max-height: 620px; object-fit: cover; display: block; }
.article-figure figcaption { font-size: 0.74rem; color: var(--smoke); padding-top: 0.6rem; }

.article-body-wrap { display: grid; max-width: 1020px; margin: 0 auto; padding: 0 1.4rem 4rem; gap: 3rem; }
@media (min-width: 900px) { .article-body-wrap { grid-template-columns: 64px minmax(0, 1fr); } }

.share-rail { display: flex; gap: 0.6rem; }
@media (min-width: 900px) {
  .share-rail { flex-direction: column; position: sticky; top: 110px; align-self: start; }
}
.share-rail button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 0.95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.share-rail button:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-2px); }
.share-rail button.copied { background: #6d9f71; border-color: #6d9f71; color: #fff; }
.share-label { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--smoke); text-align: center; margin: 0 0 0.2rem; }
@media (max-width: 899px) { .share-label { display: none; } }

.article-body { max-width: 720px; font-size: 1.05rem; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 3.6em; float: left;
  line-height: 0.82; padding: 0.06em 0.12em 0 0; color: var(--ember);
}
.article-body h2, .article-body h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 2.4rem 0 0.9rem; }
.article-body h2 { font-size: 1.75rem; }
.article-body h3 { font-size: 1.35rem; }
.article-body blockquote {
  margin: 2.2rem 0; padding: 0.4rem 0 0.4rem 1.6rem;
  border-left: 2px solid var(--ember);
  font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: #4a453f;
}
.article-body img { display: block; margin: 2rem 0; }
.article-body a { border-bottom: 1px solid rgba(216, 121, 43, 0.4); }
.article-body a:hover { border-bottom-color: var(--ember); }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body li { margin-bottom: 0.4rem; }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.6rem; }
.article-tags a {
  font-size: 0.72rem; color: var(--smoke); border: 1px solid var(--line);
  border-radius: 99px; padding: 0.35rem 0.95rem; transition: all 0.25s;
}
.article-tags a:hover { border-color: var(--ember); color: var(--ember); }

.article-divider { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--ember); padding: 1rem 0 0; }
.article-divider::before, .article-divider::after { content: ""; width: 60px; height: 1px; background: var(--line); }

/* Related */
.related { background: var(--sand); padding: 4.5rem 0 5rem; }
.related h2 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; margin: 0 0 2rem; }
.related .post-grid { padding-bottom: 0; }

/* ---------- Subscribe band ---------- */
.subscribe-band { background: var(--charcoal); color: var(--cream); text-align: center; padding: 5rem 0; }
.subscribe-band .kicker { justify-content: center; color: rgba(247, 244, 239, 0.55); }
.subscribe-band h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 0.8rem; }
.subscribe-band .sub { color: rgba(247, 244, 239, 0.6); font-size: 0.92rem; margin: 0 auto 2rem; max-width: 420px; }
.subscribe-form { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.subscribe-form input {
  background: rgba(247, 244, 239, 0.07); border: 1px solid rgba(247, 244, 239, 0.2);
  color: var(--cream); padding: 0.85rem 1.2rem; font-size: 0.9rem; min-width: 280px;
  font-family: var(--sans);
}
.subscribe-form input:focus { outline: none; border-color: var(--ember); }
.subscribe-form input::placeholder { color: rgba(247, 244, 239, 0.4); }
.subscribe-form button {
  background: var(--ember); border: none; color: #fff; cursor: pointer;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.85rem 1.8rem; transition: background 0.25s, transform 0.2s;
  font-family: var(--sans);
}
.subscribe-form button:hover { background: var(--ember-hover); transform: translateY(-1px); }
.subscribe-msg { min-height: 1.4em; font-size: 0.82rem; color: rgba(247, 244, 239, 0.75); margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: rgba(247, 244, 239, 0.55); border-top: 1px solid rgba(247, 244, 239, 0.08); }
.footer-inner { padding: 2.6rem 1.4rem; text-align: center; }
.footer-inner .brand { color: var(--cream); display: inline-block; margin-bottom: 1rem; }
.footer-inner nav { display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.footer-inner nav a {
  color: rgba(247, 244, 239, 0.6); font-size: 0.72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; transition: color 0.25s;
}
.footer-inner nav a:hover { color: var(--ember); }
.footer-inner p { font-size: 0.76rem; margin: 0; }
