/* =============================================================
   OrecAI — shared design system
   ============================================================= */

:root {
  /* Palette ---------------------------------------------------- */
  --bg: #FAFAF8;
  --bg-alt: #FFFFFF;
  --bg-warm: #F4F3EF;
  --ink: #0A0A0A;
  --ink-soft: #5A5A57;
  --ink-line: #E6E4DE;

  --accent: #0066FF;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(0,102,255,.08);
  --accent-glow: rgba(0,102,255,.35);

  --cyan: #4CE5FF;
  --violet: #9966FF;
  --green: #00FF5E;

  /* Type --------------------------------------------------------*/
  --font-display: 'Clash Display', 'Inter', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;

  /* Layout ------------------------------------------------------*/
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  /* Motion ------------------------------------------------------*/
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* Reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Page transition (slide-up fade) ----------------------------- */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
main { animation: pageIn .6s var(--ease-out) both; position: relative; z-index: 1; }

/* Site spiral background (fixed, scroll-reactive on home) ----- */
.site-spiral {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.spiral-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.spiral-veil {
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 248, 0.84);
}

/* Container --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Type -------------------------------------------------------- */
.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.95;
  margin: 0;
}
.h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
.h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
}

.lead {
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.5;
}

/* Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .35s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 18px -8px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 18px 42px -10px var(--accent-glow), 0 0 0 6px var(--accent-soft);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--ink);
  color: var(--bg);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 8px 0;
  border-radius: 0;
}
.btn-ghost::after {
  content: "→";
  transition: transform .25s var(--ease);
}
.btn-ghost:hover::after { transform: translateX(4px); }

/* Nav --------------------------------------------------------- */
.nav {
  position: fixed;
  top: 14px;
  left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  width: min(calc(100% - 28px), 1180px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 22px;
  border-radius: var(--radius-pill);
  background: rgba(250, 250, 248, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(10,10,10,.06);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 30px -16px rgba(10,10,10,.18);
}
.nav-logo { color: var(--ink); display: inline-flex; height: 28px; align-items: center; }
.nav-logo svg { height: 26px; width: auto; }
.nav-links {
  display: flex;
  gap: 4px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.92rem;
  color: var(--ink);
  border-radius: var(--radius-pill);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { background: rgba(10,10,10,.04); }
.nav-links a[aria-current="page"] {
  background: rgba(10,10,10,.06);
  color: var(--ink);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: -2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.nav-cta { padding: 10px 20px; font-size: 0.9rem; }

.nav-burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--ink-line);
  align-items: center;
  justify-content: center;
}
.nav-burger span {
  position: relative;
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink);
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--ink);
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after  { top: 5px; }

@media (max-width: 880px) {
  .nav { top: 10px; }
  .nav-inner {
    grid-template-columns: 1fr auto;
    padding: 6px 6px 6px 16px;
  }
  .nav-inner > nav { display: none; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 200;
  transform: translateY(-100%);
  transition: transform .45s var(--ease-out);
  display: flex; flex-direction: column;
  padding: 22px var(--gutter);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.open { transform: translateY(0); }
.drawer-top { display: flex; justify-content: space-between; align-items: center; }
.drawer-close {
  width: 42px; height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink-line);
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.drawer-links {
  margin: 60px 0 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column;
  gap: 4px;
}
.drawer-links a {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 7vw, 3rem);
  letter-spacing: -0.03em;
  padding: 6px 0;
  color: var(--ink);
}
.drawer-cta { margin-top: auto; padding-top: 24px; }

/* Footer ------------------------------------------------------ */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(250, 250, 248, 0.66);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  padding: 90px 0 36px;
  border-top: 1px solid var(--ink-line);
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, transparent 25%, var(--accent) 50%, transparent 75%, transparent 100%);
  opacity: .65;
  filter: blur(0.5px);
}
.footer::after {
  content: "";
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  width: 220px; height: 4px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  filter: blur(8px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand { display: flex; flex-direction: column; gap: 18px; max-width: 320px; }
.footer-brand svg { height: 30px; width: auto; color: var(--ink); }
.footer-brand p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink); font-size: 0.95rem; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 70px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--ink-soft);
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
}

/* Reveal on scroll ------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .4s; }
[data-reveal-delay="6"] { transition-delay: .48s; }

/* Section utilities ------------------------------------------ */
section { padding: clamp(80px, 9vw, 140px) 0; position: relative; }
/* Sections stay transparent so the fixed spiral reads through */
.section-alt { background: transparent; }
.section-warm { background: transparent; }

.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 22px; }

/* Card -------------------------------------------------------- */
.card {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 24px 48px -28px var(--accent-glow);
}
.card-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  margin-bottom: 26px;
  position: relative;
}
.card-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  z-index: -1;
  filter: blur(8px);
}
.card:hover .card-icon::after { opacity: .6; }
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.card p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; line-height: 1.55; }

/* Light thread divider (blue thread between sections) -------- */
.thread {
  display: block;
  position: relative;
  height: 1px;
  background: var(--ink-line);
  margin: 0;
}
.thread::after {
  content: "";
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  width: 180px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  filter: blur(1px);
  opacity: .8;
}

/* Page hero (non-home) --------------------------------------- */
.page-hero {
  padding-top: 200px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: 80px; right: -150px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(60px);
  opacity: .3;
  pointer-events: none;
}
.page-hero .eyebrow { margin-bottom: 22px; }
.page-hero .h1 { max-width: 14ch; }
.page-hero .lead { margin-top: 28px; max-width: 56ch; }

/* CTA banner -------------------------------------------------- */
.cta-banner {
  background: transparent;
  text-align: center;
  padding: clamp(80px, 10vw, 140px) 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
}
.cta-banner .h-display { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 18ch; margin: 0 auto; }
.cta-banner .cta-actions { margin-top: 40px; display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Forms ------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Reduced motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .15s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Floating WhatsApp button (global, injected by shared.js)
   ============================================================ */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px -8px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  text-decoration: none;
}
.wa-float:hover, .wa-float:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 40px -10px rgba(37, 211, 102, 0.7), 0 6px 16px rgba(0, 0, 0, 0.22);
  outline: none;
}
.wa-float svg { width: 30px; height: 30px; display: block; }
.wa-float .wa-label {
  position: absolute;
  right: 70px;
  background: #0a0a0a;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.wa-float:hover .wa-label { opacity: 1; transform: translateX(0); }
@media (max-width: 600px) {
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .wa-float svg { width: 28px; height: 28px; }
  .wa-float .wa-label { display: none; }
}
