/* ============================================
   Trimora Website — Design System & Styles
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors — Gold */
  --color-primary: #B8860B;
  --color-primary-light: #D4A843;
  --color-primary-dark: #8B6508;
  --color-primary-glow: rgba(184, 134, 11, 0.12);

  /* Accent */
  --color-accent: #C9A84C;
  --color-accent-light: #E0C068;

  /* Neutrals — Black & White */
  --color-bg: #FAFAFA;
  --color-bg-card: #FFFFFF;
  --color-bg-dark: #0A0A0A;
  --color-bg-dark-card: #141414;
  --color-text: #111111;
  --color-text-secondary: #555555;
  --color-text-light: #888888;
  --color-border: #E5E5E5;
  --color-border-light: #F0F0F0;

  /* Semantic */
  --color-success: #10B981;
  --color-info: #3B82F6;
  --color-warning: #F59E0B;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* 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;

  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 11, 31, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 11, 31, 0.08);
  --shadow-lg: 0 8px 32px rgba(15, 11, 31, 0.1);
  --shadow-xl: 0 16px 48px rgba(15, 11, 31, 0.12);
  --shadow-glow: 0 0 40px rgba(184, 134, 11, 0.2);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

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

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

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

ul, ol {
  padding-left: var(--space-lg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.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;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(184, 134, 11, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
}

.logo-link:hover {
  color: var(--color-primary);
}

.logo-img {
  height: 120px;
  width: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  padding: 0;
}

.nav-desktop a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--color-primary);
}

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

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.menu-toggle:hover {
  background: var(--color-primary-glow);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-text);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Mobile Navigation */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: var(--space-xl);
  overflow-y: auto;
}

.nav-mobile.open {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-mobile a {
  display: block;
  padding: var(--space-md) var(--space-lg);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--color-primary-glow);
  color: var(--color-primary);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: calc(var(--header-height) + var(--space-4xl)) 0 var(--space-4xl);
  background: linear-gradient(170deg, #F7F3E9 0%, var(--color-bg) 50%, #FBF8F0 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -25%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(184, 134, 11, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.375rem 1rem;
  background: var(--color-primary-glow);
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.02em;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--color-text) 30%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-4xl) 0;
}

.section-alt {
  background: #F5F4F0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.0625rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* ---------- Feature Cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-glow);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.125rem;
}

.feature-card p {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* ---------- How It Works ---------- */
.steps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xl);
  counter-reset: step-counter;
}

.step-item {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: var(--space-lg);
  box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
}

.step-item h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.0625rem;
}

.step-item p {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* ---------- Trust / Note Section ---------- */
.trust-banner {
  background: linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.trust-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(184, 134, 11, 0.15) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.trust-banner h2 {
  color: #fff;
  margin-bottom: var(--space-md);
  position: relative;
}

.trust-banner p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
  margin: 0 auto var(--space-xl);
  font-size: 1.0625rem;
  position: relative;
}

.trust-banner .btn-primary {
  position: relative;
}

/* ---------- Contact Section / Page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.contact-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  background: var(--color-primary-glow);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.25rem;
}

.contact-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1rem;
}

.contact-card p,
.contact-card a {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.contact-card a:hover {
  color: var(--color-primary);
}

/* ---------- Legal / Policy Pages ---------- */
.legal-page {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-4xl);
}

.legal-page .container {
  max-width: 800px;
}

.legal-header {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.legal-header h1 {
  margin-bottom: var(--space-sm);
}

.legal-header .effective-date {
  font-size: 0.9375rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
}

.legal-content p {
  font-size: 0.9375rem;
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: var(--space-md);
}

.legal-content li {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

/* Timeline / Data Table */
.timeline-table {
  margin: var(--space-lg) 0 var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.timeline-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 400px;
}

.timeline-table thead th {
  background: var(--color-primary-glow);
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 2px solid var(--color-primary);
}

.timeline-table tbody td {
  padding: var(--space-md) var(--space-lg);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-light);
  line-height: 1.6;
}

.timeline-table tbody tr:last-child td {
  border-bottom: none;
}

.timeline-table tbody tr:hover {
  background: var(--color-primary-glow);
}

/* ---------- About Page ---------- */
.about-hero {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
  background: linear-gradient(170deg, #F7F3E9 0%, var(--color-bg) 60%);
  text-align: center;
}

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

.about-hero p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.0625rem;
}

/* ---------- Contact Page ---------- */
.contact-hero {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
  background: linear-gradient(170deg, #F7F3E9 0%, var(--color-bg) 60%);
  text-align: center;
}

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

.contact-hero p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.0625rem;
}

.support-checklist {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-top: var(--space-xl);
}

.support-checklist h3 {
  margin-bottom: var(--space-md);
}

.support-checklist li {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-top: var(--space-md);
}

.footer-brand .logo-link {
  color: #fff;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.footer-col ul {
  list-style: none;
  padding-left: 0;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
  margin-bottom: 0;
}

.footer-contact-info {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.footer-contact-info a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125rem;
}

.footer-contact-info a:hover {
  color: var(--color-primary-light);
}

/* ---------- Page Transition ---------- */
#app-content {
  animation: fadeIn 0.35s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --space-4xl: 3.5rem;
    --space-3xl: 2.5rem;
    --header-height: 64px;
  }

  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-3xl);
  }

  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-contact-info {
    justify-content: center;
  }

  .features-grid,
  .steps-list {
    grid-template-columns: 1fr;
  }

  .trust-banner {
    padding: var(--space-2xl) var(--space-lg);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-badge {
    font-size: 0.75rem;
  }
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}
