/*
Theme Name:     Date Today
Theme URI:      https://datetoday.venisonmagazine.com
Description:    Standalone theme for datetoday.venisonmagazine.com — pairs with the Date Today Tools plugin to power 742 dynamically-updating calendar and date-calculator pages. Modern Islamic-influenced almanac design with emerald, sand, and gold palette. Native-script rendering for 25 calendar systems.
Author:         Venison Magazine
Author URI:     https://venisonmagazine.com
Version:        1.0.0
Requires at least: 6.0
Requires PHP:   7.4
License:        GPL v2 or later
License URI:    https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    datetoday
Tags:           one-column, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- DESIGN TOKENS ---------- */
:root {
  --sand-50: #FAF6EE;
  --sand-100: #F2EADB;
  --sand-200: #E5D8BF;
  --sand-300: #D4C195;
  --ink: #0F1A14;
  --ink-soft: #1F2D26;
  --mid: #5C6B62;
  --line: #2A3A33;
  --emerald: #0B4D3F;
  --emerald-deep: #073329;
  --emerald-light: #1A6E5C;
  --gold: #C8A04E;
  --gold-deep: #9C7A2F;
  --rust: #A8472B;
  --paper: #FFFCF5;
  --shadow: 0 1px 0 rgba(15,26,20,0.06), 0 8px 24px -10px rgba(15,26,20,0.18);
}

/* ---------- BASE OVERRIDES ---------- */
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--sand-50);
  color: var(--ink);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  letter-spacing: -0.01em;
}

a { color: var(--emerald); }
a:hover { color: var(--emerald-deep); }

/* ---------- SITE WRAPPER ---------- */
.site {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- HEADER ---------- */
.site-header {
  background: rgba(250, 246, 238, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sand-200);
  position: sticky;
  top: 0;
  z-index: 50;
}
.dtt-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.dtt-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.dtt-brand-mark {
  width: 32px; height: 32px;
  background: var(--emerald);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: inset 0 0 0 2px var(--gold);
}
.dtt-brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.dtt-brand-name em {
  font-style: italic;
  color: var(--emerald);
  font-weight: 500;
}
.dtt-nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0; padding: 0;
}
.dtt-nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
}
.dtt-nav-links a:hover { color: var(--emerald); }

/* ---------- BREADCRUMBS ---------- */
.dtt-breadcrumbs {
  background: var(--sand-50);
  border-bottom: 1px solid var(--sand-200);
  padding: 0.7rem 1.5rem;
}
.dtt-breadcrumbs-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--mid);
  letter-spacing: 0.04em;
}
.dtt-breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}
.dtt-breadcrumbs a:hover { color: var(--emerald); }
.dtt-breadcrumbs-sep {
  margin: 0 0.5rem;
  color: var(--sand-300);
}

/* ---------- CONTENT WRAPPER ---------- */
.dtt-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ---------- AUTHOR BOX ---------- */
.dtt-author-box {
  display: flex;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--sand-200);
  border-radius: 12px;
  margin: 3rem 0 2rem;
}
.dtt-author-avatar {
  width: 64px; height: 64px;
  background: var(--emerald);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.dtt-author-info { flex: 1; }
.dtt-author-name {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.dtt-author-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.dtt-author-bio {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--ink);
  color: var(--sand-100);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}
.dtt-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.dtt-footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.dtt-footer-about {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--sand-200);
}
.dtt-footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.dtt-footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
}
.dtt-footer-col li { margin-bottom: 0.4rem; }
.dtt-footer-col a {
  color: var(--sand-200);
  text-decoration: none;
  font-size: 0.88rem;
}
.dtt-footer-col a:hover { color: var(--gold); }

.dtt-footer-legal {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(229, 216, 191, 0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--mid);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 720px) {
  .dtt-footer-cols { grid-template-columns: 1fr; }
  .dtt-nav-links { display: none; }
}

/* ---------- THEME-LEVEL ADDITIONS (standalone) ---------- */

/* Body reset to suit standalone delivery */
* { box-sizing: border-box; }
body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }

/* Site wrapper */
.site-header,
.dtt-main,
.site-footer {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header clock in nav */
.dtt-header-clock { margin-left: 1rem; }

/* Search form */
.dtt-search-form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  max-width: 540px;
  margin: 1.5rem 0;
}
.dtt-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.dtt-search-field {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--sand-200);
  border-radius: 8px;
  background: var(--paper);
  font: inherit;
  color: var(--ink);
}
.dtt-search-field:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(11,77,63,.1);
}
.dtt-search-submit {
  padding: 0.7rem 1.4rem;
  background: var(--emerald);
  color: var(--sand-50);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.dtt-search-submit:hover { background: var(--emerald-deep); }

/* 404 */
.dtt-404 {
  text-align: center;
  padding: 3rem 1rem;
}
.dtt-404-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.dtt-404-suggestions {
  list-style: none;
  padding: 0;
  margin: 1.5rem auto;
  max-width: 400px;
}
.dtt-404-suggestions li { margin-bottom: 0.5rem; }
.dtt-404-suggestions a {
  display: block;
  padding: 0.8rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--sand-200);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
.dtt-404-suggestions a:hover {
  border-color: var(--emerald);
  background: var(--sand-50);
}
.dtt-404 .dtt-search-form { margin: 1.5rem auto; }

/* Archive / search results */
.dtt-archive-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sand-200);
}
.dtt-archive-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--ink);
}
.dtt-search-results { display: grid; gap: 1.5rem; }
.dtt-search-result {
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--sand-200);
  border-radius: 12px;
}
.dtt-search-result-title { font-family: 'Fraunces', serif; margin-bottom: 0.6rem; }
.dtt-search-result-title a { color: var(--ink); text-decoration: none; }
.dtt-search-result-title a:hover { color: var(--emerald); }

/* Default post / page */
.dtt-post, .dtt-single, .dtt-page-article {
  background: var(--paper);
  border: 1px solid var(--sand-200);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.dtt-post-title, .dtt-single-title, .dtt-page-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.dtt-single-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--mid);
  margin-bottom: 1.5rem;
}
.dtt-single-sep { margin: 0 0.4rem; color: var(--sand-300); }

/* DTT pages bypass article styling — shortcodes handle their own */
.dtt-page-article {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

/* Comments */
.dtt-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--sand-200);
}
.dtt-comments-title {
  font-family: 'Fraunces', serif;
  margin-bottom: 1.5rem;
}
.dtt-comments-list {
  list-style: none;
  padding: 0;
}

/* Posts navigation */
.posts-navigation, .post-navigation {
  margin: 2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.posts-navigation a, .post-navigation a {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--sand-200);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
.posts-navigation a:hover, .post-navigation a:hover {
  border-color: var(--emerald);
  background: var(--sand-50);
}

/* Footer widgets */
.dtt-footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(229, 216, 191, 0.15);
  margin-top: 1.5rem;
}
.dtt-footer-widget { color: var(--sand-200); }
.dtt-footer-widget h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

/* Mobile */
@media (max-width: 720px) {
  .dtt-header { flex-wrap: wrap; padding: 0.7rem 1rem; }
  .dtt-header-clock { display: none; }
  .dtt-main { padding: 1.5rem 1rem 3rem; }
  .dtt-post, .dtt-single { padding: 1.3rem; }
}
