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

:root {
  --navy: #001F3F;
  --navy-light: #002B4F;
  --gold: #D4AF77;
  --gold-light: #F5E8C7;
  --white: #FFFFFF;
  --white-50: rgba(255,255,255,0.5);
  --white-80: rgba(255,255,255,0.8);
  --white-10: rgba(255,255,255,0.1);
  --gold-30: rgba(212,175,119,0.3);
  --gold-60: rgba(212,175,119,0.6);
  --red-400: #f87171;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, Cambria, 'Times New Roman', Times, serif;
  background: var(--navy);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: var(--gold);
  color: var(--navy);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* Hero */
#hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--navy-light), var(--navy));
}

#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,31,63,0.6), rgba(0,31,63,0.95));
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
}

#hero-content {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10rem 1.5rem 0;
  text-align: center;
  transform: translateY(0);
  transition: transform 0.1s linear;
}

#hero-title {
  font-size: clamp(3rem, 10vw, 10rem);
  font-weight: 400;
  letter-spacing: -8px;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: scale(0.8);
  animation: zoomIn 1.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

#hero-subtitle {
  font-size: clamp(1.5rem, 3vw, 4rem);
  font-weight: 300;
  color: var(--gold);
  margin-top: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s 0.5s ease forwards;
}

@keyframes zoomIn {
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Chat Toggle */
#chat-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 1rem;
  background: var(--gold);
  color: var(--navy);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 40px var(--gold-60);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chat-toggle:hover { transform: scale(1.1); }
#chat-toggle:active { transform: scale(0.95); }

/* Chat Panel */
#chat-panel {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 24rem;
  height: 32rem;
  border-radius: 1.5rem;
  border: 1px solid var(--gold-30);
  background: rgba(0,31,63,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(1rem) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#chat-panel.hidden { display: none; }

#chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--white-10);
}

#chat-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
}

#chat-close {
  background: none;
  border: none;
  color: var(--white-50);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

#chat-close:hover { color: var(--white); }

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#chat-placeholder {
  text-align: center;
  color: var(--white-50);
  font-size: 0.875rem;
  padding: 2rem 0;
}

#chat-loading {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--white-10);
  border-radius: 1rem;
  align-self: flex-start;
}

#chat-loading.hidden { display: none; }

.dot {
  width: 0.375rem;
  height: 0.375rem;
  background: var(--white-50);
  border-radius: 50%;
  animation: bounce 1.4s infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.msg {
  max-width: 80%;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: msgIn 0.2s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-user {
  align-self: flex-end;
  background: var(--gold);
  color: var(--navy);
}

.msg-assistant {
  align-self: flex-start;
  background: var(--white-10);
  color: var(--white-80);
}

#chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--white-10);
}

#chat-input {
  flex: 1;
  background: var(--white-10);
  border: none;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  color: var(--white);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: background 0.2s;
}

#chat-input::placeholder { color: var(--white-50); }
#chat-input:focus { background: var(--white-15); }
#chat-input:disabled { opacity: 0.5; }

#chat-send {
  background: var(--gold);
  border: none;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  color: var(--navy);
  font-weight: 500;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

#chat-send:hover { opacity: 0.9; }
#chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-error {
  text-align: center;
  color: var(--red-400);
  font-size: 0.75rem;
}

/* Contact Section */
#contact {
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, var(--navy), #000F1F);
}

#contact-inner {
  max-width: 36rem;
  margin: 0 auto;
}

#contact h2 {
  font-size: 2rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.5rem;
}

#contact p {
  text-align: center;
  color: var(--white-80);
  margin-bottom: 2rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contact-form input,
#contact-form select,
#contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold-30);
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder { color: var(--white-50); }

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  border-color: var(--gold);
}

#contact-form select option {
  background: var(--navy);
  color: var(--white);
}

#contact-form textarea { resize: vertical; min-height: 6rem; }

#turnstile-widget {
  margin: 0.5rem 0;
}

#contact-form button[type="submit"] {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 0.75rem;
  padding: 0.875rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

#contact-form button[type="submit"]:hover { opacity: 0.9; }
#contact-form button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

#contact-status {
  text-align: center;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

#contact-status.hidden { display: none; }
#contact-status.success { color: var(--gold); }
#contact-status.error { color: var(--red-400); }

/* Footer */
footer {
  padding: 2rem 1.5rem;
  text-align: center;
  background: #000F1F;
  color: var(--white-50);
  font-size: 0.875rem;
  line-height: 1.8;
}

footer p { margin: 0; }

/* Responsive */
@media (max-width: 640px) {
  #chat-panel {
    right: 1rem;
    left: 1rem;
    width: auto;
    height: 28rem;
  }

  #chat-toggle {
    bottom: 1rem;
    right: 1rem;
  }

  #hero-content { padding-top: 6rem; }
  #contact { padding: 3rem 1rem; }
}
