/* TONLYX — Light Minimal Design System */

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;

  --primary: #0088cc;
  --primary-hover: #0077b5;
  --primary-light: #e0f2fe;
  --primary-border: #bae6fd;

  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4 {
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-subtle);
}

/* Badges & Chips */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 13px;
  font-weight: 600;
}

.icon-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Navbar */
header.site-header {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav.main-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--primary);
}

.mobile-cta-btn {
  display: none;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

/* Language Switcher Dropdown */
.lang-switcher {
  position: relative;
  display: inline-block;
}

.flag-icon {
  width: 18px;
  height: 13.5px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover,
.lang-switcher.open .lang-btn {
  background: #ffffff;
  border-color: var(--primary-light);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.lang-btn .chevron-icon {
  transition: transform 0.2s ease;
}

.lang-switcher.open .lang-btn .chevron-icon {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
  background: var(--bg-subtle);
  color: var(--primary);
}

.lang-dropdown a.active::after {
  content: "✓";
  margin-left: auto;
  font-weight: 700;
  color: var(--primary);
}

.mobile-menu-btn:hover {
  background: var(--bg-subtle);
}

/* Animated Logo Spinner */
.logo-spinner {
  width: var(--spinner-size, 42px);
  height: var(--spinner-size, 42px);
  animation: spinner-rotate var(--spinner-speed, 2s) ease-in-out infinite;
  flex-shrink: 0;
}

.logo-spinner .part {
  fill-rule: evenodd;
  clip-rule: evenodd;
  fill: var(--spinner-color, var(--primary));
  opacity: var(--spinner-opacity, 1);
  transform-origin: center;
  transform-box: fill-box;
}

.logo-spinner .part1 {
  animation: spinner-part1 var(--spinner-speed, 2s) ease-out infinite;
}

.logo-spinner .part2 {
  animation: spinner-part2 var(--spinner-speed, 2s) ease-out infinite;
}

.logo-spinner .part3 {
  animation: spinner-part3 var(--spinner-speed, 2s) ease-out infinite;
}

@keyframes spinner-rotate {
  0% {
    transform: rotate(0deg) scale(0.7);
  }

  50% {
    transform: rotate(180deg) scale(1);
  }

  100% {
    transform: rotate(360deg) scale(0.7);
  }
}

@keyframes spinner-part1 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-12.5px, 20px);
  }
}

@keyframes spinner-part2 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-20px, -20px);
  }
}

@keyframes spinner-part3 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(20px, -7.5px);
  }
}

/* Header Animated Logo Spinner (Black color, spins 1x, then 15s pause) */
.header-logo-spinner {
  width: 48px;
  height: 48px;
  animation: header-spinner-rotate 17s ease-in-out infinite;
  flex-shrink: 0;
}

.header-logo-spinner .part {
  fill-rule: evenodd;
  clip-rule: evenodd;
  fill: #000000;
  transform-origin: center;
  transform-box: fill-box;
}

.header-logo-spinner .part1 {
  animation: header-part1 17s ease-out infinite;
}

.header-logo-spinner .part2 {
  animation: header-part2 17s ease-out infinite;
}

.header-logo-spinner .part3 {
  animation: header-part3 17s ease-out infinite;
}

@keyframes header-spinner-rotate {
  0% {
    transform: rotate(0deg) scale(0.85);
  }

  5.88% {
    transform: rotate(180deg) scale(1);
  }

  11.76%,
  100% {
    transform: rotate(360deg) scale(0.85);
  }
}

@keyframes header-part1 {

  0%,
  11.76%,
  100% {
    transform: translate(0, 0);
  }

  5.88% {
    transform: translate(-12.5px, 20px);
  }
}

@keyframes header-part2 {

  0%,
  11.76%,
  100% {
    transform: translate(0, 0);
  }

  5.88% {
    transform: translate(-20px, -20px);
  }
}

@keyframes header-part3 {

  0%,
  11.76%,
  100% {
    transform: translate(0, 0);
  }

  5.88% {
    transform: translate(20px, -7.5px);
  }
}

/* Hero Section */
.hero-section {
  padding: 80px 0 100px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-headline {
  font-size: 52px;
  line-height: 1.12;
  margin: 20px 0 20px;
  letter-spacing: -0.04em;
}

.hero-headline span {
  color: var(--primary);
}

.hero-subtext {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 540px;
}

.features-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.chip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* UI Mockup Widget */
.mockup-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.mockup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.mockup-seller {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 16px;
}

.mockup-avatar {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.status-pill {
  padding: 2px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.deal-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}


.detail-bill {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding: 12px;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.detail-bill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-bill-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.detail-label-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.detail-val-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.detail-label {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 500;
}

.detail-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.deal-success-btn-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.inspection-timer-box {
  background: #eff6ff;
  border: 1px dashed #bfdbfe;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #1e40af;
  font-weight: 700;
  font-size: 14px;
}

/* Sections */
.section-padding {
  padding: 100px 0;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 38px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.step-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-weight: 800;
  font-size: 18px;
}

.step-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Features Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--bg-subtle);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.feature-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.faq-answer {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-icon-arrow {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
}

/* Call to Action Banner */
.cta-banner {
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
  margin: 40px 0 100px;
  box-shadow: 0 20px 40px -10px rgba(0, 136, 204, 0.3);
}

.cta-banner h2 {
  color: #ffffff;
  font-size: 40px;
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 36px;
}

.cta-banner .btn-white {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.cta-banner .btn-white:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

/* Footer */
footer.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 16px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-light);
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .desktop-header-btn {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .mobile-cta-btn {
    display: inline-flex !important;
    width: 100%;
    margin-top: 10px;
    justify-content: center;
  }

  nav.main-nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    z-index: 999;
  }

  nav.main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  nav.main-nav a {
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
  }
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 36px;
  }

  .section-title {
    font-size: 28px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* =============================================================
   Isolated Error Pages Styles (404.html & 500.html)
   Zero side effects on main site components
   ============================================================= */
.err-page-section {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.err-page-card {
  max-width: 580px;
  width: 100%;
  text-align: center;
  /* background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  box-shadow: var(--shadow-lg); */
}

.err-spinner-wrap {
  width: 110px;
  height: 110px;
  margin: 0 auto 28px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background: var(--bg-subtle);
  border-radius: 50%;
  border: 1px solid var(--border-color); */
}

.err-spinner-icon {
  width: 72px;
  height: 72px;
  animation: errLogoRotate 8s linear infinite;
  transform-origin: center;
}

.err-spinner-icon .err-part1 {
  fill: #0088cc;
}

.err-spinner-icon .err-part2 {
  fill: #00a8ff;
}

.err-spinner-icon .err-part3 {
  fill: #006699;
}

@keyframes errLogoRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.err-page-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(0, 136, 204, 0.08);
  border: 1px solid rgba(0, 136, 204, 0.2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.err-page-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.2;
}

.err-page-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.err-page-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}