/* ═══════════════════════════════════════════════
   URSO CORE — Shared Design System
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=DM+Mono:wght@400;500&family=Outfit:wght@300;400;500;600&display=swap');

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

/* Safety net — no image escapes its container */
img { max-width: 100%; height: auto; }

:root {
  /* Core dark palette (base theme) */
  --black:     #050505;
  --dark:      #0c0c0c;
  --card:      #111111;
  --border:    #1e1e1e;
  --border2:   #2a2a2a;
  --gold:      #c9a84c;
  --gold2:     #e8c96a;
  --gold-dim:  rgba(201,168,76,0.12);
  --text:      #f0ece0;
  --muted:     #6b6560;
  --muted2:    #9a9488;
  --white:     #ffffff;
  --green:     #4fffb0;

  /* Expanded palette — "Ursocore Natural"
     bone (hueso), verde oscuro (green marble), dorado, blanco */
  --bone:       #efe6d4;   /* solid bone/hueso tone, matches bone-bg.jpg avg */
  --bone-soft:  #f6eedd;   /* lighter variant for sub-backgrounds */
  --bone-ink:   #3a3325;   /* dark text on bone */
  --bone-muted: #6b5f48;   /* secondary text on bone */
  --green-dark: #0f2a22;   /* deep marble-green section bg */
  --green-ink:  #d6c98a;   /* gold-ish text on green */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--black);
  color: var(--text);
  overflow-x: hidden;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  backdrop-filter: blur(16px);
  background: rgba(5,5,5,0.88);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}

nav.scrolled { padding: 12px 48px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600; color: #000; font-size: 18px;
}
.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 600;
  letter-spacing: 0.05em; color: var(--text);
}
.logo-text span { color: var(--gold); }

/* Image-based logo (replaces the old mark + text lockup) */
.logo-img {
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  max-width: 180px !important;
  display: block;
  object-fit: contain;
}

nav ul { display: flex; gap: 32px; list-style: none; align-items: center; }
nav ul a {
  text-decoration: none; color: var(--muted2);
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: color 0.2s;
}
nav ul a:hover, nav ul a.active { color: var(--gold); }

.nav-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: #000 !important;
  padding: 10px 20px; border-radius: 2px;
  font-weight: 600 !important; font-size: 13px !important;
  cursor: pointer; border: none;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.04em !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta-btn:hover { background: var(--gold2) !important; transform: translateY(-1px); }

/* Hamburger toggle — hidden on desktop, shown on ≤900px */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color 0.2s;
}
.nav-toggle:hover { border-color: var(--gold); }
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, background 0.2s;
}
.nav-toggle:hover span { background: var(--gold); }
.nav-toggle.open span:nth-child(1) { transform: translate(0, 7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translate(0, -7px) rotate(-45deg); }

/* ── BUTTONS ─────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #000;
  font-family: 'Outfit', sans-serif; font-weight: 600;
  font-size: 14px; padding: 16px 32px; border-radius: 2px;
  text-decoration: none; letter-spacing: 0.04em;
  transition: all 0.25s ease; border: none; cursor: pointer;
}
.btn-primary:hover {
  background: var(--gold2); transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,168,76,0.25);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted2); font-size: 14px;
  text-decoration: none; letter-spacing: 0.04em;
  transition: color 0.2s; background: none; border: none; cursor: pointer;
  font-family: 'Outfit', sans-serif;
}
.btn-ghost:hover { color: var(--gold); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted2); border: 1px solid var(--border2);
  padding: 15px 28px; border-radius: 2px;
  font-size: 14px; text-decoration: none;
  letter-spacing: 0.04em; transition: all 0.2s;
  background: none; cursor: pointer;
  font-family: 'Outfit', sans-serif;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── SECTION BASICS ──────────────────────────── */
section { padding: 100px 48px; }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 16px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 600; line-height: 1.1; margin-bottom: 20px;
}
.section-title em { font-style: italic; color: var(--gold); }

.section-sub {
  color: var(--muted2); font-size: 16px;
  font-weight: 300; line-height: 1.7; max-width: 520px;
}

/* ── FOOTER ──────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.footer-logo img {
  height: 36px !important;
  max-height: 36px !important;
  width: auto !important;
  max-width: 160px !important;
  display: block;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.footer-logo:hover img { opacity: 1; }

.footer-links {
  display: flex; gap: 28px; list-style: none;
}
.footer-links a {
  font-size: 12px; color: var(--muted);
  text-decoration: none; letter-spacing: 0.06em;
  text-transform: uppercase; transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 12px; color: var(--muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.05em; text-align: right;
}

/* ── DRAWER (WIZARD) ─────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(520px, 100vw);
  background: var(--dark);
  border-left: 1px solid var(--border2);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}

.drawer-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-style: italic;
}

.drawer-close {
  width: 36px; height: 36px;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 50%; color: var(--muted2);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.drawer-close:hover { border-color: var(--gold); color: var(--gold); }

.drawer-progress {
  height: 2px; background: var(--border);
  flex-shrink: 0;
}
.drawer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  transition: width 0.5s ease;
}

.drawer-body {
  flex: 1; overflow-y: auto; padding: 0;
}
.drawer-body::-webkit-scrollbar { width: 4px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* Chat inside drawer */
.wizard-messages {
  padding: 24px 28px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 100%;
}

.w-bubble { max-width: 90%; }
.w-bubble.bot { align-self: flex-start; }
.w-bubble.user { align-self: flex-end; }

.w-bubble-inner {
  padding: 12px 16px; border-radius: 12px;
  font-size: 14px; line-height: 1.6;
}
.w-bubble.bot .w-bubble-inner {
  background: var(--card); border: 1px solid var(--border2);
  border-bottom-left-radius: 3px; color: var(--text);
}
.w-bubble.user .w-bubble-inner {
  background: linear-gradient(135deg, var(--gold), #a8853a);
  border-bottom-right-radius: 3px; color: #000; font-weight: 600;
}

.w-options {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 28px 20px;
}
.w-opt {
  background: transparent; border: 1px solid var(--border2);
  color: var(--text); padding: 8px 16px; border-radius: 100px;
  font-family: 'Outfit', sans-serif; font-size: 13px;
  cursor: pointer; transition: all 0.2s;
}
.w-opt:hover, .w-opt.selected {
  background: var(--gold); border-color: var(--gold); color: #000;
}

.drawer-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center;
  flex-shrink: 0;
  background: var(--card);
}

.drawer-input {
  flex: 1; background: var(--dark);
  border: 1px solid var(--border2); border-radius: 100px;
  padding: 10px 18px; font-family: 'Outfit', sans-serif;
  font-size: 14px; color: var(--text); outline: none;
  transition: border-color 0.2s;
}
.drawer-input:focus { border-color: var(--gold); }
.drawer-input::placeholder { color: var(--muted); }
.drawer-input:disabled { opacity: 0.4; }

.drawer-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #000; font-weight: 700;
  transition: all 0.2s; flex-shrink: 0;
}
.drawer-send:hover { background: var(--gold2); transform: scale(1.08); }
.drawer-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* typing dots */
.typing-dots { display: flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted); animation: tdBounce 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Result inside drawer */
.wizard-result {
  padding: 20px 28px;
}
.result-tabs-mini {
  display: flex; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.rtab {
  flex: 1; padding: 10px 8px;
  background: transparent; border: none;
  color: var(--muted); font-family: 'Outfit', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.rtab.active { color: var(--gold); border-bottom-color: var(--gold); }
.rtab-content { display: none; }
.rtab-content.active { display: block; }

pre.code-out {
  font-family: 'DM Mono', monospace; font-size: 11px;
  line-height: 1.7; color: #b8f0c8;
  white-space: pre-wrap; word-break: break-word;
  background: rgba(0,0,0,0.4); border-radius: 8px;
  padding: 14px; max-height: 260px; overflow-y: auto;
}

.copy-mini {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border2);
  color: var(--muted); padding: 6px 14px; border-radius: 100px;
  font-family: 'Outfit', sans-serif; font-size: 12px;
  cursor: pointer; transition: all 0.2s;
}
.copy-mini:hover { border-color: var(--gold); color: var(--gold); }

/* ── REVEAL ANIMATION ────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── ANIMATIONS ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
@keyframes tdBounce {
  0%,80%,100%{transform:translateY(0);opacity:0.4}
  40%{transform:translateY(-6px);opacity:1}
}
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes shimmer {
  0%{background-position:-200% 0}
  100%{background-position:200% 0}
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — industry-standard breakpoints
   ≤480  small phone    (iPhone SE, compact Android)
   ≤900  phone + small tablet portrait (combined since layout already stacks here)
   ≤1024 tablet landscape / small laptop
   ≥1400 content-width cap for ultra-wide
   ═══════════════════════════════════════════════ */

/* TABLET (≤1024) — slightly reduced horizontal padding on heavy sections */
@media(max-width:1024px){
  nav { padding: 16px 32px; }
  section { padding: 88px 32px; }
  footer { padding: 36px 32px; }
}

/* MOBILE (≤900) — nav collapses to hamburger, grids stack, content tightens */
@media(max-width:900px){
  nav { padding: 14px 20px; }
  .nav-toggle { display: flex; }

  /* Mobile menu: dropdown from nav */
  nav ul {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5,5,5,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }
  nav ul.open {
    max-height: 480px;
    padding: 8px 20px 20px;
  }
  nav ul li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  nav ul li:last-child { border-bottom: none; padding-top: 18px; }
  nav ul a {
    display: block;
    font-size: 14px;
    padding: 4px 0;
  }
  .nav-cta-btn { width: 100%; justify-content: center; padding: 14px 20px; }

  .logo-img { height: 36px !important; max-height: 36px !important; max-width: 150px !important; }
  .footer-logo img { height: 32px !important; max-height: 32px !important; max-width: 140px !important; }

  section { padding: 72px 20px; }

  footer { grid-template-columns: 1fr; text-align: center; gap: 16px; padding: 28px 20px; }
  .footer-copy { text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }

  /* Wizard drawer fills viewport on mobile */
  .drawer { width: 100vw; }
}

/* SMALL PHONE (≤480) — iPhone SE / compact Android */
@media(max-width:480px){
  nav { padding: 12px 16px; }
  .logo-img { height: 30px !important; max-height: 30px !important; max-width: 130px !important; }
  .footer-logo img { height: 28px !important; max-height: 28px !important; max-width: 120px !important; }
  section { padding: 56px 16px; }
  footer { padding: 24px 16px; }
  .btn-primary { padding: 14px 24px; font-size: 13px; }
  .btn-outline { padding: 13px 22px; font-size: 13px; }
  .section-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
}

/* ULTRA-WIDE (≥1400) — cap readability */
@media(min-width:1400px){
  section { max-width: 1440px; margin-left: auto; margin-right: auto; }
}

/* ═══════════════════════════════════════════════
   CONTRAST SECTIONS — "bone" + "green-marble"
   Use sparingly, to break up the dark base theme.
   Apply .bone-section or .green-section on a <section>.
   ═══════════════════════════════════════════════ */
.bone-section {
  background: var(--bone) url('assets/bone-bg.jpg') center/cover no-repeat;
  color: var(--bone-ink);
  border-top: 1px solid rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: relative;
}
/* subtle veil to unify type legibility over photo texture */
.bone-section::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,252,244,0.55), rgba(255,252,244,0.25));
  pointer-events: none;
}
.bone-section > * { position: relative; z-index: 1; }
.bone-section .section-label { color: #8a6a1f; }
.bone-section .section-title { color: var(--bone-ink); }
.bone-section .section-title em { color: #8a6a1f; }
.bone-section .section-sub,
.bone-section p { color: var(--bone-muted); }

.green-section {
  background: var(--green-dark);
  color: var(--text);
  border-top: 1px solid rgba(201,168,76,0.15);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.green-section .section-title em,
.green-section .section-label { color: var(--green-ink); }

/* ═══════════════════════════════════════════════
   LLM TRUST LOGOS — shared row used across pages
   (hero-trust, ai-screens, llm-grid)
   ═══════════════════════════════════════════════ */
.llm-text-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--muted2);
  height: 22px; line-height: 1;
  padding: 0 4px;
}
.llm-text-badge::before {
  content: '✦';
  color: var(--gold);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════
   FINAL CTA — BONE MOMENT (reusable across pages)
   Drop on any page right before <footer>:
   <section class="final-cta">…</section>
   ═══════════════════════════════════════════════ */
.final-cta {
  padding: 140px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bone) url('assets/bone-bg.jpg') center/cover no-repeat;
  color: var(--bone-ink);
  border-top: 1px solid rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.final-cta::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 10%, rgba(255,252,244,0.65) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 90%, rgba(201,168,76,0.12) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,252,244,0.35), rgba(246,238,221,0.15));
  pointer-events: none;
}
.final-cta::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, transparent 48%, rgba(138,106,31,0.05) 50%, transparent 52%),
    linear-gradient(80deg, transparent 60%, rgba(138,106,31,0.03) 62%, transparent 64%);
  pointer-events: none;
}
.final-cta > * { position: relative; z-index: 1; }
.final-cta .section-label { color: #8a6a1f; }
.final-cta h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--bone-ink);
}
.final-cta h2 em { font-style: italic; color: #8a6a1f; }
.final-cta p {
  font-size: 16px;
  color: var(--bone-muted);
  font-weight: 400;
  max-width: 460px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.final-cta .btn-outline {
  color: var(--bone-ink);
  border-color: rgba(58,51,37,0.4);
}
.final-cta .btn-outline:hover {
  background: rgba(58,51,37,0.06);
  border-color: var(--bone-ink);
}
.final-cta .cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.final-cta .scarcity {
  margin-top: 24px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--bone-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.final-cta .scarcity strong { color: #8a6a1f; }

@media (max-width: 900px) {
  .final-cta { padding: 80px 20px; }
}
