/* ============================================================
   AAT Studios — Ghost 6.x Custom Theme
   Noir + gold + textured. Matches the ratified brand kit exactly.
   Tagline: Re-Memeber Your Self
   Newsletter: The Reminder
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@400;700&display=swap');

/* ============================================================
   CSS Custom Properties (from design-tokens.json + brand sheets)
   ============================================================ */
:root {
  /* Gold palette */
  --gold:           #D4AF37;
  --gold-soft:      #F3C969;
  --gold-highlight: #F2C14E;
  --gold-deep:      #8E651D;

  /* Backgrounds */
  --black-deepest:  #050706;
  --black-core:     #080808;
  --midnight:       #0F1B2E;
  --bronze:         #5A2A1A;

  /* Text */
  --copy:    #E9D5A7;
  --muted:   #C39B55;

  /* Accent */
  --red:  #B51620;
  --cyan: #00D4F3;

  /* Borders / lines */
  --line:       rgba(212, 175, 55, 0.46);
  --line-soft:  rgba(212, 175, 55, 0.22);

  /* Typography */
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body:    'Montserrat', 'Avenir Next', 'Segoe UI', Arial, sans-serif;

  /* Ghost custom font support — apply user-selected fonts when configured */
  --gh-font-heading: var(--font-display);
  --gh-font-body:    var(--font-body);
}

/* ============================================================
   Reset / Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--black-deepest);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(209, 155, 61, 0.13), transparent 34rem),
    radial-gradient(circle at 80% 18%, rgba(35, 64, 72, 0.22), transparent 31rem),
    var(--black-deepest);
  color: var(--copy);
  font-family: var(--gh-font-body, var(--font-body));
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gh-font-heading, var(--font-display));
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--gold-highlight);
}

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

/* ============================================================
   Page shell
   ============================================================ */
.page-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-header .logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-family: var(--gh-font-heading, var(--font-display));
  font-size: 1.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
}

.site-header .logo-link:hover {
  color: var(--gold-highlight);
}

.site-header .logo-mark {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.36));
}

/* Navigation */
.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--gold-highlight);
}

/* ============================================================
   Main content
   ============================================================ */
.site-main {
  padding: 48px 0;
}

/* ============================================================
   Hero / Tagline
   ============================================================ */
.hero {
  text-align: center;
  padding: 64px 0 48px;
}

.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  color: var(--gold);
  letter-spacing: 0.18em;
  line-height: 1.1;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow:
    0 2px 0 rgba(42, 25, 4, 0.8),
    0 12px 28px rgba(0, 0, 0, 0.65);
  margin: 0 0 16px;
}

.hero .sub {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.12em;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Gold rule divider */
.rule {
  position: relative;
  width: min(800px, 80vw);
  height: 1px;
  margin: 32px auto;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ============================================================
   Newsletter signup — The Reminder
   ============================================================ */
.newsletter {
  max-width: 540px;
  margin: 0 auto;
  padding: 40px 0;
  text-align: center;
}

.newsletter h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.newsletter p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 24px;
  line-height: 1.5;
}

.newsletter form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter input[type="email"] {
  flex: 1 1 260px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--copy);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter input[type="email"]:focus {
  border-color: var(--gold);
}

.newsletter input[type="email"]::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

/* Button — matching digital asset system .btn style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border: 1px solid rgba(212, 175, 55, 0.82);
  border-radius: 3px;
  color: var(--gold-soft);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.11), rgba(0, 0, 0, 0.12));
  box-shadow:
    inset 0 0 17px rgba(212, 175, 55, 0.10),
    0 0 0 1px rgba(0, 0, 0, 0.72);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn:hover {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.36), rgba(98, 56, 18, 0.36));
  box-shadow:
    0 0 22px rgba(212, 175, 55, 0.36),
    inset 0 0 18px rgba(255, 231, 148, 0.11);
  color: var(--gold-highlight);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer .tagline {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.site-footer .copyright {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin: 0;
}

/* ============================================================
   Post listing (index.hbs)
   ============================================================ */
.post-feed {
  display: grid;
  gap: 32px;
  padding: 32px 0;
}

.post-card {
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(0, 5, 7, 0.24);
  transition: border-color 0.25s ease;
}

.post-card:hover {
  border-color: var(--line);
}

.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 0 0 8px;
}

.post-card h2 a {
  color: inherit;
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--gold-highlight);
}

.post-card .post-meta {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.post-card .post-excerpt {
  color: var(--copy);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   Single post
   ============================================================ */
.post-full {
  max-width: 740px;
  margin: 0 auto;
}

.post-full h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold);
  letter-spacing: 0.14em;
  line-height: 1.15;
  margin: 0 0 16px;
}

.post-full .post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 24px;
}

.post-full .post-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-full .post-content p {
  margin: 0 0 1.2em;
}

/* ============================================================
   Home page featured section
   ============================================================ */
.home-featured {
  padding: 0 0 48px;
}

.home-featured-title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

/* ============================================================
   Reading time
   ============================================================ */
.reading-time {
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.reading-time::before {
  content: "· ";
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0 48px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(0, 5, 7, 0.24);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination a:hover {
  border-color: var(--line);
  background: rgba(212, 175, 55, 0.08);
}

.pagination .page-number {
  color: var(--muted);
  border: none;
  background: none;
  min-width: auto;
}

/* ============================================================
   Archive headers (tag.hbs, author.hbs)
   ============================================================ */
.archive-header {
  text-align: center;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 32px;
}

.archive-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 12px;
}

.archive-description {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

/* Author profile */
.author-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.author-profile .author-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--line);
  object-fit: cover;
}

.author-profile .archive-title {
  margin-bottom: 4px;
}

/* ============================================================
   Author box (post.hbs)
   ============================================================ */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 40px 0;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(0, 5, 7, 0.24);
}

.author-box .author-image {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.author-box .author-info h4 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.author-box .author-info h4 a {
  color: inherit;
  text-decoration: none;
}

.author-box .author-info p {
  color: var(--copy);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   Error pages
   ============================================================ */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
  min-height: 50vh;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--gold);
  letter-spacing: 0.12em;
  text-shadow:
    0 2px 0 rgba(42, 25, 4, 0.8),
    0 12px 28px rgba(0, 0, 0, 0.65);
  margin: 0 0 16px;
  line-height: 1;
}

.error-message {
  color: var(--muted);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  margin: 0 0 32px;
}

/* ============================================================
   Skip-to-content link (accessibility)
   ============================================================ */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--black-deepest);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-to-content:focus {
  left: 16px;
}

/* ============================================================
   Print styles
   ============================================================ */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-header,
  .site-footer,
  .author-box,
  .ghost-head,
  .ghost-foot,
  .skip-to-content,
  .pagination,
  .newsletter,
  .btn {
    display: none !important;
  }

  .post-full {
    max-width: 100%;
  }

  .post-full h1 {
    color: #000;
    font-size: 24pt;
    text-shadow: none;
  }

  .post-content {
    font-size: 11pt;
    line-height: 1.6;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ============================================================
   Misc / Utilities
   ============================================================ */
.ghost-head,
.ghost-foot {
  display: none;
}

/* Ghost editor card widths (required by GScan) */
.kg-width-wide {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.kg-width-full {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Ghost editor card styles */
.kg-gallery-card,
.kg-embed-card,
.kg-image-card {
  margin: 2rem 0;
}

.kg-gallery-card figcaption,
.kg-embed-card figcaption,
.kg-image-card figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  margin-top: 8px;
}

/* ============================================================
   Static page styles
   ============================================================ */

/* Links page — gold link list */
.links-intro {
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.links-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.links-list a {
  display: block;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: all 0.25s ease;
}

.links-list a:hover {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-highlight);
  border-color: var(--gold-highlight);
}

.links-newsletter {
  text-align: center;
  padding: 32px 0;
}

.links-newsletter p {
  color: var(--copy);
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Static page headings */
.page-transparency h2,
.page-privacy h2,
.page-colophon h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 32px 0 12px;
}

.page-privacy ul {
  color: var(--copy);
  padding-left: 24px;
  line-height: 1.75;
}

/* Responsive */
@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .site-nav {
    justify-content: center;
  }
  .newsletter form {
    flex-direction: column;
    align-items: stretch;
  }
  .newsletter input[type="email"] {
    flex: 1 1 auto;
  }
}
