/* Republiclabs AI App — design system */
:root {
  --bg-0: #07000f;
  --bg-1: #0e021c;
  --bg-2: #160630;
  --ink: #f7f1ff;
  --ink-2: #cfc2e6;
  --ink-3: #8e7ea8;
  --pink: #ff3da6;
  --purple: #8a2bff;
  --cyan: #2bd7ff;
  --gold: #ffd27a;
  --border: rgba(255,255,255,.08);
  --glass: rgba(255,255,255,.04);
  --grad: linear-gradient(135deg, #ff3da6 0%, #8a2bff 60%, #2bd7ff 110%);
  --grad-soft: linear-gradient(135deg, rgba(255,61,166,.18), rgba(138,43,255,.18));
  --shadow-lg: 0 30px 80px -20px rgba(138,43,255,.45);
  --radius: 22px;
  --radius-sm: 12px;
}
*,*::before,*::after { box-sizing: border-box; }
html, body { margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 700px at 80% -10%, rgba(255,61,166,.18), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(138,43,255,.25), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(43,215,255,.10), transparent 60%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* Type */
h1, h2 { font-family: 'Fraunces', 'Times New Roman', serif; font-weight: 700; letter-spacing: -0.02em; line-height: 1.06; margin: 0 0 .6em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
p { margin: 0 0 1em; color: var(--ink-2); }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.eyebrow {
  display: inline-flex; align-items:center; gap:.5rem;
  font-size: .78rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--ink-3); padding:.4rem .8rem;
  border:1px solid var(--border); border-radius: 999px;
  background: var(--glass); margin-bottom:1.2rem;
}
.gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap:.5rem; padding: .95rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; border: 1px solid var(--border);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  background: var(--glass); color: var(--ink);
}
.btn-primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 12px 40px -10px rgba(255,61,166,.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -10px rgba(255,61,166,.7); }
.btn-sm { padding:.6rem 1rem; font-size:.88rem; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Header */
.site-header { position: sticky; top:0; z-index: 50; backdrop-filter: blur(18px); background: rgba(8,0,20,.55); border-bottom: 1px solid var(--border); }
.nav-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding: 14px 0; }
.brand { display:inline-flex; align-items:center; gap:.55rem; font-weight:700; }
.brand-name { font-family: 'Fraunces', serif; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-dot { color: var(--pink); }
.brand-ai { background: var(--grad); -webkit-background-clip:text; background-clip:text; color: transparent; }
.primary-nav { display:flex; gap: 1.6rem; }
.primary-nav a { color: var(--ink-2); font-weight: 500; }
.primary-nav a:hover { color: var(--ink); }
.nav-toggle { display:none; background:none; border:0; flex-direction:column; gap:4px; cursor:pointer; padding:8px; }
.nav-toggle span { width:22px; height:2px; background: var(--ink); display:block; border-radius: 2px; }

/* Chat card (lives inside hero .orb-wrap) */
.chat-strip {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(20,8,30,.78), rgba(20,8,30,.92));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  box-shadow: 0 30px 80px -20px rgba(255,61,166,.45), 0 10px 40px -10px rgba(138,43,255,.35);
  overflow: hidden;
  z-index: 2;
}
.chat-wrap { padding: 18px; display:flex; flex-direction:column; gap: 12px; height: 100%; min-height: 0; }
.chat-head { display:flex; align-items:center; gap:.7rem; flex: 0 0 auto; }
.chat-avatar { position:relative; width: 40px; height: 40px; border-radius:50%; overflow:hidden; flex: 0 0 auto; }
.chat-avatar img { width:100%; height:100%; object-fit: cover; }
.chat-online { position:absolute; right:-1px; bottom:-1px; width:11px; height:11px; border-radius:50%; background:#39ffa6; border:2px solid var(--bg-0); }
.chat-meta { display:flex; flex-direction:column; line-height:1.15; }
.chat-meta strong { font-size:.95rem; }
.chat-meta span { font-size:.78rem; color: var(--ink-3); }
.chat-badge { margin-left:auto; font-size:.65rem; letter-spacing:.18em; text-transform:uppercase; color: var(--ink-3); padding:.25rem .6rem; border:1px solid var(--border); border-radius:999px; }
.chat-thread {
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; overflow-x: hidden;
  scroll-behavior: smooth;
  padding: 4px 4px 4px 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
  mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 8px), transparent 100%);
}
.chat-thread::-webkit-scrollbar { width: 6px; }
.chat-thread::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: .92rem; line-height: 1.4;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  animation: bubble .45s cubic-bezier(.2,.7,.2,1);
}
.chat-bubble.her { align-self: flex-start; border-bottom-left-radius: 6px; }
.chat-bubble img { display:block; border-radius:14px; margin-top:8px; max-width: 100%; width: 220px; height:auto; }
@keyframes bubble { from { transform: translateY(10px); opacity:0; } to { transform: none; opacity:1; } }
.chat-form { display:flex; gap:8px; flex: 0 0 auto; }
.chat-form input { flex:1; min-width:0; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--ink); padding: .75rem 1rem; border-radius: 999px; font: inherit; font-size:.9rem; }
.chat-form input::placeholder { color: var(--ink-3); }
.chat-send { width: 42px; height: 42px; border-radius:50%; border:0; background: var(--grad); color:#fff; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; flex: 0 0 auto; }

/* Make the orb-wrap a proper container for the chat card */
.orb-wrap { min-height: 520px; }
@media (max-width: 860px) {
  .orb-wrap { min-height: 480px; aspect-ratio: auto; }
}

/* Hero */
.hero { position:relative; padding: clamp(60px, 9vw, 110px) 0 clamp(50px, 7vw, 80px); overflow:hidden; }
.hero-grid { display:grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items:center; }
.hero h1 strong { font-weight: 800; }
.hero-cta { display:flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-meta { display:flex; gap: 1.6rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-meta div strong { font-family: 'Fraunces', serif; font-size: 1.6rem; display:block; color: var(--ink); }
.hero-meta div span { font-size:.82rem; color: var(--ink-3); }
.orb-wrap { position:relative; aspect-ratio: 1/1; }
.orb {
  position:absolute; inset:0; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #ff3da6 30%, #8a2bff 60%, #2a0050 100%);
  filter: blur(.5px); box-shadow: 0 40px 120px -20px rgba(255,61,166,.6), inset 0 -40px 80px rgba(0,0,0,.5);
  animation: float 8s ease-in-out infinite;
  transform-style: preserve-3d;
}
.orb::after {
  content:""; position:absolute; inset: 10%; border-radius:50%;
  background: radial-gradient(circle at 70% 70%, rgba(43,215,255,.6), transparent 60%);
  mix-blend-mode: screen; animation: spin 14s linear infinite;
}
.orb-ring { position:absolute; inset:-20px; border:1px dashed rgba(255,255,255,.15); border-radius:50%; animation: spin 30s linear infinite; }
.orb-ring.two { inset:-50px; border-color: rgba(255,61,166,.15); animation-duration: 55s; animation-direction: reverse; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Section */
.section { padding: clamp(60px, 8vw, 110px) 0; }
.section-title { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-title .eyebrow { margin-inline:auto; }

/* Models grid */
.models-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.model-card {
  position:relative; border-radius: var(--radius); overflow:hidden;
  background: var(--bg-1); border:1px solid var(--border);
  isolation:isolate; transition: transform .3s ease, box-shadow .3s ease;
}
.model-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.model-card img { aspect-ratio: 3/4; object-fit: cover; transition: transform .6s ease; }
.model-card:hover img { transform: scale(1.04); }
.model-card .overlay {
  position:absolute; inset:0; padding: 1rem 1.1rem 1.1rem; display:flex; flex-direction:column; justify-content:flex-end;
  background: linear-gradient(180deg, transparent 40%, rgba(7,0,15,.92) 100%);
}
.model-card h2 { font-size: 1.4rem; margin: 0 0 .15em; }
.model-card .meta { font-size: .82rem; color: var(--ink-3); margin-bottom: .4rem; }
.model-card .tag { font-size: .8rem; color: var(--pink); }
.model-card .chip { position:absolute; top: 12px; left: 12px; background: rgba(7,0,15,.6); backdrop-filter: blur(8px); padding: .35rem .7rem; font-size:.7rem; letter-spacing:.16em; text-transform:uppercase; border-radius: 999px; border:1px solid var(--border); }

/* Story blocks */
.story { display:grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin: 4rem 0; }
.story.reverse { direction: rtl; }
.story.reverse > * { direction: ltr; }
.story-img { border-radius: var(--radius); overflow:hidden; border:1px solid var(--border); box-shadow: var(--shadow-lg); }
.story-img img { aspect-ratio: 4/5; object-fit: cover; }

/* Features */
.features { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.feature {
  padding: 1.6rem; border-radius: var(--radius); border:1px solid var(--border);
  background: var(--glass); backdrop-filter: blur(8px);
  transition: transform .25s ease, border-color .25s ease;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(255,61,166,.4); }
.feature .ic { width:42px; height:42px; border-radius:12px; background: var(--grad-soft); display:inline-flex; align-items:center; justify-content:center; margin-bottom: 1rem; font-size: 1.3rem; }
.feature h2 { font-size: 1.15rem; margin-bottom: .4em; }
.feature p { color: var(--ink-2); font-size:.95rem; margin: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border:1px solid var(--border); border-radius: 16px; margin-bottom: .8rem; background: var(--glass); overflow:hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; display:flex; justify-content:space-between; align-items:center; font-weight: 600; font-family: 'Fraunces', serif; font-size: 1.05rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--pink); transition: transform .2s ease; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 1.3rem 1.2rem; color: var(--ink-2); margin: 0; }

/* Footer */
.site-footer { padding: 60px 0 30px; border-top: 1px solid var(--border); background: rgba(7,0,15,.6); margin-top: 60px; }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2rem; }
.footer-title { font-size: .85rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; font-family: 'Inter', sans-serif; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display:grid; gap: .6rem; }
.site-footer ul a { color: var(--ink-2); }
.site-footer ul a:hover { color: var(--ink); }
.footer-tagline { color: var(--ink-3); font-size: .9rem; }
.footer-bottom { display:flex; justify-content:space-between; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--ink-3); flex-wrap: wrap; gap: .5rem; }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(720px, 92%); background: rgba(14,2,28,.92); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 18px; padding: 1rem 1.2rem; z-index: 100; box-shadow: var(--shadow-lg); display: none; }
.cookie-banner.show { display: block; animation: slideUp .4s ease; }
@keyframes slideUp { from { opacity:0; transform: translate(-50%, 20px); } to { opacity:1; transform: translate(-50%, 0); } }
.cookie-inner { display:flex; gap: 1rem; align-items:center; justify-content:space-between; flex-wrap: wrap; }
.cookie-text { flex: 1; min-width: 240px; }
.cookie-text p { font-size: .88rem; margin:.3rem 0 0; }
.cookie-text a { color: var(--pink); text-decoration: underline; }

/* Page hero */
.page-hero { padding: clamp(80px, 12vw, 140px) 0 clamp(40px, 6vw, 70px); text-align: center; }
.page-hero .eyebrow { margin-inline: auto; }

/* Long-form content */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { margin-top: 2.2rem; font-size: 1.6rem; }
.prose ol { padding-left: 1.2rem; }
.prose ol li { margin: .5rem 0; color: var(--ink-2); }
.prose ol li strong { color: var(--ink); }

/* About specifics */
.stats { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 2.5rem 0; }
.stat { padding: 1.4rem; border:1px solid var(--border); border-radius: 18px; background: var(--glass); text-align:center; }
.stat strong { display:block; font-family: 'Fraunces', serif; font-size: 2.2rem; background: var(--grad); -webkit-background-clip:text; background-clip:text; color: transparent; }
.stat span { color: var(--ink-3); font-size:.85rem; letter-spacing: .1em; text-transform: uppercase; }
.timeline { max-width: 760px; margin: 3rem auto 0; position: relative; padding-left: 2rem; border-left: 2px dashed rgba(255,61,166,.3); }
.timeline-item { position:relative; padding: .4rem 0 2rem 1.2rem; }
.timeline-item::before { content:""; position:absolute; left:-2.42rem; top:.7rem; width: 14px; height:14px; border-radius:50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(255,61,166,.15); }
.timeline-item h2 { font-size: 1.1rem; margin: 0 0 .3em; font-family: 'Inter', sans-serif; font-weight: 600; }
.timeline-year { color: var(--pink); font-weight: 700; font-family: 'Fraunces', serif; }

/* Tag chips */
.chips { display:flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.chip {
  background: var(--glass); border:1px solid var(--border); padding:.4rem .8rem; border-radius:999px; font-size:.82rem; color: var(--ink-2);
}

/* Model detail page */
.model-hero { display:grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; padding: clamp(60px, 8vw, 100px) 0 60px; align-items:start; }
.model-hero-img { border-radius: var(--radius); overflow:hidden; border:1px solid var(--border); box-shadow: var(--shadow-lg); }
.model-hero-img img { aspect-ratio: 3/4; object-fit: cover; }
.model-hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.model-hero .tagline { color: var(--pink); font-size: 1.05rem; margin-bottom: 1.3rem; }

/* Contact */
.contact-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items:start; }
.contact-form { display:grid; gap: 1rem; }
.contact-form input, .contact-form textarea { background: rgba(255,255,255,.05); border:1px solid var(--border); color: var(--ink); border-radius: 12px; padding: .85rem 1rem; font: inherit; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-info { padding: 1.6rem; border:1px solid var(--border); border-radius: var(--radius); background: var(--glass); }

/* 404 */
.notfound { text-align:center; padding: 120px 0; }
.notfound h1 { font-size: 6rem; margin: 0; background: var(--grad); -webkit-background-clip:text; background-clip:text; color: transparent; }

/* Reveal on scroll */
.reveal { opacity:0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity:1; transform: none; }

/* Mobile */
@media (max-width: 880px) {
  .primary-nav { display: none; position: absolute; top: 100%; left:0; right:0; flex-direction:column; padding: 1rem 5%; background: rgba(8,0,20,.95); border-bottom: 1px solid var(--border); gap: .8rem; }
  .primary-nav.open { display:flex; }
  .nav-toggle { display:flex; }
  .hero-grid, .story, .model-hero, .contact-grid, .footer-grid { grid-template-columns: 1fr !important; gap: 2rem; }
  .story.reverse { direction: ltr; }
  .footer-bottom { flex-direction: column; align-items:flex-start; }
}
