/* ============================================
   Applied Identities — Site Styles
   Brand: Deep Navy / Warm Amber / Forest Green
   Typography: Inter (web) / Arial (fallback)
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --navy: #1A365D;
  --navy-light: #234A7A;
  --navy-dark: #0F2340;
  --amber: #C97B2D;
  --amber-light: #D4923F;
  --amber-muted: rgba(201, 123, 45, 0.12);
  --green: #2D5A4E;
  --green-light: #3A7466;
  --warm-white: #F7F5F2;
  --warm-gray: #E8E4DF;
  --charcoal: #2C3E50;
  --charcoal-light: #4A5568;

  /* Typography */
  --font-display: 'Inter', 'Arial', sans-serif;
  --font-body: 'Inter', 'Arial', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --max-prose: 680px;
  --header-height: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--charcoal);
  background-color: var(--warm-white);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--text-3xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-2xl);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  max-width: var(--max-prose);
}

a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-out),
              text-decoration-color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--amber);
  text-decoration-color: var(--amber);
}

strong {
  font-weight: 600;
  color: var(--navy);
}

blockquote {
  border-left: 3px solid var(--amber);
  padding-left: var(--space-xl);
  margin: var(--space-2xl) 0;
  color: var(--charcoal-light);
  font-style: italic;
  max-width: var(--max-prose);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--max-prose);
}

.section {
  padding: 30px 0;
}

.section h2,
.section h3 {
  margin-top: 0;
}

.section--navy {
  background-color: var(--navy);
  color: var(--warm-white);
  padding: 30px 0;
}

.section--gray {
  background-color: var(--warm-gray);
  padding: var(--space-sm) 0;
}

.section--navy h2,
.section--navy h3 {
  color: var(--warm-white);
}

.section--navy p {
  color: rgba(247, 245, 242, 0.85);
}

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(247, 245, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 54, 93, 0.08);
  z-index: 100;
  transition: background var(--duration-base) var(--ease-out);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.site-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-logo span {
  font-weight: 400;
  color: var(--charcoal-light);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width var(--duration-base) var(--ease-out);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

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

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform var(--duration-base) var(--ease-out);
}

/* --- Hero --- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-xl);
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: var(--navy);
}

.hero__content {
  max-width: 820px;
}

.hero__tagline {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-md);
}

.hero h1 {
  margin-bottom: var(--space-lg);
  color: var(--warm-white);
}

.hero__lead {
  font-size: var(--text-xl);
  line-height: 1.6;
  color: rgba(247, 245, 242, 0.8);
  max-width: 640px;
  margin-bottom: var(--space-2xl);
}

/* Hero background: Identity Strata */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(26, 54, 93, 0.45) 0%, transparent 70%),
    linear-gradient(180deg, rgba(26, 54, 93, 0.15) 0%, rgba(26, 54, 93, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
}

/* Hero button overrides for dark background */
.hero .btn--secondary {
  color: var(--warm-white);
  border-color: var(--warm-white);
}

.hero .btn--secondary:hover {
  background: var(--warm-white);
  color: var(--navy);
}

/* Drift animations for SVG strata */
@keyframes drift-slow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(12px, -8px) scale(1.01); }
  50%      { transform: translate(-6px, 10px) scale(0.99); }
  75%      { transform: translate(8px, 4px) scale(1.005); }
}

@keyframes drift-medium {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%      { transform: translate(-10px, 6px) rotate(0.5deg); }
  66%      { transform: translate(8px, -12px) rotate(-0.3deg); }
}

@keyframes drift-fast {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(6px, -6px); }
}

.drift-a { animation: drift-slow 28s ease-in-out infinite; }
.drift-b { animation: drift-medium 22s ease-in-out infinite; }
.drift-c { animation: drift-fast 18s ease-in-out infinite; }
.drift-d { animation: drift-slow 32s ease-in-out infinite reverse; }

@media (prefers-reduced-motion: reduce) {
  .drift-a, .drift-b, .drift-c, .drift-d {
    animation: none;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
}

.btn--primary {
  background: var(--navy);
  color: var(--warm-white);
}

.btn--primary:hover {
  background: var(--navy-light);
  color: var(--warm-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
}

.btn--secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

.btn--secondary:hover {
  background: var(--navy);
  color: var(--warm-white);
}

.btn--amber {
  background: var(--amber);
  color: white;
}

.btn--amber:hover {
  background: var(--amber-light);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 123, 45, 0.3);
}

/* --- Framework Cards --- */
.frameworks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-md);
}

.framework-card {
  padding: var(--space-lg);
  background: white;
  border: 1px solid var(--warm-gray);
  border-top: 3px solid var(--navy);
  transition: border-color var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.framework-card:hover {
  border-top-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 54, 93, 0.08);
}

.frameworks-intro {
  font-size: var(--text-lg);
  color: var(--charcoal-light);
  max-width: 720px;
}

.framework-card h3 {
  margin-top: 0;
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.framework-card p {
  font-size: var(--text-sm);
  color: var(--charcoal-light);
  line-height: 1.7;
}

/* --- Stat / Evidence Block --- */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}

.evidence-block {
  padding: var(--space-lg) 0;
  border-top: 3px solid var(--navy);
}

.evidence-block__stat {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-md);
  white-space: nowrap;
}

.evidence-block__stat span {
  font-size: var(--text-2xl);
  color: var(--amber);
  margin-left: 2px;
}

.evidence-block__text p {
  font-size: var(--text-sm);
  max-width: none;
  margin-bottom: 0;
  color: var(--charcoal-light);
  line-height: 1.7;
}

/* --- Article / Perspectives --- */
.article-list {
  display: grid;
  gap: var(--space-3xl);
}

.article-preview {
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid var(--warm-gray);
}

.article-preview__meta {
  font-size: var(--text-sm);
  color: var(--charcoal-light);
  margin-bottom: var(--space-sm);
}

.article-preview h3 {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.article-preview h3 a {
  text-decoration: none;
  color: var(--navy);
}

.article-preview h3 a:hover {
  color: var(--amber);
}

.article-preview p {
  color: var(--charcoal-light);
}

/* --- Prose content (articles, pages) --- */
.prose {
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-3xl);
}

.prose h1 {
  margin-bottom: var(--space-md);
}

.prose h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.prose h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--warm-gray);
  margin: var(--space-xl) 0;
}

.prose__meta {
  font-size: var(--text-sm);
  color: var(--charcoal-light);
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--warm-gray);
}

.prose p {
  font-size: var(--text-base);
  line-height: 1.75;
}

/* --- Footer --- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(247, 245, 242, 0.6);
  padding: var(--space-4xl) 0 var(--space-2xl);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-3xl);
}

.site-footer__brand {
  max-width: 360px;
}

.site-footer__brand .site-logo {
  color: var(--warm-white);
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.site-footer__brand p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(247, 245, 242, 0.5);
}

.site-footer__nav {
  display: flex;
  gap: var(--space-4xl);
}

.site-footer__nav-group h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-footer__nav-group a {
  display: block;
  font-size: var(--text-sm);
  color: rgba(247, 245, 242, 0.5);
  text-decoration: none;
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__nav-group a:hover {
  color: var(--amber);
}

.site-footer__bottom {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(247, 245, 242, 0.08);
  font-size: var(--text-xs);
  color: rgba(247, 245, 242, 0.35);
  display: flex;
  justify-content: space-between;
}

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

  .evidence-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .site-footer__inner {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-6xl: 2.75rem;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
  }

  .site-nav {
    display: none;
  }

  .site-nav.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--warm-white);
    padding: var(--space-xl);
    border-bottom: 1px solid var(--warm-gray);
    gap: var(--space-lg);
  }

  .nav-toggle {
    display: block;
  }

  .section {
    padding: var(--space-sm) 0;
  }
}

/* --- Utility --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-amber { color: var(--amber); }
.text-navy { color: var(--navy); }
.text-green { color: var(--green); }

/* --- Page transition fade-in --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeUp 0.6s var(--ease-out) both;
}

.animate-in--delay-1 { animation-delay: 0.1s; }
.animate-in--delay-2 { animation-delay: 0.2s; }
.animate-in--delay-3 { animation-delay: 0.3s; }
.animate-in--delay-4 { animation-delay: 0.4s; }
/* =============================================
   CONTACT FORM STYLES
   Add these to static/css/main.css
   ============================================= */

/* Screenshot styling in prose pages */
.prose img {
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(26, 54, 93, 0.12);
  border: 1px solid #E8E4DF;
  margin: 2rem 0 0.5rem;
  width: 100%;
  height: auto;
}

.prose img + em {
  display: block;
  font-size: 0.875rem;
  color: #6B7280;
  text-align: center;
  margin-bottom: 2rem;
}

/* Contact form (non-classed) */
.prose form {
  max-width: var(--max-prose);
  margin: var(--space-2xl) 0;
}

.prose form label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.375rem;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
}

.prose form label:not(:first-of-type) {
  margin-top: var(--space-lg);
}

.prose form input,
.prose form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #c4c0bb;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--charcoal);
  background: white;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.prose form input:focus,
.prose form textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.prose form textarea {
  min-height: 140px;
  resize: vertical;
}

.prose form button {
  margin-top: var(--space-xl);
  padding: 14px 32px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.prose form button:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
}

.contact-form {
  max-width: 540px;
  margin: 2rem 0;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy, #1A365D);
  margin-bottom: 0.375rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1rem;
  color: var(--charcoal, #2C3E50);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--navy, #1A365D);
  box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form button[type="submit"] {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy, #1A365D);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-form button[type="submit"]:hover {
  background: var(--charcoal, #2C3E50);
}

