/*
Theme Name: Harrington Heritage
Theme URI: https://dgtal-mind.example.com/
Author: OpenAI for DG-Tal Mind
Description: Custom WordPress theme converted from the ATOMS AI family heritage concept. Includes a public showcase and a private members portal shell.
Version: 1.0.0
Text Domain: harrington-heritage
*/

:root {
  --hh-primary: #1b2a4a;
  --hh-accent: #c9a96e;
  --hh-bg: #fdfbf7;
  --hh-sand: #f5f0e8;
  --hh-border: #e8e0d0;
  --hh-text: #24314d;
  --hh-muted: #6b7280;
  --hh-white: #ffffff;
  --hh-radius: 18px;
  --hh-shadow: 0 12px 34px rgba(27, 42, 74, 0.08);
  --hh-shadow-soft: 0 8px 24px rgba(27, 42, 74, 0.06);
  --hh-container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--hh-text);
  background: var(--hh-bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(calc(100% - 32px), var(--hh-container)); margin: 0 auto; }
.hh-section { padding: 72px 0; }
.hh-section--soft { background: var(--hh-sand); }
.hh-grid { display: grid; gap: 24px; }
.hh-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hh-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hh-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hh-card {
  background: #fff;
  border: 1px solid var(--hh-border);
  border-radius: var(--hh-radius);
  box-shadow: var(--hh-shadow-soft);
  overflow: hidden;
}
.hh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hh-accent);
}
.hh-pill:before {
  content: '';
  width: 42px;
  height: 1px;
  background: var(--hh-accent);
}
.hh-title, h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.1;
  color: var(--hh-primary);
}
.hh-title { font-size: clamp(2rem, 4vw, 4.8rem); margin: 0 0 18px; }
.hh-subtitle { font-size: clamp(1.75rem, 2.8vw, 3rem); margin: 0 0 12px; }
.hh-text-muted { color: var(--hh-muted); }
.hh-button,
.wp-block-button__link,
button,
input[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: .25s ease;
}
.hh-button--primary,
input[type='submit'] {
  background: var(--hh-accent);
  color: var(--hh-primary);
}
.hh-button--primary:hover,
input[type='submit']:hover { filter: brightness(.96); transform: translateY(-1px); }
.hh-button--ghost {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
.hh-button--ghost:hover { border-color: var(--hh-accent); color: var(--hh-accent); }
.hh-button--outline {
  background: transparent;
  color: var(--hh-primary);
  border-color: var(--hh-accent);
}
.hh-button--outline:hover { background: rgba(201,169,110,.08); }

.hh-header {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(27,42,74,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,169,110,.18);
}
.hh-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hh-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.hh-brand__crest {
  width: 34px; height: 34px; border: 2px solid var(--hh-accent);
  border-radius: 10px 10px 14px 14px / 10px 10px 18px 18px; display: inline-block;
  position: relative;
}
.hh-brand__crest:after {
  content:''; position:absolute; inset: 5px 8px auto 8px; height: 10px; border:1px solid rgba(201,169,110,.5); border-radius:8px;
}
.hh-brand__name { font-size: 1.5rem; font-weight: 700; font-family: 'Playfair Display', Georgia, serif; }
.hh-nav { display: flex; align-items: center; gap: 8px; }
.hh-nav a {
  color: rgba(255,255,255,.8);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .95rem;
}
.hh-nav a:hover, .hh-nav a.current-menu-item, .hh-nav a.current_page_item { color: var(--hh-accent); background: rgba(255,255,255,.06); }
.hh-header__actions { display: flex; align-items: center; gap: 12px; }
.hh-mobile-toggle { display:none; }

.hh-hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hh-hero__media,
.hh-page-hero__media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hh-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(27,42,74,.92) 0%, rgba(27,42,74,.72) 45%, rgba(27,42,74,.25) 100%);
}
.hh-hero__content { position: relative; z-index: 1; max-width: 720px; padding: 96px 0; }
.hh-hero__lead { max-width: 540px; font-size: 1.2rem; color: rgba(255,255,255,.86); }
.hh-hero__actions { display:flex; flex-wrap:wrap; gap:16px; margin-top:30px; }
.hh-highlight { color: var(--hh-accent); }

.hh-feature-card { text-align: center; padding: 28px 22px; }
.hh-feature-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px;
  display: grid; place-items: center; background: rgba(201,169,110,.12); color: var(--hh-accent); font-size: 24px;
}
.hh-media-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hh-media-card__body, .hh-card__body { padding: 18px; }
.hh-badge {
  display:inline-block; padding: 6px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: rgba(201,169,110,.12); color: var(--hh-accent);
}
.hh-story-image-wrap { position: relative; }
.hh-story-badge {
  position:absolute; bottom: 16px; left: 16px; background: var(--hh-primary); color:#fff; border-radius: 12px; padding: 16px 18px;
}
.hh-story-badge strong { display:block; font-size: 1.8rem; color: var(--hh-accent); }

.hh-cta-band { background: var(--hh-primary); color: rgba(255,255,255,.8); text-align: center; }
.hh-cta-band h2 { color: #fff; margin-bottom: 12px; }
.hh-cta-band .hh-brand__crest { margin: 0 auto 18px; display:block; }

.hh-footer { background: var(--hh-primary); color: rgba(255,255,255,.72); padding: 64px 0 20px; }
.hh-footer__grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.hh-footer h4 { color: var(--hh-accent); font-size: 1rem; margin: 0 0 12px; }
.hh-footer ul { list-style:none; padding:0; margin:0; }
.hh-footer li { margin: 0 0 8px; }
.hh-footer__meta { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); text-align:center; font-size: .95rem; }

.hh-form-wrap { max-width: 860px; margin: 0 auto; }
.hh-form-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:18px; }
.hh-form-field label { display:block; font-weight:600; margin-bottom:8px; }
.hh-form-field input, .hh-form-field textarea, .hh-form-field select {
  width: 100%; padding: 14px 15px; border-radius: 12px; border:1px solid var(--hh-border); background:#fff; font: inherit;
}
.hh-form-field textarea { min-height: 140px; resize: vertical; }
.hh-form-field--full { grid-column: 1 / -1; }
.hh-notice { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; }
.hh-notice--success { background: #ecfdf3; color: #065f46; border:1px solid #bbf7d0; }
.hh-notice--error { background: #fef2f2; color: #991b1b; border:1px solid #fecaca; }

.hh-portal {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 72px);
  background: var(--hh-sand);
}
.hh-portal__sidebar { background: var(--hh-primary); color: rgba(255,255,255,.84); padding: 28px 20px; }
.hh-portal__sidebar nav a { display:flex; padding: 12px 14px; border-radius: 12px; margin-bottom: 6px; }
.hh-portal__sidebar nav a:hover, .hh-portal__sidebar nav a.is-active { background: rgba(255,255,255,.08); color: var(--hh-accent); }
.hh-portal__main { padding: 28px; }
.hh-stats { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:18px; margin-bottom: 26px; }
.hh-stat-card { padding: 20px; }
.hh-stat-card strong { display:block; font-size: 1.8rem; color: var(--hh-accent); }
.hh-tree-generation { margin-bottom: 26px; }
.hh-tree-generation h3 { margin-bottom: 12px; }
.hh-tree-nodes { display:flex; flex-wrap:wrap; gap:16px; }
.hh-tree-node { width: min(100%, 250px); padding: 16px; }
.hh-tree-node small { display:block; color: var(--hh-muted); }
.hh-tree-node p { margin: 8px 0 0; font-size: .95rem; }
.hh-protected-box {
  max-width: 680px; margin: 60px auto; padding: 36px; text-align:center;
}
.hh-protected-box .hh-brand__crest { margin: 0 auto 16px; display:block; }
.hh-section-header { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom: 26px; }

.hh-list { display:grid; gap:16px; }
.hh-list-item { padding: 18px; }
.hh-list-meta { color: var(--hh-muted); font-size: .92rem; }
.hh-kicker { color: var(--hh-accent); text-transform: uppercase; letter-spacing:.15em; font-size: .8rem; font-weight: 700; }

@media (max-width: 1024px) {
  .hh-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hh-grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hh-grid-2, .hh-footer__grid, .hh-portal, .hh-stats { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hh-nav { display:none; }
  .hh-mobile-toggle { display:inline-flex; }
  .hh-header__actions .hh-button--ghost { display:none; }
  .hh-title { font-size: 3rem; }
  .hh-section { padding: 56px 0; }
  .hh-grid-4, .hh-grid-3, .hh-form-grid { grid-template-columns: 1fr; }
  .hh-portal__main { padding: 20px; }
}
