/*
Theme Name: Reformata
Theme URI: https://example.org/reformata
Author: ChatGPT
Author URI: https://chat.openai.com/
Description: A modern, historically anchored WordPress theme for Reformed churches—optimized for sermons, events, liturgy, and confessional identity.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reformata
Tags: blog, church, custom-colors, custom-logo, custom-menu, editor-style, featured-images, one-column, two-columns, grid-layout, block-patterns
*/

/* CSS Variables for Branding (overridable via Customizer) */
:root {
  --reformata-bg: #0c0f14;          /* deep charcoal/navy */
  --reformata-surface: #121720;
  --reformata-text: #f5f5f5;
  --reformata-muted: #c8c8c8;
  --reformata-accent: #9b1c1c;      /* deep burgundy */
  --reformata-gold: #c8a96a;        /* parchment gold */
  --reformata-link: #d2b56d;
  --reformata-serif: "Georgia", "Garamond", "Times New Roman", serif;
  --reformata-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

/* Global Reset-ish */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--reformata-text);
  background: linear-gradient(180deg, var(--reformata-bg), #0a0d12 600px);
  font-family: var(--reformata-sans);
  line-height: 1.6;
  font-size: 18px;
}

/* Typography */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--reformata-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 1.2em 0 0.5em;
  color: #ffffff;
}
h1 { font-size: clamp(2rem, 3.5vw, 3rem); }
h2 { font-size: clamp(1.7rem, 2.5vw, 2.2rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p, li { color: var(--reformata-muted); }

a {
  color: var(--reformata-link);
  text-decoration: none;
}
a:hover, a:focus { text-decoration: underline; }

/* Layout */
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12,15,20, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(200,169,106,0.2);
}
.site-branding { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0; }
.site-title { font-family: var(--reformata-serif); font-size: 1.4rem; margin: 0; }
.site-description { color: var(--reformata-gold); font-size: 0.95rem; margin: 0; }

.nav-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}
.primary-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
}
.primary-nav a:hover { background: rgba(255,255,255,0.06); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .primary-nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    background: var(--reformata-surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
  }
  .primary-nav.open ul { display: flex; }
  .primary-nav a { border-bottom: 1px solid rgba(255,255,255,0.06); }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(2rem, 6vw, 5rem) 0;
  background: radial-gradient(60% 60% at 50% 0%, rgba(200,169,106,0.1), transparent),
              linear-gradient(180deg, rgba(27,24,20,0.3), rgba(0,0,0,0));
  border-bottom: 1px solid rgba(200,169,106,0.18);
}
.hero .kicker {
  color: var(--reformata-gold);
  letter-spacing: .12em;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.hero .title {
  font-family: var(--reformata-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: .3rem 0 .6rem;
}
.hero .subtitle { max-width: 70ch; }

/* Cards */
.card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.2rem;
  transition: transform .12s ease, background .2s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.03); }
.card .meta { color: #9bb0c9; font-size: 0.92rem; }

.grid {
  display: grid;
  gap: 1rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 700px)  { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #0b0e13;
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 0;
  color: var(--reformata-muted);
  font-size: .95rem;
}
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* Utilities */
.btn {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
}
.btn-accent { background: var(--reformata-accent); border-color: var(--reformata-accent); }
.btn-gold   { background: var(--reformata-gold); color: #141414; border: none; }

.badge { padding: .2rem .5rem; border-radius: 6px; background: rgba(200,169,106,.2); color: #e8d7a7; font-size: .8rem; }

/* Gutenberg content width */
.wp-block { max-width: 1120px; }
.alignwide { max-width: 1280px; }
.alignfull { max-width: 100%; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid rgba(255,255,255,0.08); padding: .7rem .5rem; text-align: left; }
thead th { color: #fff; border-bottom-color: rgba(255,255,255,0.2); }
