/* Daily Divergence — lifestyle showcase site */
:root {
  --color-primary: #1a5f4a;
  --color-primary-dark: #134a3a;
  --color-accent: #c9a227;
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-muted: #5c5c5c;
  --color-border: #e8e6e1;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-primary);
  color: #fff;
}

.skip-link:focus {
  left: 0;
}

/* Top bar */
.top-bar {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.top-bar a {
  color: #fff;
  font-weight: 600;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
}

.logo:hover {
  text-decoration: none;
}

.logo-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  align-items: center;
}

.main-nav a {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.35rem 0;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown[open] > summary {
  color: var(--color-primary);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
  margin-top: 0.25rem;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.nav-dropdown-menu a.active {
  color: var(--color-primary);
  font-weight: 600;
  background: rgba(26, 95, 74, 0.06);
}

/* Hero */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background: #2d3a35 center / cover no-repeat;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  max-width: 640px;
}

.hero p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 520px;
}

/* Sections */
.section {
  padding: 3.5rem 1.5rem;
}

.section-alt {
  background: var(--color-surface);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--color-text);
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Article cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.article-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.article-card-image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.article-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.article-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--color-text);
}

.article-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex: 1;
}

.article-card-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Product cards (horizontal) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  gap: 1rem;
  background: var(--color-surface);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.product-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.product-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--color-text);
}

.product-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 700;
}

.stat-item span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Newsletter */
.newsletter-box {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius);
  color: #fff;
}

.newsletter-box h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.newsletter-box p {
  margin: 0 0 1.5rem;
  opacity: 0.9;
  font-size: 0.95rem;
}

.newsletter-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}

.newsletter-form button:hover {
  filter: brightness(1.05);
}

.newsletter-disclaimer {
  margin-top: 1rem;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Footer */
.site-footer {
  background: #1e2a26;
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand .logo-title {
  color: #fff;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 1rem 0;
  opacity: 0.85;
}

.footer-contact {
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-contact a {
  color: #a8d5c4;
}

.site-footer h4 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-newsletter input {
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.footer-newsletter button {
  width: 100%;
  padding: 0.6rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Article page */
.article-hero {
  min-height: 360px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.article-hero .hero-content {
  padding-bottom: 2rem;
}

.article-meta {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.article-layout {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.article-layout .lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-family: var(--font-serif);
}

.article-layout h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.4rem;
  color: var(--color-primary-dark);
}

.article-layout h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.15rem;
}

.article-layout p {
  margin: 0 0 1.25rem;
  line-height: 1.75;
}

.article-layout ul,
.article-layout ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.article-layout li {
  margin-bottom: 0.5rem;
}

.article-figure {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.article-toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.article-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.article-toc a {
  font-size: 0.95rem;
}

.related-articles {
  background: var(--color-surface);
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.pagination a {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
}

.pagination a:hover,
.pagination span.current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Static pages (About, Contact) */
.page-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: var(--color-primary-dark) center / cover no-repeat;
  color: #fff;
}

.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 95, 74, 0.92) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

.page-hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  width: 100%;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
}

.page-hero .page-hero-lead {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 520px;
  line-height: 1.6;
}

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page-content--card {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem;
  max-width: 760px;
}

.page-about-stats {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
}

.page-about-stat {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.page-about-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.page-about-stat span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.page-content h1 {
  margin: 0 0 1.5rem;
  font-size: 2rem;
}

.page-content p {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.contact-form button {
  padding: 0.75rem 2rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
}
