/* ========================================
   Terms of Service - Lightweight Styles
   No heavy animations for better mobile performance
   ======================================== */

:root {
  /* Deep Ocean Color Palette */
  --ocean-dark: #0B1437;
  --ocean-deep: #060A1F;
  --ocean-navy: #0F1C3F;
  --ocean-teal: #14B8A6;
  --ocean-teal-light: #2DD4BF;
  --ocean-gold: #F59E0B;
  --ocean-gold-light: #FCD34D;
  
  /* Text Colors */
  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;
  
  /* Surface Colors */
  --surface: rgba(15, 28, 63, 0.6);
  --surface-glass: rgba(15, 28, 63, 0.4);
  --surface-raised: rgba(20, 184, 166, 0.1);
  --surface-hover: rgba(20, 184, 166, 0.15);
  
  /* Borders */
  --border: rgba(148, 163, 184, 0.12);
  --border-glow: rgba(20, 184, 166, 0.4);
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(6, 10, 31, 0.3);
  --shadow-md: 0 8px 24px rgba(6, 10, 31, 0.4);
  --shadow-lg: 0 12px 36px rgba(6, 10, 31, 0.5);
  
  color-scheme: dark;
}

/* ========================================
   Base Styles
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #060A1F 0%, #0B1437 40%, #0F1C3F 70%, #0B1437 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Kanit', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Simple static background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 40%, rgba(20, 184, 166, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(245, 158, 11, 0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ========================================
   Layout
   ======================================== */

.container {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 1280px);
  margin-inline: auto;
  padding-block: clamp(2rem, 4vw, 4rem);
}

/* ========================================
   Header
   ======================================== */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  background: rgba(11, 20, 55, 0.7);
  border-bottom: 1px solid var(--border);
  border-radius: 16px;
  padding-inline: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border-glow);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text h1 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #F1F5F9 0%, #14B8A6 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.brand-text p {
  color: var(--text-muted);
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  font-weight: 500;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-link::before {
  content: '←';
  font-size: 1.2em;
  font-weight: 700;
}

.back-link:hover {
  background: var(--surface-raised);
  border-color: var(--ocean-teal);
  color: var(--ocean-teal);
  transform: translateX(-4px);
}

/* ========================================
   Main Content
   ======================================== */

main {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 4rem);
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
}

main h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  background: linear-gradient(135deg, #F1F5F9 0%, #14B8A6 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.effective-date {
  display: inline-block;
  background: var(--surface-raised);
  color: var(--text-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.effective-date strong {
  color: var(--ocean-teal);
}

main h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}

main h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--ocean-teal), var(--ocean-gold));
}

main h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

main p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1.5rem;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

main ul, main ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

main li {
  margin-bottom: 0.75rem;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

main ul li::marker {
  color: var(--ocean-teal);
  font-weight: 900;
}

main a {
  color: var(--ocean-teal);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

main a:hover {
  color: var(--ocean-teal-light);
  border-bottom-color: var(--ocean-teal-light);
}

/* ========================================
   Tables
   ======================================== */

.service-table {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
}

.service-table thead {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(245, 158, 11, 0.1));
}

.service-table th {
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  border-bottom: 2px solid var(--border-glow);
}

.service-table td {
  padding: 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.8;
  border-bottom: 1px solid var(--border);
}

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

.service-table tbody tr {
  transition: background 0.2s ease;
}

.service-table tbody tr:hover {
  background: var(--surface-hover);
}

.service-table td:first-child {
  font-weight: 600;
  color: var(--ocean-teal);
}

/* ========================================
   Special Boxes
   ======================================== */

.calculation-box {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(245, 158, 11, 0.1));
  border: 2px solid var(--border-glow);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ========================================
   Footer
   ======================================== */

footer {
  background: var(--ocean-deep);
  border-top: 1px solid var(--border);
  padding: clamp(2rem, 4vw, 3rem) 0;
  margin-top: clamp(3rem, 5vw, 5rem);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.footer-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ocean-teal), var(--ocean-gold));
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--ocean-teal);
}

.footer-link:hover::before {
  width: 100%;
}

footer .container > p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

/* ========================================
   Floating CTA
   ======================================== */

.floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--ocean-teal), var(--ocean-gold));
  border-radius: 50%;
  display: grid;
  place-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.5);
  transition: all 0.3s ease;
  z-index: 999;
}

.floating-cta:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(20, 184, 166, 0.7);
}

.floating-cta svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

/* ========================================
   Animations
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
  }
  
  .floating-cta {
    width: 56px;
    height: 56px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .floating-cta svg {
    width: 24px;
    height: 24px;
  }
  
  .container {
    width: calc(100% - 1.5rem);
  }
  
  main {
    padding: 2rem 1.5rem;
  }
  
  .service-table {
    font-size: 0.85rem;
  }
  
  .service-table th,
  .service-table td {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .back-link {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .effective-date {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .calculation-box {
    padding: 1.25rem;
    font-size: 0.875rem;
  }
}

/* ========================================
   Accessibility
   ======================================== */

*:focus-visible {
  outline: 2px solid var(--ocean-teal);
  outline-offset: 4px;
  border-radius: 4px;
}

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

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .floating-cta,
  .back-link {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  main {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}