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

:root {
  --background: #ffffff;
  --foreground: hsl(240, 33%, 14%);
  --card: hsl(30, 25%, 95%);
  --card-foreground: hsl(240, 33%, 14%);
  --primary: hsl(220, 44%, 26%);
  --primary-foreground: hsl(40, 33%, 96%);
  --muted: hsl(222, 18%, 69%);
  --muted-foreground: hsl(222, 18%, 50%);
  --border: hsl(222, 18%, 85%);
  --nobis-navy: hsl(220, 44%, 26%);
  --nobis-navy-deep: hsl(220, 44%, 18%);
  --nobis-navy-light: hsl(220, 44%, 32%);
  --nobis-amber: hsl(40, 89%, 61%);
  --nobis-amber-hover: hsl(40, 89%, 55%);
  --nobis-beige: hsl(30, 25%, 95%);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 0.375rem;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--foreground); background: var(--background); line-height: 1.6; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: var(--font-body); }

.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== UTILITY ===== */
.text-light { color: var(--primary-foreground); }
.text-light-muted { color: hsla(40, 33%, 96%, 0.7); }

/* ===== SECTION BACKGROUNDS ===== */
.section-navy-light { background: var(--nobis-navy-light); color: var(--primary-foreground); position: relative; padding: 5rem 0 7rem; }
.section-navy-deep { background: var(--nobis-navy-deep); color: var(--primary-foreground); position: relative; padding: 5rem 0 7rem; }
.section-beige { background: var(--nobis-beige); position: relative; padding: 5rem 0 7rem; }
.section-white { background: var(--background); padding: 5rem 0 7rem; }
.section-inner { position: relative; z-index: 2; }
.section-grid { position: absolute; inset: 0; pointer-events: none; }

.geometric-grid {
  background-image:
    linear-gradient(30deg, hsla(220,44%,26%,0.04) 1px, transparent 1px),
    linear-gradient(150deg, hsla(220,44%,26%,0.04) 1px, transparent 1px),
    linear-gradient(270deg, hsla(220,44%,26%,0.03) 1px, transparent 1px);
  background-size: 60px 104px, 60px 104px, 120px 208px;
  opacity: 0.4;
}
.geometric-grid-light {
  background-image:
    linear-gradient(30deg, hsla(0,0%,100%,0.04) 1px, transparent 1px),
    linear-gradient(150deg, hsla(0,0%,100%,0.04) 1px, transparent 1px);
  background-size: 60px 104px;
  opacity: 0.1;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all 0.3s ease;
  padding: 1.25rem 0;
}
.navbar.scrolled {
  background: var(--nobis-navy);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  padding: 0.75rem 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo-link { display: flex; align-items: center; gap: 0.625rem; z-index: 10; }
.logo-img { height: 2.25rem; }
.logo-text { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.2em; color: var(--primary-foreground); font-family: 'Montserrat', sans-serif; }

.nav-desktop { display: none; align-items: center; gap: 2rem; }
@media (min-width: 1024px) { .nav-desktop { display: flex; } }

.nav-link {
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.05em;
  color: hsla(40,33%,96%,0.9); transition: color 0.2s; padding-bottom: 0.25rem; position: relative;
}
.nav-link:hover { color: var(--primary-foreground); }
.nav-link-underline::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
  background: var(--nobis-amber); transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s ease;
}
.nav-link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

.lang-toggle { display: flex; align-items: center; gap: 0.125rem; margin-left: 1rem; font-size: 0.875rem; }
.lang-sep { color: hsla(40,33%,96%,0.4); margin: 0 0.125rem; }
.lang-btn { padding: 0.25rem 0.5rem; border-radius: 4px; color: hsla(40,33%,96%,0.7); transition: color 0.2s; font-size: 0.875rem; }
.lang-btn:hover { color: var(--primary-foreground); }
.lang-btn.active { color: var(--nobis-amber); font-weight: 700; }

.btn-amber {
  background: var(--nobis-amber); color: var(--nobis-navy); font-weight: 600;
  padding: 0.625rem 1.25rem; border-radius: var(--radius); transition: background 0.2s;
  display: inline-block; text-align: center;
}
.btn-amber:hover { background: var(--nobis-amber-hover); }
.nav-cta { font-size: 0.875rem; padding: 0.625rem 1.25rem; }

.mobile-toggle { display: block; color: var(--primary-foreground); z-index: 10; }
@media (min-width: 1024px) { .mobile-toggle { display: none; } }
.icon-24 { width: 24px; height: 24px; }

.mobile-menu {
  display: none; position: fixed; inset: 0; background: var(--nobis-navy);
  flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  z-index: 5;
}
.mobile-menu.open { display: flex; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }
.mobile-link { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary-foreground); transition: color 0.2s; }
.mobile-link:hover { color: var(--nobis-amber); }
.mobile-lang { margin-top: 1rem; }
.mobile-cta { margin-top: 1rem; padding: 0.75rem 1.5rem; }

/* ===== HERO ===== */
.hero-section {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat;
  background-attachment: fixed;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, hsla(220,44%,18%,0.75), hsla(220,44%,26%,0.65));
}
.hero-grid { position: absolute; inset: 0; opacity: 0.3; }
.hero-content { position: relative; z-index: 10; text-align: center; max-width: 56rem; }
.hero-headline {
  font-size: clamp(2.25rem, 5vw, 4.5rem); font-weight: 600; color: var(--primary-foreground);
  margin-bottom: 1.5rem; line-height: 1.15;
}
.hero-headline .word {
  display: inline-block; margin-right: 0.3em; opacity: 0; transform: translateY(20px);
}
.hero-subhead {
  font-size: clamp(1rem, 1.5vw, 1.25rem); color: hsla(40,33%,96%,0.8);
  max-width: 48rem; margin: 0 auto 2.5rem; line-height: 1.7;
}
.hero-ctas { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
@media (min-width: 640px) { .hero-ctas { flex-direction: row; } }
.hero-cta-primary { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-outline {
  border: 2px solid hsla(40,33%,96%,0.4); color: var(--primary-foreground);
  font-weight: 600; padding: 0.875rem 2rem; border-radius: var(--radius);
  transition: border-color 0.2s; font-size: 1rem; display: inline-block; text-align: center;
}
.btn-outline:hover { border-color: var(--primary-foreground); }

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  animation: scrollBounce 2s infinite;
}
.scroll-mouse {
  width: 1.5rem; height: 2.5rem; border-radius: 9999px;
  border: 2px solid hsla(40,33%,96%,0.4); display: flex; justify-content: center; padding-top: 0.5rem;
}
.scroll-dot { width: 0.375rem; height: 0.75rem; border-radius: 9999px; background: var(--nobis-amber); }
@keyframes scrollBounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ===== SECTION HEADERS ===== */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: clamp(1.875rem, 3.5vw, 3rem); font-weight: 600; margin-bottom: 1rem; }
.section-subtitle { max-width: 42rem; margin: 0 auto; font-size: 1.125rem; }

/* ===== SERVICES ===== */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  background: hsla(40,33%,96%,0.05); backdrop-filter: blur(8px);
  padding: 1.5rem; border-radius: 2px; border-left: 3px solid var(--nobis-amber);
  transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -12px hsla(220,44%,26%,0.2);
}
.service-card-inner { display: flex; align-items: flex-start; gap: 1rem; }
.service-icon { flex-shrink: 0; margin-top: 0.25rem; color: var(--nobis-amber); }
.service-icon svg { width: 1.25rem; height: 1.25rem; }
.service-card h3 { font-size: 1.125rem; font-weight: 600; color: var(--primary-foreground); margin-bottom: 0.5rem; }
.service-card p { color: hsla(40,33%,96%,0.6); font-size: 0.875rem; line-height: 1.6; }

/* ===== WHY NOBIS ===== */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 56rem; margin: 0 auto; }
@media (min-width: 768px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
.why-item { display: flex; gap: 1rem; }
.why-icon {
  flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--nobis-navy); display: flex; align-items: center; justify-content: center;
}
.why-icon svg { width: 1.25rem; height: 1.25rem; color: var(--nobis-amber); }
.why-item h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.why-item p { color: var(--muted-foreground); font-size: 0.875rem; line-height: 1.6; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-quote {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-style: italic; color: var(--nobis-amber); margin-bottom: 2rem;
  border-left: 4px solid var(--nobis-amber); padding-left: 1.25rem;
}
.about-body { color: hsla(240,33%,14%,0.8); line-height: 1.7; }
.about-body p { margin-bottom: 1rem; }
.about-image { position: relative; }
.about-image img { border-radius: 2px; box-shadow: 0 20px 50px -12px rgba(0,0,0,0.25); width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.about-corner {
  position: absolute; bottom: -1rem; right: -1rem; width: 6rem; height: 6rem;
  border-bottom: 4px solid var(--nobis-amber); border-right: 4px solid var(--nobis-amber);
  border-radius: 0 0 2px 0;
}

/* ===== TEAM ===== */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
.team-card {
  background: hsla(40,33%,96%,0.05); backdrop-filter: blur(8px);
  border-radius: 2px; padding: 2rem; border: 1px solid hsla(40,33%,96%,0.1);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.team-card:hover {
  border-color: var(--nobis-amber); transform: translateY(-4px);
  box-shadow: 0 12px 40px -12px hsla(220,44%,26%,0.2);
}
.team-top { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .team-top { flex-direction: row; align-items: flex-start; } }
.team-photo {
  width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover;
  border: 3px solid hsla(40,89%,61%,0.3); flex-shrink: 0;
}
.team-info { text-align: center; }
@media (min-width: 640px) { .team-info { text-align: left; } }
.team-info h3 { font-size: 1.5rem; font-weight: 600; color: var(--primary-foreground); }
.team-info .team-role { color: var(--nobis-amber); font-size: 0.875rem; font-weight: 600; margin-top: 0.25rem; }
.team-info .team-creds { color: hsla(40,33%,96%,0.5); font-size: 0.75rem; margin-top: 0.25rem; }
.team-bio { color: hsla(40,33%,96%,0.7); font-size: 0.875rem; line-height: 1.6; margin-bottom: 1.5rem; }
.team-links { display: flex; align-items: center; gap: 1rem; }
.team-links a { color: hsla(40,33%,96%,0.6); transition: color 0.2s; }
.team-links a:hover { color: var(--nobis-amber); }
.team-links svg { width: 1rem; height: 1rem; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-form {
  background: var(--background); border-radius: 2px; padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--foreground); }
.form-group input, .form-group textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 2px;
  padding: 0.625rem 1rem; background: var(--background); color: var(--foreground);
  outline: none; transition: box-shadow 0.2s, border-color 0.2s; font-size: 0.875rem;
}
.form-group input:focus, .form-group textarea:focus {
  box-shadow: 0 0 0 2px var(--nobis-amber); border-color: transparent;
}
.form-group textarea { resize: none; }
.btn-full { width: 100%; padding: 0.75rem; font-size: 1rem; }

.form-success, .form-error { text-align: center; padding: 2.5rem; background: var(--background); border-radius: 2px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.success-icon { width: 4rem; height: 4rem; border-radius: 50%; background: hsla(40,89%,61%,0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.success-icon svg { width: 2rem; height: 2rem; color: var(--nobis-amber); }
.form-success p { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.form-error p { color: hsl(0,84%,60%); }

.contact-info { display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; }
.info-row { display: flex; align-items: center; gap: 1rem; }
.info-row a { transition: color 0.2s; }
.info-row a:hover { color: var(--nobis-amber); }
.icon-amber { flex-shrink: 0; color: var(--nobis-amber); }
.icon-amber svg { width: 1.25rem; height: 1.25rem; }
.info-bold { font-weight: 600; }
.info-muted { font-size: 0.875rem; color: var(--muted-foreground); }

/* ===== FOOTER ===== */
.footer { padding: 4rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
.footer-logo { justify-content: center; }
.footer-tagline { font-family: var(--font-display); font-size: 1.125rem; font-style: italic; color: hsla(40,33%,96%,0.7); max-width: 32rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; font-size: 0.875rem; }
.footer-links a { color: hsla(40,33%,96%,0.6); transition: color 0.2s; }
.footer-links a:hover { color: var(--nobis-amber); }
.footer-social a { color: hsla(40,33%,96%,0.6); transition: color 0.2s; }
.footer-social a:hover { color: var(--nobis-amber); }
.footer-social svg { width: 1.25rem; height: 1.25rem; }
.footer-rights { color: hsla(40,33%,96%,0.4); font-size: 0.75rem; }

/* ===== CHAT WIDGET ===== */
.chat-toggle {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--nobis-navy);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.chat-toggle:hover { transform: scale(1.05); }
.chat-icon-open svg { width: 1.5rem; height: 1.5rem; color: var(--nobis-amber); }
.chat-icon-close svg { width: 1.5rem; height: 1.5rem; color: var(--primary-foreground); }

.chat-panel {
  position: fixed; bottom: 6rem; right: 1.5rem; z-index: 200;
  width: 20rem; height: 28rem; background: var(--background);
  border-radius: 2px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 640px) { .chat-panel { width: 24rem; } }
.chat-header { background: var(--nobis-navy); padding: 1rem 1.25rem; flex-shrink: 0; }
.chat-header h3 { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--primary-foreground); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-placeholder { text-align: center; color: var(--muted-foreground); font-size: 0.875rem; padding: 2rem 0; }
.chat-msg {
  max-width: 80%; padding: 0.625rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg.user { margin-left: auto; background: var(--nobis-navy); color: var(--primary-foreground); }
.chat-msg.assistant { margin-right: auto; background: var(--card); color: var(--foreground); }
.chat-typing { margin-right: auto; background: var(--card); padding: 0.75rem 1rem; border-radius: 0.5rem; display: flex; gap: 0.25rem; }
.chat-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--muted-foreground); animation: chatBounce 1.4s infinite; }
.chat-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatBounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }

.chat-input-form { flex-shrink: 0; border-top: 1px solid var(--border); padding: 0.75rem; display: flex; gap: 0.5rem; }
.chat-input-form input {
  flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 2px;
  padding: 0.5rem 0.75rem; font-size: 0.875rem; color: var(--foreground); outline: none;
}
.chat-input-form input:focus { box-shadow: 0 0 0 2px var(--nobis-amber); }
.chat-send {
  background: var(--nobis-amber); color: var(--nobis-navy); padding: 0.5rem;
  border-radius: 2px; transition: opacity 0.2s;
}
.chat-send:disabled { opacity: 0.3; }
.chat-send svg { width: 1rem; height: 1rem; }

/* ===== ANIMATIONS (initial states for GSAP) ===== */
.anim-reveal, .anim-reveal-left, .anim-reveal-right, .anim-fade-up {
  opacity: 0;
}
.anim-reveal { transform: translateY(30px); }
.anim-reveal-left { transform: translateX(-30px); }
.anim-reveal-right { transform: translateX(30px); }
.anim-fade-up { transform: translateY(20px); }

/* Animation fallback — ensure content is visible if GSAP fails */
.anim-reveal,
.anim-fade-up,
.anim-reveal-left,
.anim-reveal-right {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
