/* ============================================
   Morning Fire Publishing — Style System
   "Like opening a journal by firelight"
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Core Palette */
  --bg-cream:        #FBF7F0;
  --bg-warm:         #F5EDE0;
  --bg-parchment:    #F0E6D4;
  --text-primary:    #2A2017;
  --text-secondary:  #5C4A3A;
  --text-muted:      #8B7A6B;
  --amber:           #D4731A;
  --amber-dark:      #B8610F;
  --amber-light:     #E8943D;
  --gold:            #E8B84B;
  --gold-soft:       #F2D08A;
  --ember:           #C4501A;
  --sage:            #8A9A7B;
  --sage-light:      #B5C4A8;
  --warm-gray:       #D1C7BA;
  --warm-gray-light: #E8E0D5;
  --divider:         rgba(42, 32, 23, 0.08);
  --shadow-warm:     rgba(180, 140, 90, 0.12);
  --shadow-deep:     rgba(42, 32, 23, 0.10);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', Georgia, serif;
  --font-body:    'DM Sans', 'Segoe UI', sans-serif;

  /* Spacing Scale */
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle paper-grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
  opacity: 0.5;
}

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

a {
  color: var(--amber);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
a:hover {
  color: var(--amber-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}


/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }

/* Section spacing */
.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-md);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  min-width: 48px;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(212, 115, 26, 0.25);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 115, 26, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--amber);
  border: 1.5px solid var(--amber);
}
.btn-outline:hover {
  background: var(--amber);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.85rem 1.25rem;
}
.btn-ghost:hover {
  color: var(--amber);
}


/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--divider);
  transition: box-shadow 0.3s var(--ease-out);
}
.site-header.scrolled {
  box-shadow: 0 2px 20px var(--shadow-warm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--space-md);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.logo-tagline {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Desktop Nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.3s var(--ease-out);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  border-radius: 1px;
  transition: width 0.35s var(--ease-out);
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-link:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.nav-toggle:hover {
  background: var(--divider);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: rgba(251, 247, 240, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: var(--space-xl);
  flex-direction: column;
  gap: var(--space-sm);
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile .nav-link {
  font-size: 1.2rem;
  padding: var(--space-md) 0;
  min-height: 52px;
  border-bottom: 1px solid var(--divider);
}
.nav-mobile .nav-link::after {
  display: none;
}


/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-cream);
}

/* Warm radial glow */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70%;
  height: 120%;
  background: radial-gradient(
    ellipse at 70% 30%,
    rgba(232, 184, 75, 0.12) 0%,
    rgba(212, 115, 26, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: var(--space-3xl) 0;
  animation: fadeInUp 0.8s var(--ease-out) 0.15s both;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  background: rgba(212, 115, 26, 0.08);
  border: 1px solid rgba(212, 115, 26, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xl);
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--amber) 0%, var(--gold) 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: var(--space-2xl);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* Decorative floating ember */
.hero-decoration {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 340px;
  height: 340px;
  opacity: 0.08;
  display: none;
}


/* --- PRODUCTS SECTION --- */
.products {
  background: var(--bg-warm);
  position: relative;
}

/* Soft top divider */
.products::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--warm-gray), transparent);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.product-card {
  background: var(--bg-cream);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  border: 1px solid rgba(42, 32, 23, 0.05);
  box-shadow: 0 2px 12px var(--shadow-warm);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-warm);
}
.product-card:hover::before {
  transform: scaleX(1);
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}
.product-icon.icon-daily {
  background: linear-gradient(135deg, rgba(212, 115, 26, 0.1), rgba(232, 184, 75, 0.1));
}
.product-icon.icon-bigbook {
  background: linear-gradient(135deg, rgba(138, 154, 123, 0.15), rgba(181, 196, 168, 0.1));
}
.product-icon.icon-books {
  background: linear-gradient(135deg, rgba(196, 80, 26, 0.1), rgba(212, 115, 26, 0.1));
}

.product-icon svg {
  width: 28px;
  height: 28px;
}

.product-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.product-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.product-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}
.product-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.product-features li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 7px;
}

.product-link {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.product-link svg {
  transition: transform 0.3s var(--ease-out);
}
.product-link:hover svg {
  transform: translateX(4px);
}


/* --- ABOUT SECTION --- */
.about {
  position: relative;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.about-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-visual {
  width: 280px;
  height: 280px;
  position: relative;
}

/* Concentric circle decoration */
.about-visual::before,
.about-visual::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--warm-gray-light);
}
.about-visual::before {
  inset: 0;
}
.about-visual::after {
  inset: 30px;
  border-color: rgba(212, 115, 26, 0.12);
}

.about-visual-inner {
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(232, 184, 75, 0.08), rgba(212, 115, 26, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual-inner svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

.about-text h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.75;
}

.about-quote {
  position: relative;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, rgba(212, 115, 26, 0.04), rgba(232, 184, 75, 0.04));
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-xl) 0;
}

.about-quote p {
  font-style: italic;
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.about-detail {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

.about-closing {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-top: var(--space-xl);
  position: relative;
  display: inline-block;
}
.about-closing::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin-top: var(--space-sm);
  border-radius: 1px;
}


/* --- PRIVACY PROMISE SECTION --- */
.privacy-promise {
  background: var(--bg-warm);
  position: relative;
}

.promise-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.promise-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--bg-cream);
  border-radius: var(--radius-md);
  border: 1px solid rgba(42, 32, 23, 0.04);
}

.promise-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(138, 154, 123, 0.12), rgba(138, 154, 123, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
}
.promise-icon svg {
  width: 22px;
  height: 22px;
  color: var(--sage);
}

.promise-card h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.promise-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* --- CTA SECTION --- */
.cta-section {
  position: relative;
  text-align: center;
  padding: var(--space-4xl) 0;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--warm-gray), transparent);
}

.cta-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.cta-section p {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto var(--space-xl);
  font-size: 1.05rem;
  line-height: 1.7;
}


/* --- FOOTER --- */
.site-footer {
  background: var(--bg-parchment);
  border-top: 1px solid var(--divider);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

.footer-brand {
  max-width: 320px;
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: var(--space-md);
}

.footer-nav h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.3s;
}
.footer-links a:hover {
  color: var(--amber);
}

.footer-contact-email {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
}


/* --- LEGAL PAGES (Privacy, Terms) --- */
.legal-page {
  padding: var(--space-3xl) 0 var(--space-4xl);
}

.legal-page .page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.legal-page .page-updated {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: var(--space-3xl);
}

.legal-content {
  max-width: 760px;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--divider);
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.75;
}

.legal-content ul {
  list-style: none;
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
}

.legal-content ul li {
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  padding-left: var(--space-md);
  position: relative;
  line-height: 1.7;
}
.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.legal-content a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(212, 115, 26, 0.3);
  text-underline-offset: 3px;
}
.legal-content a:hover {
  text-decoration-color: var(--amber);
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}


/* --- Decorative Divider --- */
.divider-ornament {
  text-align: center;
  padding: var(--space-lg) 0;
}
.divider-ornament svg {
  opacity: 0.2;
}


/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gentlePulse {
  0%, 100% { opacity: 0.08; }
  50%      { opacity: 0.14; }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet (640px+) */
@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid .product-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  .promise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop (960px+) */
@media (min-width: 960px) {
  .nav-desktop {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .products-grid .product-card:last-child {
    grid-column: auto;
    max-width: none;
    margin: 0;
  }

  .about-content {
    grid-template-columns: 300px 1fr;
    gap: var(--space-3xl);
    align-items: center;
  }

  .hero-decoration {
    display: block;
  }

  .hero {
    min-height: 90vh;
  }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
  .container {
    padding: 0 var(--space-2xl);
  }

  .hero-title {
    font-size: 3.75rem;
  }
}
