/* ════════════════════════════════════════════════════════════════════
   RocSite Discovery — site-wide styles
   Brand: Navy #1B3A5C · Gold #C8A432 · White · Light Blue #EBF3FA
   Font: Inter for UI · Georgia for editorial
   Tone: Authoritative. Scientific. Accessible. Not academic-stuffy.
   ════════════════════════════════════════════════════════════════════ */

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

:root {
  --navy:         #1B3A5C;
  --navy-dark:    #122640;
  --navy-deep:    #0c1b2e;
  --gold:         #C8A432;
  --gold-soft:    #e6c765;
  --white:        #FFFFFF;
  --light-blue:   #EBF3FA;
  --sky:          #DCE9F5;

  --text:         #111a2b;
  --text-body:    #2a3446;
  --text-muted:   #5a6578;
  --text-faint:   #8794a8;

  --border:       #d8e2ec;
  --border-soft:  #e6edf4;
  --bg:           #ffffff;
  --bg-panel:     #f7fafc;

  --green:        #2f7d4f;
  --green-soft:   #e3f3ea;
  --amber:        #b5881f;
  --amber-soft:   #fbf2d9;
  --gray:         #6b7687;
  --gray-soft:    #eef1f5;
  --red:          #b4322d;

  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    16px;
  --shadow:       0 1px 2px rgba(17,26,43,.04), 0 4px 18px rgba(17,26,43,.06);
  --shadow-lg:    0 6px 28px rgba(17,26,43,.10);

  --ff-ui:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ff-serif:     Georgia, "Times New Roman", serif;
  --ff-mono:      ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

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

body {
  font-family: var(--ff-ui);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--navy); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { color: var(--text); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-family: var(--ff-serif); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-family: var(--ff-serif); font-weight: 700; }

p { color: var(--text-body); }
strong { color: var(--text); font-weight: 600; }

/* ═════════════  Nav  ═════════════ */

.nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  height: 66px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--ff-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.005em;
}
.nav-logo-mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  position: relative; flex-shrink: 0;
}
.nav-logo-mark::after {
  content: ""; position: absolute; inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold) 0%, var(--gold) 40%, transparent 41%);
}
.nav-logo-text small {
  display: block; font-family: var(--ff-ui);
  font-size: .66rem; font-weight: 500;
  color: var(--text-muted); letter-spacing: .12em; text-transform: uppercase;
  margin-top: -2px;
}
.nav-links {
  display: flex; gap: 1.8rem; align-items: center;
}
.nav-links a {
  font-size: .85rem; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .01em;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a.active { position: relative; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--gold);
}
.nav-cta {
  padding: .5rem 1rem;
  background: var(--navy); color: var(--white) !important;
  border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
}
.nav-cta:hover { background: var(--navy-dark); color: var(--white) !important; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 32px; height: 32px; color: var(--navy);
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--white);
    padding: 1rem 1.5rem 1.5rem; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.open .nav-links a {
    padding: .75rem 0; border-bottom: 1px solid var(--border-soft);
  }
  .nav.open .nav-links a.active::after { display: none; }
}

/* ═════════════  Page container  ═════════════ */

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3rem) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--gold);
}

/* ═════════════  Buttons  ═════════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .92rem; font-weight: 600; letter-spacing: .005em;
  font-family: var(--ff-ui);
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-soft); color: var(--navy-dark); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text-body); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1rem; }

/* ═════════════  Cards  ═════════════ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--sky); box-shadow: var(--shadow); }
.card-flat { background: var(--bg-panel); border: 1px solid var(--border-soft); }

/* ═════════════  Badges  ═════════════ */

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .65rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  font-family: var(--ff-ui);
}
.badge-confirmed { background: var(--green-soft); color: var(--green); }
.badge-exploratory { background: var(--amber-soft); color: var(--amber); }
.badge-pipeline { background: var(--gray-soft); color: var(--gray); }
.badge-confirmed::before,
.badge-exploratory::before,
.badge-pipeline::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* ═════════════  Forms  ═════════════ */

label {
  display: block; font-size: .85rem; font-weight: 500;
  color: var(--text); margin-bottom: .4rem;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="url"], textarea, select {
  width: 100%;
  padding: .7rem .9rem;
  font-family: var(--ff-ui); font-size: .95rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,58,92,.12);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.field { margin-bottom: 1.1rem; }
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field-hint { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }

/* ═════════════  Footer  ═════════════ */

.footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.78);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
  font-size: .9rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
  color: var(--white);
  font-family: var(--ff-ui);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer a {
  display: block; color: rgba(255,255,255,.72);
  padding: .25rem 0; font-size: .88rem;
}
.footer a:hover { color: var(--gold); }
.footer-brand p {
  color: rgba(255,255,255,.68);
  font-size: .88rem; line-height: 1.6; max-width: 30ch;
}
.footer-brand .nav-logo { color: var(--white); margin-bottom: .8rem; }
.footer-brand .nav-logo small { color: rgba(255,255,255,.55); }
.footer-bottom {
  padding-top: 1.8rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: .78rem; color: rgba(255,255,255,.55);
}
.disclaimer {
  padding: 1.2rem 1.4rem; margin-top: 1.5rem;
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: .82rem; line-height: 1.6; color: rgba(255,255,255,.75);
}

/* ═════════════  Tables / data  ═════════════ */

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
th { background: var(--bg-panel); font-weight: 600; color: var(--text); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
tr:hover td { background: var(--bg-panel); }

.mono { font-family: var(--ff-mono); font-size: .82em; letter-spacing: -0.01em; }

/* ═════════════  Chatbot widget (floating)  ═════════════ */

.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(17,26,43,.25);
  transition: transform .15s ease, background .15s ease;
}
.chat-fab:hover { background: var(--navy-dark); transform: scale(1.05); }
.chat-fab-dot {
  position: absolute; top: 10px; right: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--navy);
}
.chat-panel {
  position: fixed; right: 20px; bottom: 88px; z-index: 85;
  width: min(380px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 120px));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none; flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-head {
  padding: .9rem 1.1rem;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-head-title {
  font-family: var(--ff-serif); font-size: 1.02rem; font-weight: 700;
  display: flex; align-items: center; gap: .6rem;
}
.chat-head-title::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,164,50,.3);
  animation: pulse 2s ease-in-out infinite;
}
.chat-close {
  background: none; border: 0; color: var(--white); cursor: pointer;
  padding: .25rem; border-radius: var(--radius-sm); opacity: .75;
}
.chat-close:hover { opacity: 1; background: rgba(255,255,255,.1); }
.chat-body {
  flex: 1; overflow-y: auto;
  padding: 1.1rem; background: var(--bg-panel);
  display: flex; flex-direction: column; gap: .8rem;
}
.chat-msg { max-width: 86%; padding: .7rem .95rem; border-radius: 14px; font-size: .92rem; line-height: 1.55; }
.chat-msg.user { align-self: flex-end; background: var(--navy); color: var(--white); border-bottom-right-radius: 4px; }
.chat-msg.bot { align-self: flex-start; background: var(--white); color: var(--text-body); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg.bot a { color: var(--navy); text-decoration: underline; }
.chat-msg.system { align-self: center; font-size: .78rem; color: var(--text-muted); font-style: italic; }
.chat-msg.thinking { align-self: flex-start; color: var(--text-muted); font-style: italic; }
.chat-foot {
  border-top: 1px solid var(--border);
  padding: .7rem .85rem;
  background: var(--white);
  display: flex; gap: .5rem; align-items: flex-end;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .55rem .75rem;
  font-family: var(--ff-ui); font-size: .92rem;
  resize: none; min-height: 40px; max-height: 120px;
}
.chat-input:focus { outline: none; border-color: var(--navy); }
.chat-send {
  background: var(--navy); color: var(--white);
  border: 0; padding: .55rem .9rem; border-radius: 8px;
  font-size: .88rem; font-weight: 600; cursor: pointer;
}
.chat-send:disabled { background: var(--text-faint); cursor: not-allowed; }
.chat-foot-note {
  font-size: .7rem; color: var(--text-muted);
  text-align: center; padding: .5rem .85rem 0;
}
@media (max-width: 520px) {
  .chat-panel {
    right: 10px; left: 10px; bottom: 82px;
    width: auto; height: calc(100vh - 100px);
  }
  .chat-fab { right: 14px; bottom: 14px; }
}

/* ═════════════  Animations  ═════════════ */

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(200,164,50,.3); }
  50% { box-shadow: 0 0 0 6px rgba(200,164,50,.1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }

/* ═════════════  Utility  ═════════════ */

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2.5rem; }
.flex { display: flex; } .grid { display: grid; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; } .gap-4 { gap: 2rem; }
.hide-mobile { }
@media (max-width: 680px) { .hide-mobile { display: none; } }

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .28rem .7rem; border-radius: 999px;
  background: var(--light-blue); color: var(--navy);
  font-size: .75rem; font-weight: 600;
}

hr.rule { border: 0; height: 1px; background: var(--border); margin: 2.5rem 0; }

::selection { background: var(--gold); color: var(--navy-dark); }
