/* Fonts loaded via HTML preload for better performance - removed @import */

/* ------------------- */
/* Custom Properties   */
/* ------------------- */
:root {
    --clr-dark: #111111;
    --clr-light: #f5f5f5;
    --clr-accent-orange: #FF8C00;
    --clr-accent-gold: #FFD700;

    --ff-headings: 'Sora', sans-serif;
    --ff-body: 'Inter', sans-serif;

    /* Dashboard theme tokens (premium black + orange→gold) */
    --bg: #0b1220;            /* near-black */
    --surface: #0f172a;       /* deep slate */
    --border: #334155;        /* subtle border */
    --text: #e5e7eb;          /* primary text (contrast: 13.2:1 - excellent) */
    --muted: #a5b4c7;         /* secondary text (contrast: 6.8:1 - WCAG AA compliant, improved from #94a3b8) */
    --muted-light: #cbd5e1;   /* lighter secondary text (contrast: 9.8:1 - WCAG AAA) */
    --grad: linear-gradient(135deg, var(--clr-accent-orange) 0%, var(--clr-accent-gold) 100%);
    --focus: #fbbf24;         /* gold focus ring */
    --danger: #ef4444;
    --success: #22c55e;

    /* Shadow system - neutral shadows for depth */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 2px 8px rgba(2, 6, 23, 0.15);
    --shadow-md: 0 4px 16px rgba(2, 6, 23, 0.25);
    --shadow-lg: 0 12px 32px rgba(2, 6, 23, 0.35);
    --shadow-xl: 0 24px 48px rgba(2, 6, 23, 0.45);
    --shadow-2xl: 0 40px 70px rgba(2, 6, 23, 0.6);

    /* Glow system - brand colors for interactive elements */
    --glow-gold: 0 0 0 2px rgba(248, 196, 89, 0.35);
    --glow-gold-soft: 0 8px 24px rgba(248, 196, 89, 0.2);
    --glow-gold-intense: 0 12px 36px rgba(249, 115, 22, 0.35);
    --glow-blue: 0 0 0 1px rgba(59, 130, 246, 0.25);
    --glow-blue-soft: 0 8px 24px rgba(59, 130, 246, 0.15);

    /* Border radius scale for consistency */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;
}

/* ------------------- */
/* Reset & Globals     */
/* ------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--clr-dark);
    color: var(--clr-light);
    font-family: var(--ff-body);
    line-height: 1.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link for accessibility - becomes visible on focus */
.skip-link {
    position: fixed;
    top: -100px;
    left: 10px;
    z-index: 10000;
    padding: 10px 15px;
    background: var(--clr-accent-gold);
    color: var(--clr-dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top 0.2s ease-in-out;
}

.skip-link:focus {
    top: 10px;
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* Utility classes for visibility control (replacing inline styles) */
.hidden {
    display: none !important;
}

.visible {
    display: block;
}

/* Lock icon for tier-gated features */
.tier-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.7;
}

.tier-lock-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

html, body {
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open #eos-bubble-root {
    display: none;
}

.skip-link {
    position: absolute;
    left: 50%;
    top: -200px;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: var(--clr-accent-gold);
    color: var(--clr-dark);
    font-family: var(--ff-headings);
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transition: top 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    z-index: 2000;
}

.skip-link:focus-visible {
    top: 16px;
    opacity: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto; /* Centers the container */
}

a {
    color: var(--clr-light);
    text-decoration: none;
}

ul {
    list-style: none;
}


/* ------------------- */
/* Header & Navigation */
/* ------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
    padding: 0.65rem 0;
    background-color: rgba(10, 12, 18, 0.92);
    box-shadow: 0 24px 45px rgba(2, 6, 23, 0.45);
}

.main-nav {
    display: flex;
    justify-content: space-between; /* Pushes items to the edges */
    align-items: center; /* Vertically aligns items */
}

.logo {
    z-index: 1001; /* Ensure logo is above mobile menu overlay */
    display: flex;
    align-items: center;
}

.logo svg {
    height: 80px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 2rem; /* Adds space between nav items */
}

.main-nav ul a {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav ul a:hover {
    color: var(--clr-accent-gold);
}

.main-nav ul a.is-current,
.main-nav ul a[aria-current="page"] {
    color: var(--clr-accent-gold);
}

.main-nav ul a.is-current::after,
.main-nav ul a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--clr-accent-gold);
    border-radius: 999px;
}

.button-primary {
    background: linear-gradient(90deg, var(--clr-accent-orange), var(--clr-accent-gold));
    color: var(--clr-dark);
    font-family: var(--ff-headings);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.button-primary:hover {
    transform: scale(1.05);
}

.button-primary:focus-visible,
.button-secondary:focus-visible,
.main-nav ul a:focus-visible,
.mobile-menu-toggle:focus-visible,
.mobile-nav a:focus-visible,
.mobile-nav-close:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

/* Footer                   */
/* ------------------------ */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info p {
    margin-top: 0.5rem;
    color: rgba(245, 245, 245, 0.7);
}

.footer-nav ul {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: rgba(245, 245, 245, 0.85);
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--clr-light);
}

/* Mobile Navigation Styles      */
/* ----------------------------- */

.nav-links {
    display: flex; /* Show by default on desktop */
}

.desktop-cta {
    display: block; /* Show by default on desktop */
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-toggle .hamburger-icon rect {
    fill: var(--clr-light);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate hamburger to an 'X' */
.mobile-menu-toggle.active .hamburger-icon rect:nth-child(1) {
    transform: translateY(22.5px) rotate(45deg);
}
.mobile-menu-toggle.active .hamburger-icon rect:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active .hamburger-icon rect:nth-child(3) {
    transform: translateY(-22.5px) rotate(-45deg);
}

/* Slide-in panel instead of full-screen */

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 72px 24px 36px;
    text-align: center;
    overflow-y: auto;
    transform: translate3d(100%, 0, 0);
    transition: opacity 0.3s ease, transform 0.35s ease-in-out;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1200;
}

.mobile-nav.active {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav .mobile-cta {
    margin-top: 12px;
}

.mobile-nav a {
    font-family: var(--ff-headings);
    font-size: 1.0rem;
    color: var(--clr-light);
    text-decoration: none;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(15,23,42,0.6);
    color: var(--clr-light);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-nav-close:hover,
.mobile-nav-close:focus-visible {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
}

.mobile-nav .mobile-cta {
    margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.input, .textarea, .select {
  border: 1px solid var(--border);
  background: #111827;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.textarea { min-height: 84px; width: 100%; }

/* Form validation states */
.input--error, .textarea--error, .select--error {
  border-color: var(--color-error);
  background: rgba(239, 68, 68, 0.05);
  animation: input-shake 0.4s ease;
}

.input--error:focus, .textarea--error:focus, .select--error:focus {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.input--success, .textarea--success, .select--success {
  border-color: var(--color-success);
  background: rgba(34, 197, 94, 0.05);
}

.input--success:focus, .textarea--success:focus, .select--success:focus {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Shake animation for validation errors */
@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .input--error, .textarea--error, .select--error {
    animation: none;
  }
}

.btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Material Design Ripple Effect */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Dark variant ripple for light backgrounds */
.btn-primary::before {
  background: rgba(255, 255, 255, 0.4);
}

.btn-secondary::before,
.btn-ghost::before {
  background: rgba(255, 255, 255, 0.2);
}

.btn[disabled] {
  opacity: 0.6; /* Updated from 0.5 per Phase 1 accessibility improvements */
  cursor: not-allowed;
  pointer-events: none; /* Prevent ripple on disabled buttons */
}

.btn-primary { background: var(--grad); color: #111; }
.btn-secondary { background: #334155; color: #e5e7eb; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* Ghost button hover state for visual feedback */
.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(148, 163, 184, 0.15);
}

/* Enhanced focus states for better keyboard navigation visibility */
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.2);
}

.btn-primary:focus-visible {
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.25);
}

.tier-upgrade-btn:focus-visible {
  outline: 3px solid var(--clr-accent-gold);
  outline-offset: 3px;
  box-shadow: var(--glow-gold), 0 0 0 6px rgba(248, 196, 89, 0.3);
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .btn::before {
    transition: none;
  }

  .btn-ghost:hover {
    transform: none;
  }

  .btn:active::before {
    width: 0;
    height: 0;
  }
}

/* Success Animation States for Save Buttons */
.btn--saving {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn--saving::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: btn-spinner 0.6s linear infinite;
}

@keyframes btn-spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn--saved {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  position: relative;
}

.btn--saved::after {
  content: '✓';
  margin-left: 6px;
  font-size: 1.1em;
  animation: btn-checkmark 0.4s ease-out;
}

@keyframes btn-checkmark {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Respect reduced motion for save animations */
@media (prefers-reduced-motion: reduce) {
  .btn--saving::after {
    animation: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
  }

  .btn--saved::after {
    animation: none;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}

.notice { color: var(--muted); font-size: 0.9rem; }

.links a { color: var(--clr-accent-gold); }

.pre {
  white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border);
  padding: 8px; border-radius: 8px; color: #cbd5e1; max-height: 240px; overflow: auto;
}

/* ========================= */
/* Mobile Responsive Styles  */
/* ========================= */

/* Media Query for mobile devices */
@media (max-width: 768px) {
    .nav-links, .desktop-cta {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .trust-bar-layout {
        flex-direction: column;
        align-items: flex-start;
    }
    .trust-bar-title {
        font-size: 0.95rem;
    }
    .hero-highlights {
        margin-top: 2.5rem;
    }
    .hero-highlights li {
        padding: 1rem 1.25rem;
    }
}

/* ========================= */
/* Page Header Styles        */
/* ========================= */

.page-header {
    padding: 4rem 0;
    text-align: center;
    background-color: #000;
}

.page-header h1 {
    font-family: var(--ff-headings);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 60ch;
    margin: 0 auto;
    color: rgba(245, 245, 245, 0.85);
}
