/* ===========================
   TETHER SHARED STYLES
   Canonical WPP Design System
   Used by all website pages
   =========================== */

/* ===========================
   CSS VARIABLES — TETHER WPP
   =========================== */
:root {
  /* Core Palette */
  --midnight: #2C3440;
  --slate: #3E4A5C;
  --leather: #8B7355;
  --leather-light: #A08968;
  --stone: #6B7280;
  --parchment: #E8DCC8;
  --cream: #F5F1E8;
  --ivory: #FEFDFB;

  /* Semantic */
  --success: #059669;
  --warning: #F59E0B;
  --error: #DC2626;
  --info: #3B82F6;

  /* Typography */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

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

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--midnight);
  background: var(--ivory);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
.font-display {
  font-family: var(--font-display);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }

p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--slate);
}

.text-sm { font-size: 0.9375rem; }
.text-xs { font-size: 0.8125rem; }
.text-lg { font-size: 1.25rem; }

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

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

.section-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--leather);
  margin-bottom: var(--space-md);
}

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

.section-subtitle {
  max-width: 640px;
  color: var(--stone);
  margin-bottom: var(--space-3xl);
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--midnight);
  color: var(--ivory);
}

.btn-primary:hover {
  background: var(--slate);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44, 52, 64, 0.2);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--midnight);
  border: 2px solid var(--parchment);
}

.btn-secondary:hover {
  border-color: var(--leather);
  background: var(--cream);
}

.btn-leather {
  background: var(--leather);
  color: var(--ivory);
}

.btn-leather:hover {
  background: var(--leather-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 115, 85, 0.25);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9375rem;
  border-radius: 10px;
}

/* App Store Badge */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #000;
  color: #fff;
  border-radius: 12px;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  text-decoration: none;
}

.app-store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.app-store-badge svg {
  width: 24px;
  height: 24px;
}

.app-store-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.app-store-badge .badge-text span:first-child {
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.app-store-badge .badge-text span:last-child {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ===========================
   NAVIGATION
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(254, 253, 251, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232, 220, 200, 0.5);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 4px 20px rgba(44, 52, 64, 0.06);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--midnight);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}

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

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--slate);
  transition: color 0.2s ease;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--midnight);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--midnight);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--midnight);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-3xl) 0 var(--space-xl);
}

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

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ivory);
  margin-bottom: var(--space-md);
}

.footer-logo .nav-logo-icon {
  background: linear-gradient(135deg, var(--slate), var(--stone));
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-col a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--ivory);
  text-decoration: none;
}

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

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ivory);
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE — SHARED
   =========================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }

  /* Mobile menu */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--ivory);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--parchment);
    box-shadow: 0 8px 24px rgba(44, 52, 64, 0.1);
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
}

/* ===========================
   LEGAL PAGE LAYOUT
   (Privacy Policy, Terms of Service)
   =========================== */
.legal-page {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
}

.legal-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.legal-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 2px solid var(--parchment);
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: var(--space-sm);
}

.legal-meta {
  color: var(--stone);
  font-size: 0.9375rem;
}

.legal-meta strong {
  color: var(--midnight);
}

/* Legal Content Styles */
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--midnight);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--parchment);
}

.legal-content h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--midnight);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  margin-bottom: var(--space-md);
  color: var(--slate);
  line-height: 1.8;
}

.legal-content ul, .legal-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: var(--slate);
}

.legal-content li {
  margin-bottom: var(--space-xs);
  line-height: 1.7;
}

.legal-content li ul, .legal-content li ol {
  margin-top: var(--space-xs);
  margin-bottom: 0;
}

.legal-content strong {
  color: var(--midnight);
}

.legal-content a {
  color: var(--leather);
  font-weight: 500;
  text-decoration: none;
}

.legal-content a:hover {
  color: var(--leather-light);
  text-decoration: underline;
}

.legal-content hr {
  border: none;
  border-top: 1px solid var(--parchment);
  margin: var(--space-2xl) 0;
}

/* Legal emphasis blocks (e.g. all-caps legal language) */
.legal-emphasis {
  background: var(--cream);
  border-radius: 12px;
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Table of Contents */
.toc {
  background: var(--cream);
  border-radius: 16px;
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.toc h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
  color: var(--midnight);
}

.toc ol {
  list-style-position: inside;
  padding-left: 0;
}

.toc li {
  margin-bottom: var(--space-xs);
}

.toc a {
  color: var(--leather);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9375rem;
}

.toc a:hover {
  text-decoration: underline;
}

/* Callout Box */
.callout {
  background: rgba(139, 115, 85, 0.06);
  border-left: 3px solid var(--leather);
  border-radius: 0 8px 8px 0;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
}

.callout p {
  margin-bottom: 0;
}
