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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tahoma', 'Segoe UI', sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  cursor: default;
}

/* ==============================
   XP DESKTOP
   ============================== */
#xp-wallpaper {
  position: fixed;
  inset: 0;
  background-color: #3a6ea5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

#xp-desktop {
  position: fixed;
  inset: 0;
  z-index: 1;
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}

#xp-icons {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.xp-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 75px;
  padding: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
}

.xp-icon:hover {
  background: rgba(0, 0, 200, 0.15);
  border-color: rgba(0, 0, 200, 0.3);
}

.xp-icon-img {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3));
}

.xp-icon-label {
  font-size: 11px;
  color: white;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  margin-top: 2px;
  line-height: 1.2;
}

/* XP TASKBAR */
#xp-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(to bottom, #3168d5 0%, #2456b8 45%, #1941a5 46%, #1941a5 100%);
  border-top: 2px solid #0c3bba;
  display: flex;
  align-items: center;
  padding: 0 4px;
  z-index: 10;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.2);
}

#start-btn {
  background: linear-gradient(to bottom, #3c9b34 0%, #2d8b27 45%, #1e7b1e 46%, #167a16 100%);
  color: white;
  font-size: 13px;
  font-weight: bold;
  padding: 3px 12px 3px 6px;
  border-radius: 8px 8px 4px 4px;
  border: 1px solid #0e5e0e;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}

#start-btn:hover {
  background: linear-gradient(to bottom, #4caf3e 0%, #3e9b37 45%, #2e8b2e 46%, #208a20 100%);
}

#start-logo {
  font-size: 8px;
  color: #ff6600;
}

#taskbar-space {
  flex: 1;
}

#clock {
  color: white;
  font-size: 11px;
  padding: 2px 10px;
  background: linear-gradient(to bottom, #1a5aad, #0c47a0);
  border: 1px inset rgba(255,255,255,0.15);
  border-radius: 2px;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* ==============================
   XP MODAL WINDOW
   ============================== */
#modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  z-index: 100;
  background: #ece9d8;
  border: 2px solid #0055ea;
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.3);
  will-change: left, top;
}

#modal-titlebar {
  background: linear-gradient(to bottom, #0a246a 0%, #3a6ea5 8%, #6899cc 20%, #3a6ea5 80%, #0a246a 100%);
  color: white;
  font-size: 13px;
  font-weight: bold;
  padding: 4px 6px;
  border-radius: 6px 6px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  cursor: default;
  overflow: hidden;
}

#modal-buttons {
  display: flex;
  gap: 2px;
}

.modal-btn {
  width: 21px;
  height: 21px;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  line-height: 21px;
  border-radius: 3px;
  cursor: pointer;
  background: linear-gradient(to bottom, #d6dfe8, #bec8d2);
  color: #000;
  border: 1px solid #7a8a9e;
  text-shadow: none;
}

.modal-btn:hover {
  background: linear-gradient(to bottom, #e8edf2, #cdd5df);
}

.modal-btn.close {
  background: linear-gradient(to bottom, #e8a0a0, #c85050);
  color: white;
}

.modal-btn.close:hover {
  background: linear-gradient(to bottom, #f0b0b0, #d86060);
}

#modal-body {
  display: flex;
  align-items: flex-start;
  padding: 20px 16px 12px;
  gap: 14px;
  transition: opacity 0.4s ease;
}

#modal-icon {
  font-size: 36px;
  flex-shrink: 0;
}

#modal-text p {
  font-size: 13px;
  line-height: 1.5;
  color: #000;
}

#modal-footer {
  display: flex;
  justify-content: center;
  padding: 8px 16px 14px;
  transition: opacity 0.4s ease;
}

#modal-ok {
  min-width: 75px;
  padding: 4px 16px;
  font-size: 12px;
  background: linear-gradient(to bottom, #fff, #e0ddd0);
  border: 2px solid;
  border-color: #aaa #666 #666 #aaa;
  border-radius: 3px;
  cursor: pointer;
  font-family: 'Tahoma', sans-serif;
}

#modal-ok:hover {
  background: linear-gradient(to bottom, #fff, #e8e5da);
}

#modal-ok:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

/* ==============================
   MODERN WEBSITE (hidden initially)
   ============================== */
#modern-site {
  position: relative;
  z-index: 5;
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  min-height: 100vh;
}

/* HEADER */
#modern-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

#modern-header nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.5px;
}

.accent {
  color: #0066ff;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: #555;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #0066ff;
}

.lang-switch {
  font-weight: 700 !important;
  padding: 3px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px !important;
  letter-spacing: 0.5px;
  transition: border-color 0.2s, background 0.2s;
}

.lang-switch:hover {
  border-color: #0066ff;
  background: #f0f4ff;
}

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
}

#hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(16px, 2.2vw, 22px);
  color: #555;
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: #0066ff;
  color: white;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3);
}

.cta-btn:hover {
  background: #0052cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

/* PRACTICES */
#practices {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

#practices h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 32px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1a2e;
}

.card p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

/* SYSTEMS SECTION */
#systems {
  padding: 80px 24px;
  background: #f7f8fc;
  max-width: 100%;
}

#systems h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

#systems .cards {
  max-width: 1100px;
  margin: 0 auto;
}

/* WHY SECTION */
#why {
  padding: 80px 24px;
  background: #ffffff;
}

#why h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

.why-content {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  text-align: center;
}

.why-item {
  padding: 20px;
}

.why-number {
  display: block;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 800;
  background: linear-gradient(135deg, #0066ff, #00c6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.why-item p {
  font-size: 16px;
  color: #555;
  line-height: 1.5;
}

/* CONTACT */
#contact {
  padding: 80px 24px;
  text-align: center;
}

#contact h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

#contact > p {
  font-size: 18px;
  color: #555;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.cta-big {
  font-size: 20px;
  padding: 18px 48px;
}

/* CITATION LINKS */
.cite {
  color: #0066ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 102, 255, 0.4);
  transition: border-color 0.2s;
}

.cite:hover {
  border-bottom-color: #0066ff;
}

.why-item .cite {
  font-size: 13px;
  color: #888;
  border-bottom-color: rgba(136, 136, 136, 0.4);
}

.why-item .cite:hover {
  color: #0066ff;
  border-bottom-color: #0066ff;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 32px 24px;
  color: #999;
  font-size: 14px;
  border-top: 1px solid #eee;
}

/* RESET COOKIE BUTTON */
#reset-cookie {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 200;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.15);
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
  padding: 0;
}

#reset-cookie:hover {
  background: rgba(0,0,0,0.3);
  color: #fff;
}

body.modern #reset-cookie {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.3);
}

body.modern #reset-cookie:hover {
  background: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.6);
}

/* ==============================
   TRANSITION STATES
   ============================== */
body.xp {
  background: #3a7bd5;
}

body.modern {
  overflow-y: auto;
  height: auto;
  background: #ffffff;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 600px) {
  #modal {
    width: 300px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .xp-icon {
    width: 60px;
  }

  .xp-icon-img {
    font-size: 26px;
  }

  .xp-icon-label {
    font-size: 9px;
  }
}
