/*
Theme Name: De Brief
Theme URI: https://debriefsr.com
Author: De Brief
Description: Clean editorial newsletter theme for De Brief with beehiiv integration
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: de-brief
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&family=DM+Sans:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #1a1a1a;
  --white: #ffffff;
  --red: #e03131;
  --gray-light: #f5f5f0;
  --gray-mid: #e8e8e3;
  --gray-dark: #222222;
  --text: #2b2b2b;
  --muted: #888;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'DM Sans', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--white); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── HEADER ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  border-bottom: 1px solid var(--gray-mid);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  border: 2px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--red); }

.btn-subscribe {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--red);
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: 4px;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  display: inline-block;
}
.btn-subscribe:hover { background: #c92a2a !important; color: var(--white) !important; }

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 80px 60px 60px;
  max-width: 700px;
  margin: 0 auto;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 16px;
}
.hero p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 32px;
  font-style: italic;
}

/* ── BEEHIIV SUBSCRIBE FORM ── */
.beehiiv-form-wrap {
  max-width: 440px;
  margin: 0 auto;
}
.beehiiv-form-wrap iframe {
  width: 100%;
  border: none;
}

/* Fallback inline form style */
.subscribe-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  border: 1.5px solid var(--gray-mid);
  border-radius: 4px;
  overflow: hidden;
}
.subscribe-form input {
  flex: 1;
  padding: 13px 16px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  border: none;
  outline: none;
  color: var(--text);
}
.subscribe-form input::placeholder { color: #bbb; }
.subscribe-form button {
  padding: 13px 22px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.subscribe-form button:hover { background: #c92a2a; }

/* ── DIVIDER ── */
.section-divider { border: none; border-top: 1px solid var(--gray-mid); margin: 0 60px; }

/* ── SECTIONS ── */
.home-section { padding: 60px; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--black);
}
.see-all {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text);
  transition: color 0.2s;
}
.see-all:hover { color: var(--red); }

/* ── NEWSLETTERS GRID ── */
.newsletters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.newsletter-featured { grid-row: span 2; padding-right: 40px; }
.newsletter-featured img { width: 100%; height: 280px; object-fit: cover; margin-bottom: 16px; }
.nl-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 6px;
  transition: color 0.2s;
}
.newsletter-featured .nl-title { font-size: 1.2rem; margin-bottom: 8px; }
.nl-excerpt { font-size: 0.875rem; color: var(--muted); margin-bottom: 6px; }
.nl-date { font-family: var(--font-ui); font-size: 0.8rem; color: var(--muted); }

.newsletter-list { border-left: 1px solid var(--gray-mid); padding-left: 40px; }
.newsletter-item { padding: 16px 0; border-bottom: 1px solid var(--gray-mid); }
.newsletter-item:first-child { padding-top: 0; }
.newsletter-item:last-child { border-bottom: none; }
.newsletter-item:hover .nl-title { color: var(--red); }

/* ── AD BANNER ── */
.ad-banner {
  margin: 0 60px;
  background: #f5c842;
  padding: 60px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: 0.05em;
}

/* ── ARTICLES ── */
.article-featured { position: relative; cursor: pointer; }
.article-featured img { width: 100%; height: 400px; object-fit: cover; }
.article-featured-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 32px 32px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: var(--white);
}
.article-meta { font-family: var(--font-ui); font-size: 0.78rem; margin-bottom: 8px; }
.article-meta .author-red { color: #ff6b6b; }
.article-featured-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}
.article-featured-overlay p { font-size: 0.9rem; opacity: 0.85; line-height: 1.5; }

.article-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--gray-mid);
}
.article-row.img-left { grid-template-columns: auto 1fr; }
.article-row.img-left .article-row-img { order: -1; }
.article-row:hover .article-row-title { color: var(--red); }
.article-row-img { width: 160px; height: 110px; object-fit: cover; }
.article-row-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.article-row-excerpt { font-size: 0.875rem; color: var(--muted); line-height: 1.5; }

/* ── PAGE TITLES ── */
.page-title-wrap { padding: 60px 60px 0; }
.page-title-wrap h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--black);
  margin-bottom: 32px;
}
.page-hero-title {
  text-align: center;
  padding: 80px 60px 60px;
}
.page-hero-title h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--black);
}

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 16px 60px 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { margin: 0 6px; }

/* ── NEWSLETTERS PAGE ── */
.newsletters-page { padding: 20px 60px 60px; }
.nl-page-featured-img { width: 100%; height: 360px; object-fit: cover; margin-bottom: 0; }
.nl-page-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-mid);
  border-top: 1px solid var(--gray-mid);
  margin-top: -1px;
}
.nl-page-item:hover .nl-page-title { color: var(--red); }
.nl-page-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
  transition: color 0.2s;
}
.nl-page-excerpt { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.nl-page-date { font-family: var(--font-ui); font-size: 0.8rem; color: var(--muted); }

/* ── ABOUT ── */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 60px;
}
.about-story h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 20px;
}
.about-story p { font-size: 0.9rem; line-height: 1.8; color: #555; }
.about-values { background: var(--gray-light); padding: 60px; }
.about-values h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 20px;
  text-align: right;
  max-width: 600px;
  margin-left: auto;
}
.about-values p { font-size: 0.9rem; line-height: 1.8; color: #555; max-width: 600px; margin-left: auto; }

/* ── CONTACT ── */
.contact-hero { text-align: center; padding: 80px 60px 60px; }
.contact-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--black);
}
.contact-form-wrap { max-width: 540px; margin: 0 auto; padding: 0 60px 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-family: var(--font-ui); font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: var(--gray-light);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-bottom-color: var(--red); }
.form-group textarea { min-height: 160px; resize: vertical; }
.btn-send {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 13px 32px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 3px;
}
.btn-send:hover { background: var(--red); }

/* ── FOOTER ── */
.site-footer {
  background: var(--gray-dark);
  color: var(--white);
  padding: 50px 60px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
}
.footer-social { display: flex; flex-direction: column; gap: 16px; }
.footer-social a { color: var(--white); opacity: 0.8; transition: opacity 0.2s; font-size: 1.2rem; }
.footer-social a:hover { opacity: 1; }
.footer-nav { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; }
.footer-nav a { font-family: var(--font-ui); font-size: 0.875rem; color: rgba(255,255,255,0.75); transition: color 0.2s; }
.footer-nav a:hover { color: var(--white); }

/* ── WORDPRESS DEFAULTS ── */
.wp-block-image img { max-width: 100%; height: auto; }
.aligncenter { text-align: center; }
.entry-content p { margin-bottom: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-header { padding: 16px 20px; }
  .site-nav { display: none; }
  .hero, .home-section { padding: 40px 20px; }
  .section-divider { margin: 0 20px; }
  .newsletters-grid { grid-template-columns: 1fr; }
  .newsletter-featured { padding-right: 0; }
  .newsletter-list { border-left: none; padding-left: 0; border-top: 1px solid var(--gray-mid); padding-top: 20px; }
  .ad-banner { margin: 0 20px; padding: 40px 20px; }
  .about-story { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px; }
  .about-values { padding: 40px 20px; }
  .contact-form-wrap { padding: 0 20px 60px; }
  .form-row { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; padding: 40px 20px; }
  .footer-social { flex-direction: row; }
  .breadcrumb, .page-title-wrap, .newsletters-page { padding-left: 20px; padding-right: 20px; }
  .article-row { grid-template-columns: 1fr; }
  .article-row-img { width: 100%; height: 200px; }
}
