/* style.css — AethosTrust Custom Theme */

/* ═══════════════════════════════════════
   DESIGN TOKENS — AethosTrust Navy/Gold
   ═══════════════════════════════════════ */

:root {
  /* Type Scale (fluid) */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Font families */
  --font-display: 'Libre Baskerville', 'Georgia', serif;
  --font-body: 'Outfit', 'Helvetica Neue', sans-serif;

  /* AethosTrust — Premium Navy & Gold */
  --color-bg:           #0e1420;
  --color-surface:      #141c2e;
  --color-surface-2:    #1c2640;
  --color-surface-3:    #0b1019;
  --color-border:       #232d45;
  --color-border-lit:   #2e3d5e;
  --color-divider:      #1a2238;

  /* Text */
  --color-text:         #d8dce8;
  --color-text-muted:   #7a8299;
  --color-text-faint:   #8a93ab;
  --color-text-inverse: #0e1420;
  --color-white:        #f0f2f8;

  /* Gold Accent */
  --color-gold:         #c8a96e;
  --color-gold-light:   #e8d5a8;
  --color-gold-dim:     rgba(200, 169, 110, 0.12);
  --color-gold-glow:    rgba(200, 169, 110, 0.08);

  /* Semantic */
  --color-green:        #4caf7d;
  --color-green-dim:    rgba(76, 175, 125, 0.12);
  --color-red:          #e05c5c;
  --color-blue:         #3b7ff5;
  --color-blue-dim:     rgba(59, 127, 245, 0.1);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}


/* ═══════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════ */

/* — Grain texture overlay — */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* — Ambient gradient — */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(200,169,110,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(200,169,110,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(14,20,32,0.5) 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.page { position: relative; z-index: 1; }


/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) clamp(var(--space-6), 4vw, var(--space-12));
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(16px);
  background: rgba(14, 20, 32, 0.88);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  color: var(--color-white);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav-logo span { color: var(--color-gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-4), 3vw, var(--space-8));
}

.nav-link {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
}
.nav-link:hover { color: var(--color-gold); }
.nav-link.active { color: var(--color-gold); }

.nav-cta {
  padding: var(--space-2) var(--space-5);
  border: 1px solid rgba(200, 169, 110, 0.4);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
}
.nav-cta:hover {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--color-text-muted);
  transition: all 300ms var(--ease-out);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
    padding: var(--space-20) var(--space-8);
    background: var(--color-surface-3);
    border-left: 1px solid var(--color-border);
    transition: right 400ms var(--ease-out);
    z-index: 200;
  }
  .nav-links.open { right: 0; }
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms, visibility 300ms;
  }
  .nav-overlay.visible { opacity: 1; visibility: visible; }
}


/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: clamp(var(--space-12), 6vw, var(--space-20)) clamp(var(--space-6), 4vw, var(--space-12));
}

.footer-grid {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

.footer-brand .nav-logo {
  display: inline-block;
  margin-bottom: var(--space-4);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
}
.footer-col a:hover { color: var(--color-gold); }

.footer-bottom {
  max-width: var(--content-wide);
  margin: var(--space-10) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p,
.footer-bottom a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--color-text-muted); }

.footer-legal {
  line-height: 1.7;
  max-width: 600px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ═══════════════════════════════════════
   SHARED UI ELEMENTS
   ═══════════════════════════════════════ */

/* — Eyebrow — */
.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  opacity: 0.8;
}

.eyebrow-lined {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.eyebrow-lined::before,
.eyebrow-lined::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.4;
}

/* — Section Title — */
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-white);
  line-height: 1.15;
}
.section-title em {
  font-style: italic;
  color: var(--color-gold);
}

.section-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 560px;
}

/* — Buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(200, 169, 110, 0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1px solid rgba(200, 169, 110, 0.4);
  color: var(--color-gold);
}
.btn-outline:hover {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
}

.btn-ghost {
  background: transparent;
  color: var(--color-gold);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--color-gold-dim);
}

.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-sm);
}

/* — Card — */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
}

.card-elevated {
  background: var(--color-surface-2);
  border-color: var(--color-border-lit);
  box-shadow: var(--shadow-md);
}

/* — Badge — */
.badge {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.badge-gold {
  color: var(--color-gold);
  background: var(--color-gold-dim);
  border: 1px solid rgba(200, 169, 110, 0.25);
}

.badge-green {
  color: var(--color-green);
  background: var(--color-green-dim);
  border: 1px solid rgba(76, 175, 125, 0.25);
}


/* ═══════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════ */

.fade-in { opacity: 1; }

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* Fallback for browsers without scroll-driven animations */
@supports not (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
  }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════ */

.container {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 clamp(var(--space-6), 4vw, var(--space-12));
}

.container-narrow {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 clamp(var(--space-6), 4vw, var(--space-12));
}

.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-white { color: var(--color-white); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.section-padding {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}
