@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #f5e6c8;
  --amber: #d4a574;
  --ink: #262117;
  --ink-light: #4a3e2e;
  --amber-dark: #b8854a;
  --cream-dark: #e8d0a0;
  --radius: 0px;
  --shadow: 3px 4px 16px rgba(38,33,23,0.18);
  --font-body: 'Patrick Hand', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Kalam', cursive;
  --max-read: 720px;
  --sidebar-w: 220px;
}

html {
  font-size: 17px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* =========================================================
   GRAIN + LIGHT LEAK OVERLAY
   ========================================================= */
.grain-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23grain)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

.light-leak {
  pointer-events: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 340px;
  z-index: 9998;
  background: radial-gradient(ellipse at top right, rgba(212,165,116,0.22) 0%, rgba(245,230,200,0.08) 55%, transparent 75%);
  mix-blend-mode: screen;
  animation: leakPulse 8s ease-in-out infinite alternate;
}

@keyframes leakPulse {
  0%   { opacity: 0.6; transform: scale(1) translate(0,0); }
  100% { opacity: 1;   transform: scale(1.12) translate(-20px, 20px); }
}

/* =========================================================
   ANNOUNCE STRIP
   ========================================================= */
.announce-strip {
  background: var(--ink);
  color: var(--amber);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 6px 16px;
  font-family: var(--font-body);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--cream-dark);
  border-bottom: 2px solid var(--amber);
  box-shadow: 0 2px 8px rgba(38,33,23,0.12);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(212,165,116,0.4);
}

.brand-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  border-radius: 0;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: color 0.2s;
}

.brand-name:hover {
  color: var(--amber-dark);
}

/* =========================================================
   NAV ROW (desktop inline nav)
   ========================================================= */
.nav-row {
  padding: 0 24px;
}

.header-aside nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 0;
}

.header-aside nav ul li a {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-light);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.header-aside nav ul li a:hover,
.header-aside nav ul li a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.nav-ctas {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 0;
}

/* =========================================================
   CTA BUTTONS
   ========================================================= */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.cta-signup {
  background: var(--ink);
  color: var(--amber);
  border: 2px solid var(--ink);
}

.cta-signup:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: var(--ink);
  transform: translateY(-1px);
}

.cta-login {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}

.cta-login:hover {
  background: var(--ink);
  color: var(--amber);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 28px;
  background: var(--ink);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: var(--ink);
  transform: translateY(-2px);
}

/* =========================================================
   HAMBURGER BUTTON
   ========================================================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 36px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  min-height: 40px;
  align-items: center;
}

.burger-line {
  display: block;
  width: 30px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}

/* =========================================================
   FULLSCREEN NAV OVERLAY
   ========================================================= */
.fullscreen-nav {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.fullscreen-nav.open {
  opacity: 1;
  pointer-events: all;
}

.fullscreen-nav aside nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.fullscreen-nav aside nav ul li a {
  display: block;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--amber);
  text-decoration: none;
  letter-spacing: 0.03em;
  min-height: 44px;
  transition: color 0.2s;
}

.fullscreen-nav aside nav ul li a:hover {
  color: var(--cream);
}

.fullscreen-nav .nav-ctas {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

.fullscreen-nav .cta-signup {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}

.fullscreen-nav .cta-login {
  background: transparent;
  color: var(--amber);
  border-color: var(--amber);
}

.nav-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--amber);
  font-size: 1.6rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.nav-close:hover {
  color: var(--cream);
}

/* =========================================================
   HERO SECTION (home only)
   ========================================================= */
.hero-section {
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--ink);
  padding: 56px 24px 48px;
}

.hero-texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--amber) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.09;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.18;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--cream-dark);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-section .byline {
  color: var(--amber);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

/* =========================================================
   PAGE BODY + SIDEBAR LAYOUT
   ========================================================= */
.page-body {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}

.page-body.with-sidebar {
  display: flex;
  flex-direction: row;
  gap: 36px;
  align-items: flex-start;
}

/* Sidebar to the LEFT */
.sidebar {
  flex: 0 0 var(--sidebar-w);
  min-width: 180px;
  max-width: var(--sidebar-w);
  background: var(--cream-dark);
  border: 1px solid var(--amber);
  padding: 20px 16px;
  position: sticky;
  top: 110px;
  align-self: flex-start;
}

.sidebar-heading {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 6px;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li {
  border-bottom: 1px dashed rgba(212,165,116,0.35);
}

.sidebar nav ul li:last-child {
  border-bottom: none;
}

.sidebar nav ul li a {
  display: block;
  padding: 8px 4px;
  font-size: 0.88rem;
  color: var(--ink-light);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar nav ul li a:hover {
  color: var(--ink);
  padding-left: 8px;
}

.sidebar-cta {
  margin-top: 16px;
}

.sidebar-cta .btn-primary {
  width: 100%;
  font-size: 0.85rem;
  padding: 8px 12px;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
main {
  flex: 1;
  min-width: 0;
}

div {
  width: 100%;
}

.content-section {
  max-width: var(--max-read);
}

.article-header {
  margin-bottom: 8px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 8px;
}

hr {
  border: none;
  border-top: 2px solid var(--amber);
  margin: 16px 0 24px;
  opacity: 0.7;
}

/* =========================================================
   BYLINE
   ========================================================= */
.byline {
  font-size: 0.86rem;
  color: var(--ink-light);
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.byline .author-name {
  font-weight: 700;
}

/* =========================================================
   STAGE LABEL
   ========================================================= */
.stage-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 10px;
  margin-bottom: 10px;
  font-family: var(--font-body);
  border: 1px solid var(--amber);
  color: var(--amber-dark);
}

/* =========================================================
   BODY COPY TYPOGRAPHY
   ========================================================= */
.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 36px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.content-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-light);
  margin-top: 28px;
  margin-bottom: 4px;
}

.content-section h2 + hr,
.content-section h3 + hr {
  margin-top: 4px;
}

.content-section p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.content-section ul,
.content-section ol {
  margin: 0 0 1rem 1.4rem;
  line-height: 1.7;
}

.content-section li {
  margin-bottom: 0.35rem;
}

.content-section a {
  color: var(--amber-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.content-section a:hover {
  color: var(--ink);
}

.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4rem;
  font-size: 0.92rem;
}

.content-section th {
  background: var(--ink);
  color: var(--amber);
  padding: 10px 12px;
  text-align: left;
  font-family: var(--font-display);
}

.content-section td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(212,165,116,0.3);
}

.content-section tr:nth-child(even) td {
  background: rgba(212,165,116,0.08);
}

.content-section blockquote {
  border-left: 4px solid var(--amber);
  padding: 10px 16px;
  margin: 20px 0;
  color: var(--ink-light);
  font-style: italic;
  background: rgba(212,165,116,0.08);
}

/* =========================================================
   GUIDES SECTION (home child cards)
   ========================================================= */
.guides-section {
  margin-top: 40px;
  max-width: var(--max-read);
}

.guides-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.guide-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.guide-list dt {
  margin-top: 16px;
}

.guide-list dt a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 14px;
  background: var(--cream-dark);
  border: 1px solid var(--amber);
  border-bottom: none;
  transition: background 0.2s, color 0.2s;
  box-shadow: var(--shadow);
}

.guide-list dt a:hover {
  background: var(--amber);
  color: var(--ink);
}

.guide-list dd {
  font-size: 0.88rem;
  color: var(--ink-light);
  padding: 8px 14px 10px;
  background: var(--cream-dark);
  border: 1px solid var(--amber);
  line-height: 1.5;
}

.card-date {
  font-size: 0.78rem;
  opacity: 0.65;
  display: inline-block;
  margin-left: 6px;
}

/* =========================================================
   AUTHOR SECTION (about page)
   ========================================================= */
.author-section {
  margin-top: 40px;
  padding: 24px;
  background: var(--cream-dark);
  border: 1px solid var(--amber);
  box-shadow: var(--shadow);
}

.author-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.author-name-lg {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin: 10px 0 4px;
}

.author-credentials {
  font-size: 0.88rem;
  color: var(--amber-dark);
  font-style: italic;
  margin-bottom: 10px;
}

.author-bio {
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.65;
}

/* =========================================================
   CONTACT FORM
   ========================================================= */
.contact-form-wrap {
  margin-top: 36px;
  max-width: 560px;
}

.contact-form-wrap h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.contact-form label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-light);
  font-family: var(--font-body);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--cream);
  border: 1px solid var(--amber);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--ink);
}

.contact-form button {
  align-self: flex-start;
  min-height: 44px;
  cursor: pointer;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--ink);
  padding: 28px 24px 20px;
  text-align: center;
  border-top: 2px solid var(--amber);
}

.site-footer p {
  margin-bottom: 8px;
}

.footer-links {
  font-size: 0.88rem;
  color: var(--cream-dark);
}

.footer-links a {
  color: var(--amber);
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--cream);
}

.rg-notice {
  font-size: 0.8rem;
  color: rgba(212,165,116,0.75);
  max-width: 640px;
  margin: 0 auto 8px;
  line-height: 1.5;
}

.copyright {
  display: block;
  font-size: 0.76rem;
  color: rgba(245,230,200,0.45);
  font-family: var(--font-body);
}

/* =========================================================
   SCROLL REVEAL ANIMATION
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .light-leak,
  .grain-overlay {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .grain-overlay { opacity: 0.04 !important; }
}

/* =========================================================
   POLAROID CARD EFFECT (images inside content)
   ========================================================= */
.content-section img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 6px solid #fff;
  border-bottom: 28px solid #fff;
  box-shadow: 2px 4px 14px rgba(38,33,23,0.22);
  margin: 20px auto;
  filter: sepia(0.18) contrast(1.06) saturate(0.88);
  transition: transform 0.3s;
}

.content-section img:hover {
  transform: rotate(-1deg) scale(1.02);
}

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */
@media (max-width: 900px) {
  .page-body.with-sidebar {
    gap: 24px;
  }
  .sidebar {
    flex: 0 0 180px;
    min-width: 160px;
  }
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */
@media (max-width: 680px) {
  .menu-toggle {
    display: flex;
  }

  .nav-row {
    display: none;
  }

  .page-body.with-sidebar {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    max-width: 100%;
    width: 100%;
    flex: none;
    order: -1;
  }

  .hero-section {
    min-height: auto;
    padding: 40px 20px 36px;
  }

  .hero-h1 {
    font-size: clamp(1.7rem, 7vw, 2.6rem);
  }

  .nav-ctas {
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
  }

  .guide-list {
    grid-template-columns: 1fr;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .content-section {
    max-width: 100%;
  }

  .guides-section {
    max-width: 100%;
  }

  .contact-form-wrap {
    max-width: 100%;
  }

  .author-section {
    padding: 16px;
  }
}

@media (max-width: 375px) {
  html {
    font-size: 16px;
  }
  .brand-row {
    padding: 8px 14px;
  }
  .hero-section {
    padding: 32px 14px 28px;
  }
  .page-body {
    padding: 28px 14px 36px;
  }
  .site-footer {
    padding: 20px 14px 16px;
  }
}
