/* ============================
   GLOBAL – Variables, Reset, Base
   ============================ */

/* ===== Custom Font Faces ===== */
@font-face {
  font-family: 'inHumane Serif';
  src: url('../fonts/inHumane Serif Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'inHumane Serif';
  src: url('../fonts/inHumane Serif Semi Bold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'inHumane Serif';
  src: url('../fonts/inHumane Serif Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Light palette */
  --bg: #FAFBFD;
  --bg-alt: #F0F2F8;
  --text: #1A1D2B;
  --text-muted: #6B7189;
  --text-light: #9DA3BD;
  /* Dark palette */
  --bg-dark: #1c1d22;
  --bg-dark-2: #1f2026;
  --bg-dark-3: #25262d;
  --text-dark: #E8EAF0;
  --text-dark-muted: #9197B3;
  --text-dark-light: #636A8A;
  /* Accent */
  --accent: #4F6EF7;
  --accent-light: #7B95FF;
  --accent-glow: rgba(79, 110, 247, .15);
  --gradient-1: linear-gradient(135deg, #5A7BFF 0%, #4F6EF7 50%, #4563E8 100%);
  --gradient-2: linear-gradient(135deg, #5A7BFF 0%, #4563E8 100%);
  --gradient-dark-section: linear-gradient(180deg, #1c1d22 0%, #1f2026 100%);
  /* Semantic */
  --green: #22C55E;
  --orange: #F59E0B;
  --red: #EF4444;
  /* Glass – light */
  --glass-bg: rgba(255, 255, 255, .65);
  --glass-border: rgba(255, 255, 255, .35);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, .06);
  /* Glass – dark */
  --glass-dark-bg: rgba(255, 255, 255, .04);
  --glass-dark-border: rgba(255, 255, 255, .08);
  --glass-dark-shadow: 0 8px 32px rgba(0, 0, 0, .3);
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .08);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, .1);
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  /* Typography */
  --ff: 'Sora', -apple-system, sans-serif;
  --ff-serif: 'Young Serif', Georgia, serif;
  --ff-display: 'inHumane Serif', Georgia, serif;
  --ff-mono: 'JetBrains Mono', monospace;
  /* Spacing */
  --section-pad: clamp(80px, 10vw, 140px);
  --container: 1200px;
  /* Transitions */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  /* prevent layout jump when scrollbar appears/disappears */
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== DARK SECTION BASE ===== */
.s-dark {
  background: var(--gradient-dark-section);
  color: var(--text-dark);
  position: relative;
}

.s-dark .eyebrow {
  color: var(--accent-light);
}

.s-dark .section-h2 {
  color: #fff;
}

.s-dark .section-sub {
  color: var(--text-dark-muted);
}

/* ===== LIGHT SECTION BASE ===== */
.s-light {
  background: var(--bg);
  color: var(--text);
}

.s-light .eyebrow {
  color: var(--accent);
}

.s-light .section-h2 {
  color: var(--text);
}

.s-light .section-sub {
  color: var(--text-muted);
}

/* Shared section typography */
.eyebrow {
  display: inline-block;
  font-family: var(--ff);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 640px;
}

/* Glass – light */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.glass-subtle {
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Glass – dark */
.glass-dark {
  background: var(--glass-dark-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-dark-shadow);
}

.glass-dark-subtle {
  background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius-md);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient-1);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-full);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 4px 20px rgba(79, 110, 247, .3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 110, 247, .4);
}

.btn-primary.btn-large {
  padding: 18px 42px;
  font-size: 1.05rem;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1.5px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-weight: 500;
  font-size: .95rem;
  border-radius: var(--radius-full);
  transition: all .3s var(--ease);
}

.btn-outline:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
  background: rgba(79, 110, 247, .08);
}

/* Light variant */
.s-light .btn-outline {
  border-color: rgba(26, 29, 43, .15);
  color: var(--text);
}

.s-light .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Chat Messages */
.msg {
  padding: 10px 16px;
  border-radius: 16px;
  font-size: .85rem;
  line-height: 1.5;
  max-width: 85%;
  animation: msgPop .3s var(--ease-bounce);
}

.msg-user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.msg-bot {
  background: rgba(255, 255, 255, .08);
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.s-light .msg-bot {
  background: rgba(0, 0, 0, .04);
  color: var(--text);
}

.msg-bot.companion-msg {
  background: rgba(79, 110, 247, .08);
}

@keyframes msgPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 18px;
  align-self: flex-start;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--text-dark-light);
  border-radius: 50%;
  animation: typingBounce .6s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: .15s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes typingBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: .4;
  }

  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Accent gradient text */
.accent-gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Orb background decorations */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-blue {
  background: rgba(79, 110, 247, .12);
}

.orb-purple {
  background: rgba(79, 110, 247, .08);
}

.orb-cyan {
  background: rgba(123, 149, 255, .06);
}

/* Selection */
::selection {
  background: var(--accent);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-dark-light);
  border-radius: 3px;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}

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

/* Magnetic pull — composable offset via CSS custom properties */
.btn-primary[style*="--mag-x"] {
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
}

.btn-primary[style*="--mag-x"]:hover {
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
}

/* Footer CTA: no upward jump on hover, only magnetic + glow */
.btn-primary.btn-large[style*="--mag-x"] {
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
}

.btn-primary.btn-large[style*="--mag-x"]:hover {
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
  box-shadow: 0 8px 30px rgba(79, 110, 247, .4);
}

/* Magnetic overrides .reveal.visible transform so both can coexist */
.btn-primary.reveal.visible[style*="--mag-x"] {
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
}

.btn-primary.reveal.visible[style*="--mag-x"]:hover {
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
  box-shadow: 0 8px 30px rgba(79, 110, 247, .4);
}

/* ===== Young Serif – Headings Only ===== */
.hero-h1,
.section-h2,
.uc-h3,
.sol-h3,
.cta-h2,
.resolve-text,
.uc-left .section-h2 {
  font-family: var(--ff-serif);
}

/* ── Young Serif headings: ×0.87 (except hero-h1 — user wants full size) ── */

.section-h2 {
  font-size: clamp(1.74rem, 3.48vw, 2.61rem);
}



.uc-h3 {
  font-size: clamp(1.22rem, 2.44vw, 1.74rem);
}

.sol-h3 {
  font-size: 1rem;
}

.cta-h2 {
  font-size: clamp(1.74rem, 3.05vw, 2.44rem);
}

.uc-left .section-h2 {
  font-size: clamp(1.57rem, 3.05vw, 2.26rem);
}

.resolve-text {
  font-size: clamp(1.39rem, 2.61vw, 2.09rem);
}

/* ── Sora elements: ×0.93 (7% wider than Outfit) ── */
.section-sub {
  font-size: .98rem;
}

.nav-links a {
  font-size: .73rem;
}

.nav-cta-btn {
  font-size: .7rem;
}

.uc-desc {
  font-size: .84rem;
}

.uc-pill {
  font-size: .73rem;
}

.uc-progress-label {
  font-size: .79rem;
}

.sol-desc {
  font-size: .76rem;
  color: #3d4258;
}

.sol-card-wide .sol-desc {
  font-size: .93rem;
}

.cta-sub {
  font-size: .93rem;
}

.uc-left .section-sub {
  font-size: .88rem;
}

.btn-primary {
  font-size: .88rem;
}

.btn-primary.btn-large {
  font-size: .98rem;
}

.btn-outline {
  font-size: .88rem;
}

/* ── Color fixes: darken light-gray text for Young Serif readability ── */
.nav-links a {
  color: #4a4f6a;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--text);
}

.section-sub {
  color: #4a4f6a;
}

.uc-desc {
  color: #1a1d2b;
}

.uc-progress-label {
  color: #2a2d3a;
}

.uc-progress-item.active .uc-progress-label {
  color: #0a0b10;
}

.uc-left .section-sub {
  color: #1e2130;
}

/* ── Color fixes: lighten text on dark backgrounds ── */
.s-dark .section-sub {
  color: #c8cde0;
}

.s-dark .eyebrow {
  color: var(--accent-light);
}

.cta-sub {
  color: #cdd1e6;
}

.navbar.navbar-dark .nav-links a {
  color: rgba(255, 255, 255, .75);
}

.navbar.navbar-dark .nav-links a:hover {
  color: #fff;
}

.navbar.navbar-dark .nav-links a.active {
  color: #fff;
}

/* ── inHumane Serif Bold for "One" in hero heading ── */
.hero-one {
  font-family: var(--ff-display);
  font-weight: 700;
}

/* ── inHumane Serif lowercase o ── */
.font-inhumane-lower {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: inherit;
  line-height: inherit;
  display: inline;
}