@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --paper-bg: #FAF9F6;
  --paper-card: #FFFFFF;
  --paper-border: #E8E6E0;
  --ink: #111215;
  --ink-secondary: #575A65;
  --ink-muted: #8E919D;
  --brass: #9E782F;
  --brass-light: #B8860B;
}

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

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  background-color: var(--paper-bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-serif {
  font-family: 'Newsreader', Georgia, serif;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: 'Space Mono', monospace;
}

/* 1. Header Navigation: White-space nowrap for all nav links */
nav a {
  white-space: nowrap;
}

/* Mobile Hero Categories Ribbon (horizontal scroll-ribbon) */
.hero-categories {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 4px 16px 12px;
  margin: 0 -16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hero-categories::-webkit-scrollbar {
  display: none;
}
.hero-categories .tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .hero-categories {
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 4px 0 0;
    margin: 0;
    gap: 10px;
  }
}

/* Service Card Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
@media (min-width: 1024px) {
  .card-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    justify-content: flex-end;
  }
}

/* 2. Top-bar vertical dividers (replacing text '|') */
.top-bar-divider {
  display: inline-block;
  width: 1px;
  height: 13px;
  background-color: rgba(17, 18, 21, 0.15);
  flex-shrink: 0;
  vertical-align: middle;
}

/* 3. Hero eyebrow decorative rule via ::before */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background-color: currentColor;
  flex-shrink: 0;
  vertical-align: middle;
}

/* 4. Title typography balance */
.hero-title {
  text-wrap: balance;
}

/* Swiss Minimalist Borders and Dividers */
.border-line {
  border-color: var(--paper-border);
}

/* Dossier Row Styling */
.dossier-row {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dossier-row:hover {
  background-color: #FFFFFF;
}
.dossier-row.expanded {
  background-color: #FFFFFF;
}

/* Tab filter buttons & badges */
.tab-btn {
  padding: 10px 18px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tab-btn:not(.active):hover {
  border-color: #111215 !important;
  background-color: #FFFFFF !important;
  color: #111215 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.tab-btn .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 10px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  transition: all 0.2s ease;
}
.tab-btn.active {
  background-color: #111215 !important;
  color: #FFFFFF !important;
  border-color: #111215 !important;
}
.tab-btn.active .badge {
  background-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}
.tab-btn:not(.active) .badge {
  background-color: rgba(17, 18, 21, 0.08);
  color: #111215;
}

/* Pricing Table Styling */
.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  gap: 16px;
  transition: background-color 0.15s ease;
}
.pricing-row:hover {
  background-color: rgba(0, 0, 0, 0.015);
}
.pricing-price {
  min-width: 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  color: #111215;
}
.pricing-price.is-agreed {
  color: #8E919D;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.03em;
}

/* Guarantee Number Round Badge */
.guarantee-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F1EFEA;
  color: #111215;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

/* Dropdown styling */
.dropdown-menu {
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* FAQ Icon Transition */
.faq-toggle {
  transition: transform 0.2s ease;
}
.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--paper-bg);
}
::-webkit-scrollbar-thumb {
  background: #D8D6CE;
}
::-webkit-scrollbar-thumb:hover {
  background: #111215;
}

/* Smooth Modal */
#modal-backdrop:not(.hidden) {
  opacity: 1;
}

/* Fullscreen Mobile Drawer Menu - Highest Z-Index outside stacking context */
#mobile-menu {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  background-color: #FAF9F6 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
#mobile-menu.hidden {
  display: none !important;
}
#mobile-menu:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Mobile Subnav Pill Navigation (task/6.txt) */
@media (max-width: 768px) {
  .mobile-subnav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    position: sticky;
    top: 53px;
    z-index: 30;
  }

  .mobile-subnav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
  }

  .mobile-subnav a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #374151;
    background-color: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    user-select: none;
  }

  .mobile-subnav a:active,
  .mobile-subnav a.active {
    color: #ffffff;
    background-color: #111827;
    border-color: #111827;
  }
}

@media (min-width: 769px) {
  .mobile-subnav {
    display: none !important;
  }
}


/* Floating Back to Top Button */
#back-to-top {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

