/* ============================================================
   George — styles.css
   All styles extracted from index.html
   ============================================================ */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  background: #102723;
}

body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 86% 4%, rgba(106, 155, 128, 0.14), transparent 24rem),
    radial-gradient(circle at 8% 42%, rgba(133, 183, 163, 0.08), transparent 27rem),
    #102723;
  color: #edf3ed;
  overflow-x: hidden;
}

.font-editorial {
  font-family: "Newsreader", Georgia, serif;
}

/* ---------- Remove all separating border lines ---------- */
.divide-y > :not([hidden]) ~ :not([hidden]),
.divide-x > :not([hidden]) ~ :not([hidden]) {
  border-style: none !important;
  border-width: 0 !important;
}
.article-row {
  border-bottom: none !important;
}
.timeline-item::after {
  display: none !important;
}
#mobile-nav-drawer nav a {
  border-bottom: none !important;
}

.font-mono {
  font-family: "DM Mono", monospace;
}

/* ---------- Grain overlay ---------- */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: url("images/grain.svg");
  mix-blend-mode: soft-light;
}

/* ---------- Reveal animations ---------- */
.reveal-wrap {
  overflow: hidden;
  display: block;
}

.reveal-line {
  display: block;
  will-change: transform, opacity;
}

/* ---------- Article cards ---------- */
.article-card:hover .article-arrow {
  transform: translateX(0.35rem);
}

.article-card:hover .article-index {
  color: #cbe3bb;
}

/* ---------- Topic chips ---------- */
.topic-chip:hover {
  border-color: rgba(203, 227, 187, 0.58);
  background: rgba(203, 227, 187, 0.09);
}

/* ---------- Magnetic buttons ---------- */
.magnetic {
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), background 0.25s ease;
}

/* ---------- Selection ---------- */
::selection {
  background: #cbe3bb;
  color: #102723;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Warm / light theme overrides
   ============================================================ */
html { background: #fdfaf6; }
body {
  background:
    radial-gradient(ellipse 80% 50% at 92% 0%, rgba(202, 169, 120, 0.18), transparent),
    radial-gradient(ellipse 60% 45% at 8% 55%, rgba(217, 230, 221, 0.42), transparent),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(183, 134, 94, 0.07), transparent),
    #fdfaf6;
  color: #292720;
}
::selection { background: #b7865e; color: #ffffff; }

[class*="text-[#"] { color: #332d25 !important; }
[class*="border-[#"] { border-color: rgba(91, 73, 54, 0.16) !important; }
[class*="bg-[#"] { background-color: #ffffff !important; }

.font-mono,
.section-label,
[class*="uppercase"] { color: #8d6546 !important; }

.article-index,
#form-message,
footer [class*="text-[#"] { color: #74695e !important; }

#reading-progress,
header .group > span:last-child,
.animate-bounce { background-color: #b7865e !important; }

#main-content > section:nth-child(2),
#collections { border-color: rgba(91, 73, 54, 0.14) !important; }

/* ---------- Header scroll state ---------- */
header {
  transition: background-color .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}
header.is-scrolled {
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 34px rgba(63,47,29,.08);
  backdrop-filter: blur(16px);
}

/* ---------- Component backgrounds ---------- */
[data-hero] aside,
.testimonial,
.about-principle,
.bento-card,
#newsletter > div {
  background-color: #fbf8f2 !important;
  box-shadow: 0 18px 44px rgba(70,53,34,.09);
}

#contact { background: linear-gradient(135deg, #f2eadf, #e8ded0) !important; }
footer { background-color: #e4d8c8 !important; }

/* ---------- Outlined button (secondary CTA) ---------- */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px solid rgba(183,134,94,0.35);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7a5c42;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-outline:hover {
  border-color: #b7865e;
  background: rgba(183,134,94,0.07);
  color: #5c4230;
}

/* ---------- Mobile navigation drawer ---------- */
#mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
#mobile-nav.open {
  pointer-events: auto;
}
#mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(35,30,24,0);
  transition: background 0.35s ease;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}
#mobile-nav.open #mobile-nav-overlay {
  background: rgba(35,30,24,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(22rem, 88vw);
  background: #fdfaf6;
  box-shadow: -20px 0 60px rgba(35,30,24,0.15);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.75rem 2rem;
  overflow-y: auto;
}
#mobile-nav.open #mobile-nav-drawer {
  transform: translateX(0);
}
#mobile-nav-drawer nav a {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #332d25;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(183,134,94,0.12);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
#mobile-nav-drawer nav a:hover {
  color: #b7865e;
  padding-left: 0.35rem;
}
#mobile-nav-drawer .mobile-subscribe {
  margin-top: auto;
  padding-top: 2rem;
}

/* ---------- Hero image ---------- */
.hero-photo {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 44%;
  object-fit: cover;
  object-position: center left;
  opacity: 0;
  transition: opacity 1.2s ease;
  mask-image: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}
.hero-photo.loaded {
  opacity: 0.38;
}
@media (min-width: 1024px) {
  .hero-photo.loaded { opacity: 0.52; }
}

/* ---------- Article date label ---------- */
.article-date {
  font-size: 0.68rem;
  color: #9c7e6a;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

/* ---------- New badge ---------- */
.badge-new {
  display: inline-flex;
  align-items: center;
  background: #b7865e;
  color: #fffaf2;
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.bento-card:nth-child(2) { background-color: #f8f0e6 !important; }
.bento-card:nth-child(3) { background-color: #f0e5d6 !important; }
.bento-card:nth-child(4) { background-color: #f5eadf !important; }

/* ---------- Hover interactions ---------- */
.article-card {
  transition: transform .35s ease, background-color .35s ease, box-shadow .35s ease;
}
.article-card:hover {
  transform: translateY(-8px);
  background: rgba(255,255,255,.7);
  box-shadow: 0 18px 36px rgba(70,53,34,.09);
}

.bento-card,
.testimonial,
.about-principle {
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease;
}
.bento-card:hover,
.testimonial:hover,
.about-principle:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(70,53,34,.13);
}

.topic-chip:hover {
  border-color: rgba(183,134,94,.65) !important;
  background: rgba(183,134,94,.1) !important;
}

.article-card:hover .article-index { color: #9c6746 !important; }

/* ---------- CTA buttons ---------- */
#newsletter button,
#main-content a.magnetic[href="#essays"] {
  background-color: #b7865e !important;
  color: #fffaf2 !important;
}
#newsletter button:hover,
#main-content a.magnetic[href="#essays"]:hover {
  background-color: #9c6f4d !important;
}

iconify-icon { color: #9c6746 !important; }

/* ---------- Featured story ---------- */
.featured-story {
  background: linear-gradient(135deg, #faf5ed 0%, #ffffff 55%, #f1e7d8 100%);
}

.story-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
.story-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
