/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-text: #1a1a1a;
  --color-text-light: #555555;
  --color-accent: #e8720c;
  --color-accent-hover: #d06000;
  --color-accent-glow: rgba(232, 114, 12, 0.15);
  --color-border: #e0e0e0;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --section-padding: 6rem 1.5rem;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base (Mobile-first)
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 1rem;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

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

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

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--color-accent);
}

/* Desktop Nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2.5rem;
}

.nav-desktop a {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-desktop a:hover::after,
.nav-desktop a:focus::after {
  width: 100%;
  left: 0;
}

.nav-desktop a:hover {
  color: var(--color-accent);
}

/* Language Toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 24px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color var(--transition);
}

.lang-toggle:hover {
  border-color: var(--color-accent);
}

.lang-toggle button {
  background: none;
  border: none;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-light);
  transition: background var(--transition), color var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-toggle button.active {
  background: var(--color-accent);
  color: #fff;
}

.lang-toggle button:hover:not(.active) {
  background: var(--color-bg-alt);
}

/* Mobile Header Actions (lang toggle + hamburger) */
.header-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Panel — full-width dropdown */
.nav-mobile {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: #ffffff;
  z-index: 999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s ease;
  box-shadow: none;
}

.nav-mobile.open {
  max-height: 400px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.nav-mobile-inner {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1rem 1rem 1.25rem;
}

.nav-mobile a {
  display: flex !important;
  align-items: center !important;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a !important;
  text-decoration: none !important;
  background: #f3f3f3;
  border: none !important;
  border-radius: 14px;
  min-height: 56px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.nav-mobile a:hover,
.nav-mobile a:active {
  background: rgba(232, 114, 12, 0.12) !important;
  color: #e8720c !important;
}

.nav-mobile a:active {
  transform: scale(0.97);
}

.nav-mobile-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px;
  border-radius: 12px;
  background: #e8720c !important;
  color: #ffffff !important;
  flex-shrink: 0;
}

.nav-mobile-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff !important;
  fill: none;
}

.nav-mobile a > span:not(.nav-mobile-icon) {
  flex: 1;
}

.nav-mobile-chevron {
  margin-left: auto;
  opacity: 0.3;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--color-text-light);
  font-size: 0.85rem;
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ========================================
   Responsive: Mobile (< 768px)
   ======================================== */
@media (max-width: 767px) {
  :root {
    --section-padding: 3.5rem 1.25rem;
  }

  /* Compact language toggle on mobile */
  .header-mobile-actions .lang-toggle {
    border-radius: 18px;
    font-size: 0.7rem;
  }

  .header-mobile-actions .lang-toggle button {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    min-width: 34px;
    min-height: 34px;
  }

  .footer-links {
    gap: 1rem;
  }

  .footer-copy {
    font-size: 0.85rem;
  }
}

/* ========================================
   Responsive: Tablet+ (768px+)
   ======================================== */
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .header-mobile-actions {
    display: none;
  }

  .nav-desktop {
    display: flex;
  }
}