/* =============================================
   Dadvice — Modern editorial magazine
   Travel + parenting for libertarian, secular readers
   ============================================= */

/* --- Reset + base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1a1a1a;
  background: #faf8f5;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: 3.2rem; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 2.2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.4rem; font-weight: 500; margin-bottom: 0.8rem; }
h4 { font-size: 1.1rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.5; margin-bottom: 0.5rem; }

/* --- Layout containers --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
}
.logo span { color: #c0392b; }
nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
nav a {
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity 0.2s;
}
nav a:hover { opacity: 1; }
.nav-cta {
  background: #1a1a1a;
  color: #faf8f5 !important;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  opacity: 1 !important;
  transition: background 0.2s;
}
.nav-cta:hover { background: #333; }

/* --- Hero --- */
.hero {
  padding: 5rem 0 4rem;
  background: #1a1a1a;
  color: #faf8f5;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(192,57,43,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(41,128,185,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero .subtitle {
  font-size: 1.15rem;
  opacity: 0.75;
  line-height: 1.6;
  max-width: 32rem;
}
.hero .meta-line {
  margin-top: 2rem;
  font-size: 0.85rem;
  opacity: 0.5;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.hero .meta-line span { display: flex; align-items: center; gap: 0.4rem; }
.hero-featured {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 2rem;
}
.hero-featured .tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c0392b;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.hero-featured h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.hero-featured p { opacity: 0.7; font-size: 0.95rem; line-height: 1.6; }
.hero-featured .read-more {
  display: inline-block;
  margin-top: 1rem;
  color: #c0392b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Section styling --- */
.section {
  padding: 5rem 0;
}
.section-alt { background: #f0ede8; }
.section-dark {
  background: #1a1a1a;
  color: #faf8f5;
}
.section-dark h4 { opacity: 0.4; }

/* --- Featured posts grid --- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.post-card {
  border-bottom: 2px solid rgba(0,0,0,0.06);
  padding-bottom: 1.5rem;
}
.post-card .tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c0392b;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}
.post-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.post-card p {
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.5;
}
.post-card .date {
  font-size: 0.8rem;
  opacity: 0.4;
  margin-top: 0.6rem;
}

/* --- Horizontal scroll band (travel) --- */
.band-section {
  padding: 4rem 0;
  overflow: hidden;
}
.band-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 1.5rem;
}
.band-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 0.5rem 0 1rem;
  scroll-snap-type: x mandatory;
}
.band-wrap::-webkit-scrollbar { display: none; }
.band-wrap:active { cursor: grabbing; }
.band-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding: 0 2rem;
}
.band-card {
  scroll-snap-align: start;
  flex: 0 0 320px;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  transition: background 0.2s, border-color 0.2s;
}
.band-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}
.band-card .tag {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c0392b;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.band-card strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.band-card p {
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.5;
}

/* --- Life skills list --- */
.skills-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.5rem;
}
.skill-item {
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.skill-item strong {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.3rem;
}
.skill-item p {
  font-size: 0.9rem;
  opacity: 0.65;
  line-height: 1.5;
}
.skill-item .time {
  font-size: 0.8rem;
  opacity: 0.4;
  margin-top: 0.4rem;
}

/* --- About section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.85;
}
.about-text p:last-child { margin-bottom: 0; }
.about-sidebar {
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
  padding: 2rem;
}
.about-sidebar h4 { margin-bottom: 1rem; }
.about-sidebar ul { list-style: none; }
.about-sidebar li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.about-sidebar li:last-child { border-bottom: none; }
.about-sidebar .stat { font-weight: 600; font-family: 'Fraunces', serif; font-size: 1.1rem; }

/* --- Contact form --- */
.contact-wrap {
  max-width: 560px;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  opacity: 0.7;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c0392b;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.btn {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: #a93226; }
.form-status { font-size: 0.85rem; opacity: 0.7; margin-top: 0.5rem; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 2rem 0;
  font-size: 0.85rem;
  opacity: 0.5;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.attribution a { color: inherit; }

/* --- Scroll-driven line reveal --- */
@keyframes riseIn {
  from { opacity: 0; translate: 0 24px; }
  to   { opacity: 1; translate: 0 0; }
}
.section p, .section h2, .section h3, .section h4,
.post-card, .skill-item, .band-card, .about-text p, .about-sidebar li {
  animation: riseIn linear both;
  animation-timeline: view();
  animation-range: entry 0% cover 35%;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .section p, .section h2, .section h3, .section h4,
  .post-card, .skill-item, .band-card, .about-text p, .about-sidebar li {
    animation: none;
    opacity: 1;
    translate: 0 0;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .post-grid { grid-template-columns: 1fr; }
  .skills-list { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  nav { gap: 1rem; }
  nav a { font-size: 0.8rem; }
  .container { padding: 0 1.25rem; }
  .header-inner { padding: 0.8rem 1.25rem; }
  .band-track { padding: 0 1.25rem; }
  .band-card { flex: 0 0 260px; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 3rem 0; }
  .hero-featured { padding: 1.5rem; }
}
