:root {
  --navy: #050507;
  --navy-soft: #0d0e12;
  --cream: #ececec;
  --cream-soft: #b6b8bf;
  --gold: #b8bec8;
  --gold-soft: #6f7783;
  --error: #e15c5c;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               sans-serif;
  background: radial-gradient(circle at top left, #171922 0, var(--navy) 40%, #010102 100%);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(140, 149, 173, 0.13) 0, transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(143, 151, 166, 0.14) 0, transparent 55%),
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.08) 0,
      transparent 22%,
      transparent 78%,
      rgba(255, 255, 255, 0.06) 100%
    );
  mix-blend-mode: soft-light;
  opacity: 0.7;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / Navigation */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom,
    rgba(4, 9, 20, 0.92),
    rgba(4, 9, 20, 0.80),
    transparent
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text span:first-child {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.brand-text span:last-child {
  font-size: 0.7rem;
  opacity: 0.72;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links a {
  opacity: 0.72;
  position: relative;
  padding-bottom: 0.2rem;
  transition: opacity 0.2s ease;
}

.nav-links a.nav-cta {
  opacity: 1;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.18s ease-out;
}

.nav-links a:hover {
  opacity: 1;
}

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

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.6);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
      background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.16),
        rgba(0, 0, 0, 0.02)
      );
  cursor: pointer;
  transition: all 0.18s ease-out;
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(0, 0, 0, 0.26);
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

/* Layout */

main {
  flex: 1;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  scroll-margin-top: 80px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  left: 1.5rem;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 190, 200, 0.6), transparent);
  pointer-events: none;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section--hero {
  padding-top: 4.5rem;
  padding-bottom: 4rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.6fr);
  gap: 3rem;
  align-items: center;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.section--visual {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

@media (max-width: 840px) {
  .nav-links {
    display: none;
  }
  .section--hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 3.5rem;
  }
}

.hero-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--cream-soft);
  margin-bottom: 0.9rem;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.45rem, 3.3vw + 1.5rem, 3.6rem);
  line-height: 1.06;
  margin-bottom: 1.1rem;
}

.hero-title span {
  color: var(--gold);
}

.hero-body {
  font-size: 0.96rem;
  max-width: 32rem;
  color: rgba(245, 242, 234, 0.82);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 15, 35, 0.9);
}

.hero-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-detail {
  font-size: 0.8rem;
  opacity: 0.82;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #0a0912;
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 16px 38px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(152, 160, 176, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 22px 46px rgba(0, 0, 0, 0.85),
    0 0 60px rgba(165, 173, 188, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--cream-soft);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-ghost:hover {
  background: rgba(8, 20, 51, 0.96);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* Hero right card */

.hero-card {
  background: radial-gradient(circle at top left, #273962 0, #07101f 52%, #040813 100%);
  border-radius: 1.6rem;
  padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  gap: 1rem;
}

.hero-card-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.82;
}

.hero-card-badge {
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(5, 16, 41, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.55);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.metric {
  padding: 0.9rem 0.95rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at top left, #1a2a4e 0, #050b17 55%, #050814 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
  border-color: rgba(0, 0, 0, 0.3);
}

.metric-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.7;
  margin-bottom: 0.55rem;
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 500;
}

.metric-sub {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 0.1rem;
}

.hero-steps {
  margin-top: 0.3rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  opacity: 0.9;
}

.hero-steps span {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(9, 20, 48, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.82;
}

.trade-visual {
  position: relative;
  border-radius: 1.6rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(10, 37, 84, 0.85);
}

.trade-visual img,
.trade-visual video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transform: scale(1.03);
  transform-origin: center;
}

.trade-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(1, 8, 24, 0.82),
    rgba(1, 8, 24, 0.3),
    rgba(0, 0, 0, 0.6)
  );
  display: flex;
  align-items: flex-end;
  padding: 1.3rem 1.6rem;
}

.trade-visual-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(188, 195, 208, 0.92);
  margin-bottom: 0.35rem;
}

.trade-visual-title {
  font-family: "Playfair Display", serif;
  font-size: 1.18rem;
  max-width: 24rem;
}

/* Services */

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.section-intro {
  max-width: 40rem;
  font-size: 0.92rem;
  opacity: 0.82;
  line-height: 1.7;
  margin-bottom: 2.1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 960px) {
  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: linear-gradient(145deg, #111d3a, #060b17);
  border-radius: 1.4rem;
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.75);
  border-color: rgba(0, 0, 0, 0.2);
}

.card-title {
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 0.55rem;
}

.card-body {
  font-size: 0.88rem;
  opacity: 0.82;
  line-height: 1.6;
}

.card-list {
  margin-top: 0.8rem;
  list-style: none;
  padding-left: 0;
}

.card-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.86rem;
  opacity: 0.9;
  margin-bottom: 0.35rem;
}

.card-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.9rem;
}

/* Process */

.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  margin-top: 1.5rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .process-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.step-list {
  list-style: none;
  padding-left: 0;
}

.step-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 1rem;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--gold);
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.86rem;
  opacity: 0.86;
  line-height: 1.6;
}

.process-note {
  font-size: 0.84rem;
  opacity: 0.8;
  margin-top: 0.8rem;
}

.process-card {
  background: radial-gradient(circle at top left, #222f51 0, #050a17 55%, #040713 100%);
  border-radius: 1.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

.process-card h4 {
  font-size: 0.96rem;
  margin-bottom: 0.5rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
  margin-bottom: 0.7rem;
}

.badge {
  font-size: 0.72rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 20, 49, 0.95);
  opacity: 0.9;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.2rem;
  margin-top: 1.6rem;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

form {
  display: grid;
  gap: 0.9rem;
}

label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.1rem;
  opacity: 0.86;
}

.field-group {
  display: flex;
  flex-direction: column;
}

input,
textarea {
  background: radial-gradient(circle at top, rgba(26, 44, 92, 0.75), rgba(4, 9, 22, 0.96));
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cream);
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: inherit;
  resize: vertical;
  min-height: 0;
}

input:focus,
textarea:focus {
  border-color: rgba(184, 190, 200, 0.95);
  box-shadow:
    0 0 0 1px rgba(184, 190, 200, 0.8),
    0 0 24px rgba(154, 162, 178, 0.35);
  background: radial-gradient(circle at top, rgba(35, 56, 112, 0.95), rgba(6, 14, 32, 0.98));
}

textarea {
  min-height: 130px;
}

.contact-details {
  font-size: 0.9rem;
  opacity: 0.86;
  line-height: 1.7;
}

.contact-details p + p {
  margin-top: 0.7rem;
}

.contact-grid a {
  color: var(--gold);
}

/* Representatives */

.section--representatives {
  padding-bottom: 2.6rem;
}

.rep-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.rep-card {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
  background: radial-gradient(circle at top left, #273962 0, #07101f 55%, #040813 100%);
  border-radius: 1.6rem;
  padding: 1.3rem 1.3rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.rep-photo-wrap {
  width: 220px;
  flex-shrink: 0;
  border-radius: 1.3rem;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.rep-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.02);
}

.rep-photo--timotheus {
  object-position: center 18%;
  transform: scale(1.12);
}

.rep-photo-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(184, 190, 200, 0.0) 0%,
    rgba(184, 190, 200, 0.14) 35%,
    rgba(184, 190, 200, 0.0) 65%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

.rep-info {
  padding-top: 0.3rem;
  min-width: 0;
}

.rep-name {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
}

.rep-role {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(188, 195, 208, 0.92);
  margin-bottom: 0.9rem;
}

.rep-bio {
  font-size: 0.92rem;
  opacity: 0.86;
  line-height: 1.7;
  max-width: 56ch;
  margin-bottom: 1rem;
}

.rep-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.rep-chip {
  font-size: 0.74rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 20, 49, 0.85);
  color: rgba(245, 242, 234, 0.92);
}

@media (max-width: 900px) {
  .rep-card {
    flex-direction: column;
    gap: 1rem;
  }

  .rep-photo-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .rep-photo {
    object-position: center top;
  }
}

/* Foundation */

.section--foundation {
  padding-top: 2rem;
}

.foundation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.3rem;
  margin-top: 1.2rem;
}

@media (max-width: 900px) {
  .foundation-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.foundation-card {
  background: linear-gradient(145deg, #12141c, #07080d);
  border-radius: 1.4rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.6);
}

.foundation-card h3 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.foundation-card p {
  font-size: 0.88rem;
  opacity: 0.88;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.foundation-card--accent {
  background: radial-gradient(circle at top left, #232631 0, #0a0b10 65%, #050507 100%);
}

.foundation-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.foundation-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.87rem;
  opacity: 0.9;
}

.foundation-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* Footer */

footer {
  padding: 1.8rem 1.5rem 2.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  opacity: 0.72;
}

.footer-inner span {
  white-space: nowrap;
}

.footer-inner a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ===== Chat Widget ===== */

#chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  font-family: "Inter", system-ui, sans-serif;
}

.chat-toggle {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1f2b 0%, #10121a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255,255,255,0.06) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--cream);
  margin-left: auto;
}

.chat-toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.6);
}

.chat-icon-chat,
.chat-icon-close {
  position: absolute;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chat-toggle .chat-icon-close       { opacity: 0; transform: scale(0.6) rotate(-45deg); }
.chat-toggle .chat-icon-chat         { opacity: 1; transform: scale(1) rotate(0deg); }
.chat-toggle--open .chat-icon-close  { opacity: 1; transform: scale(1) rotate(0deg); }
.chat-toggle--open .chat-icon-chat   { opacity: 0; transform: scale(0.6) rotate(45deg); }

/* Panel */
.chat-panel {
  position: absolute;
  bottom: 66px;
  right: 0;
  width: 348px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #14161f 0%, #0c0d12 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255,255,255,0.05) inset;
  overflow: hidden;
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-panel--hidden {
  opacity: 0;
  transform: scale(0.95) translateY(6px);
  pointer-events: none;
}

/* Header */
.chat-header {
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #21253a, #14161f);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cream-soft);
  flex-shrink: 0;
}

.chat-header-info   { flex: 1; min-width: 0; }
.chat-header-title  { font-size: 0.82rem; font-weight: 600; color: var(--cream); line-height: 1.2; }
.chat-header-sub    { font-size: 0.72rem; color: var(--gold-soft); margin-top: 2px; }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar       { width: 3px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }

.chat-msg {
  max-width: 86%;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  font-size: 0.835rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-msg--user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.09);
  color: var(--cream);
  border-bottom-right-radius: 3px;
}

.chat-msg--assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream-soft);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom-left-radius: 3px;
}

/* Typing dots */
.chat-msg--typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0.7rem 0.8rem;
}

.chat-msg--typing span {
  width: 5px;
  height: 5px;
  background: var(--gold-soft);
  border-radius: 50%;
  animation: chatDot 1.3s ease-in-out infinite;
}

.chat-msg--typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-msg--typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes chatDot {
  0%, 60%, 100% { transform: translateY(0);   opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1;   }
}

/* Input row */
.chat-form {
  padding: 0.65rem 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  display: flex;
  gap: 0.45rem;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  color: var(--cream);
  font-size: 0.835rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.chat-input:focus         { border-color: rgba(255, 255, 255, 0.18); }
.chat-input::placeholder  { color: var(--gold-soft); }
.chat-input:disabled      { opacity: 0.5; }

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-send:hover    { background: rgba(255, 255, 255, 0.14); }
.chat-send:disabled { opacity: 0.35; cursor: not-allowed; }

@media (max-width: 420px) {
  #chat-widget        { right: 1rem; bottom: 1rem; }
  .chat-panel         { width: calc(100vw - 2rem); right: -0.5rem; }
}

