/* ============================================================
   Danebis — landing styles
   Dark-first, electric violet accent, glass surfaces.
   ============================================================ */

:root {
  /* surfaces */
  --bg:            oklch(0.155 0.006 285);
  --bg-2:          oklch(0.185 0.007 285);
  --surface:       oklch(0.205 0.008 286);
  --surface-2:     oklch(0.235 0.009 286);
  --glass:         rgba(255, 255, 255, 0.024);
  --glass-2:       rgba(255, 255, 255, 0.045);

  /* borders / hairlines */
  --line:          rgba(255, 255, 255, 0.085);
  --line-strong:   rgba(255, 255, 255, 0.14);

  /* text */
  --fg:            oklch(0.975 0.004 286);
  --fg-muted:      oklch(0.74 0.012 286);
  --fg-dim:        oklch(0.58 0.012 286);

  /* accent — electric violet */
  --accent:        oklch(0.64 0.205 288);
  --accent-bright: oklch(0.72 0.19 290);
  --accent-deep:   oklch(0.52 0.2 287);
  --accent-soft:   oklch(0.64 0.205 288 / 0.14);
  --accent-line:   oklch(0.64 0.205 288 / 0.42);
  --cyan:          oklch(0.78 0.13 210);

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* layout */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient background field */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 72% -8%, oklch(0.64 0.205 288 / 0.08), transparent 60%),
    radial-gradient(700px 500px at 8% 4%, oklch(0.55 0.16 280 / 0.05), transparent 55%);
}

/* faint noise overlay — dithers the ambient gradients so they don't band */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#root { position: relative; z-index: 1; }

::selection { background: var(--accent-soft); color: var(--fg); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.section-title {
  font-size: clamp(30px, 4.4vw, 52px);
}
.section-lead {
  color: var(--fg-muted);
  font-size: clamp(16px, 1.5vw, 19px);
  max-width: 56ch;
  margin: 18px 0 0;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
section { position: relative; }
.section-pad { padding: clamp(80px, 11vw, 132px) 0; }

.head-block { max-width: 760px; }
.head-center { margin: 0 auto; text-align: center; }
.head-center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  color: white;
  border-color: oklch(0.78 0.19 290 / 0.6);
  box-shadow: 0 0 0 1px oklch(0.64 0.205 288 / 0.3), 0 10px 34px -10px oklch(0.64 0.205 288 / 0.75);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px oklch(0.7 0.2 290 / 0.5), 0 14px 44px -8px oklch(0.64 0.205 288 / 0.9);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--glass);
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--glass-2); border-color: var(--line-strong); }

.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 9px; }

/* ---------- glass card ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
}
.card-hover { transition: border-color .25s ease, background .25s ease, transform .25s ease; }
.card-hover:hover {
  border-color: var(--accent-line);
  background: var(--glass-2);
  transform: translateY(-3px);
}
/* glow-border on hover */
.card-glow::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--accent-line), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.card-glow:hover::after { opacity: 1; }

/* ---------- hairline divider tag ---------- */
.kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  background: var(--glass);
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* faint grid texture helper */
.grid-bg {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
}

/* focus ring */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   Layout grids + responsive
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* hero */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.hero-copy { min-width: 0; }
.hero-visual { min-width: 0; }

/* how-it-works steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step-cell { position: relative; }
.step-line {
  position: absolute; top: 23px; left: 58px; right: -28px; height: 1px;
  background: linear-gradient(90deg, var(--accent-line), var(--line) 70%, transparent);
}
.step-cell:last-child .step-line { display: none; }

/* integrations */
.integ-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.integ-card { width: 232px; text-align: left; }
.integ-arrow { display: inline-flex; padding: 0 6px; }

/* security */
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }

/* faq */
.faq-wrap { max-width: 860px; }

/* footer */
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }

.nav-mobile { display: none; }
.nav-drawer { display: none; }
@media (min-width: 981px) { .nav-drawer { display: none !important; } }

/* keyframes */
@keyframes dnb-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}
/* chat message entrance — transform-only slide so content is NEVER
   stuck invisible (opacity stays 1 even if the animation is paused/frozen). */
@keyframes dnb-msgin {
  from { transform: translateY(11px); }
  to   { transform: none; }
}
.msg-in { animation: dnb-msgin .45s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) { .msg-in { animation: none; } }

/* ---------- breakpoints ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { max-width: 520px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 28px; }
  .step-line { display: none; }
  .security-grid { grid-template-columns: 1fr; }
  .nav-desktop { display: none !important; }
  .nav-mobile { display: flex !important; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .integ-arrow { transform: rotate(90deg); }
  .integ-card { width: 100%; max-width: 340px; }
  .wrap { padding: 0 20px; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Auth / forms — shared by the signup + login Blade views
   (same tokens as the landing so everything feels like one product)
   ============================================================ */
.auth-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-header {
  padding: 22px clamp(20px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.auth-back {
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted);
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 13px;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.auth-back:hover { color: var(--fg); border-color: var(--line-strong); background: var(--glass); }
.auth-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 16px 20px 72px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.auth-card h1 { font-size: clamp(25px, 3.2vw, 33px); }
.auth-sub {
  color: var(--fg-muted);
  margin: 10px 0 26px;
  font-size: 15px;
  line-height: 1.55;
}

.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 7px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input:not([type]) {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .hint { color: var(--fg-dim); font-size: 12.5px; margin-top: 6px; }
.field-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--fg-muted);
}
.field-check input { width: auto; }

.btn-full { width: 100%; }
.btn-row { display: flex; gap: 10px; align-items: stretch; }
.btn-row .btn-primary,
.btn-row [type="submit"] { flex: 1; }

.plan-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.auth-alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.auth-alert.error {
  background: oklch(0.32 0.1 25 / 0.25);
  border: 1px solid oklch(0.55 0.16 25 / 0.5);
  color: oklch(0.85 0.09 25);
}
.auth-alert.ok {
  background: oklch(0.55 0.12 155 / 0.13);
  border: 1px solid oklch(0.62 0.14 155 / 0.45);
  color: oklch(0.88 0.14 155);
}

/* loading state for buttons (e.g. signup → Stripe Checkout redirect) */
.btn[disabled] { opacity: .6; cursor: default; pointer-events: none; }
.spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: dnb-spin .7s linear infinite;
}
@keyframes dnb-spin { to { transform: rotate(360deg); } }

/* ============================================================
   Legal / prose pages (aviso legal, privacidad, términos, cookies)
   ============================================================ */
.legal-page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.legal-main { flex: 1; padding: 8px 20px 64px; }
.legal-prose {
  max-width: 760px;
  margin: 0 auto;
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.7;
}
.legal-prose h1 { font-size: clamp(30px, 4vw, 42px); color: var(--fg); margin-bottom: 8px; }
.legal-prose h2 {
  font-size: 20px; color: var(--fg); margin: 38px 0 12px;
  display: flex; align-items: center; gap: 12px;
}
.legal-prose p { margin: 0 0 16px; }
.legal-prose ul { margin: 0 0 16px; padding-left: 22px; }
.legal-prose li { margin-bottom: 8px; }
.legal-prose strong { color: var(--fg); font-weight: 600; }
.legal-prose em { color: var(--fg-muted); }
.legal-prose a { color: var(--accent-bright); }
.legal-prose a:hover { text-decoration: underline; }
.legal-table-wrap { overflow-x: auto; margin: 0 0 20px; }
.legal-prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.legal-prose th, .legal-prose td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-prose thead th { color: var(--fg); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; border-bottom-color: var(--line-strong); }
.legal-prose td { color: var(--fg-muted); }
.legal-prose td strong { color: var(--fg); }
.legal-updated {
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim);
  margin-bottom: 36px !important;
}
.legal-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  color: var(--accent-bright); border: 1px solid var(--accent-line);
  border-radius: 5px; padding: 2px 8px;
}
.legal-foot {
  border-top: 1px solid var(--line);
  padding: 28px 20px;
  display: flex; flex-wrap: wrap; gap: 14px 20px;
  align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim);
}
.legal-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.legal-foot a { color: var(--fg-muted); }
.legal-foot a:hover { color: var(--fg); }

/* ============================================================
   Cookie consent banner (consent.js)
   ============================================================ */
.cc-banner {
  position: fixed; inset: auto 0 0 0; z-index: 6000;
  padding: 16px; display: flex; justify-content: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.cc-banner.cc-visible { opacity: 1; transform: none; pointer-events: auto; }
.cc-inner {
  width: 100%; max-width: 980px;
  background: oklch(0.255 0.012 286 / 0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid oklch(0.64 0.205 288 / 0.55); border-radius: 16px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .75), 0 0 40px -12px oklch(0.64 0.205 288 / 0.45);
  padding: 22px 24px;
  display: flex; gap: 40px; align-items: flex-start; justify-content: space-between;
}
.cc-text { min-width: 0; }
.cc-title { font-family: var(--font-display); font-size: 18px; color: var(--fg); margin: 0 0 6px; }
.cc-intro { font-size: 14px; color: var(--fg-muted); margin: 0 0 16px; line-height: 1.5; }
.cc-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-bottom: 14px; }
.cc-cat + .cc-cat { border-left: 1px solid var(--line); padding-left: 24px; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat-name { font-size: 14px; font-weight: 600; color: var(--fg); }
.cc-always { font-family: var(--font-mono); font-size: 11px; color: var(--accent-bright); }
.cc-cat-desc { font-size: 13px; color: var(--fg-muted); margin: 5px 0 0; line-height: 1.45; }
.cc-policy { display: inline-block; font-size: 13.5px; color: var(--accent-bright); }
.cc-policy:hover { text-decoration: underline; }
.cc-actions { display: flex; flex-direction: column; gap: 9px; flex-shrink: 0; min-width: 180px; }
.cc-toggle {
  width: 42px; height: 24px; border-radius: 20px; padding: 0; flex-shrink: 0;
  border: 1px solid oklch(1 0 0 / 0.28); background: oklch(0.45 0.006 286);
  position: relative; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.cc-toggle.on {
  background: var(--accent); border-color: var(--accent-line);
  box-shadow: 0 0 12px -2px oklch(0.64 0.205 288 / 0.7);
}
.cc-knob {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: left .2s cubic-bezier(.2, .7, .2, 1);
}
.cc-toggle.on .cc-knob { left: 20px; }
@media (max-width: 720px) {
  .cc-inner { flex-direction: column; gap: 16px; padding: 18px; }
  .cc-cats { grid-template-columns: 1fr; }
  .cc-cat + .cc-cat { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .cc-actions { flex-direction: row; flex-wrap: wrap; width: 100%; min-width: 0; }
  .cc-actions .btn { flex: 1 1 auto; }
}
