/* Dragenia — corporate site styles. Plain CSS, no build step. */

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Brand purple from Get Harder (#ae52e7). Fills, gradients and decoration use it
     as is; text, links and button fills use the darker shade of the same hue, which
     clears WCAG AA on white (about 6.4:1). */
  --accent: #ae52e7;
  --accent-strong: #8a30c1;
  --accent-strong-hover: #74259f;
  --accent-tile: #efe3fa;
  --accent-soft: #f8f3fd;
  --accent-soft-2: #ecdcfa;
  --gradient: linear-gradient(90deg, #8a30c1 0%, #ae52e7 100%);

  --text: #150b24;
  --text-muted: #5b5466;
  --text-soft: #3f3650;
  --bg: #fdfbff;
  --bg-alt: #f9f5fd;
  --surface: #ffffff;
  --border: #eee6f6;
  --border-card: #ece1f7;
  --border-input: #e2d8ec;

  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 20px;
  --radius-xl: 28px;
  --glow: 0 0 40px -10px rgba(138, 48, 193, 0.35);

  --container: 1200px;
  --gutter: 32px;
  --header-h: 76px;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}

p {
  margin: 0;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-s);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.text-gradient {
  background-image: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-lg {
  min-height: 56px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong-hover);
  color: #fff;
  box-shadow: var(--glow);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.btn:hover svg {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo:hover {
  color: var(--text);
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-list {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--accent-strong);
}

.nav .btn {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  margin: auto;
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded='true'] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .icon-close {
  display: block;
}

/* ---------- Sections ---------- */

.section {
  padding: 112px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 820px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-title {
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-title-xl {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-lead {
  max-width: 720px;
  margin: 20px auto 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.65;
}

.section-lead strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Hero ---------- */

.hero {
  padding: 120px 0 96px;
}

.hero-title {
  max-width: 1040px;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero-text {
  max-width: 600px;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 88px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.channels-title {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.channel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-s);
  background: var(--surface);
  font-size: 15px;
  font-weight: 700;
}

.channel svg {
  width: 18px;
  height: 18px;
  color: var(--accent-strong);
}

/* ---------- Cards ---------- */

.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-s);
  background: var(--accent-tile);
  color: var(--accent-strong);
}

.icon-tile svg {
  width: 22px;
  height: 22px;
}

.icon-tile-lg {
  width: 48px;
  height: 48px;
}

.icon-tile-lg svg {
  width: 24px;
  height: 24px;
}

.feature-grid,
.cards {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-l);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover,
.card:hover {
  border-color: rgba(138, 48, 193, 0.3);
  box-shadow: var(--glow);
}

.feature-card {
  padding: 28px;
  background: var(--accent-soft);
}

.card {
  padding: 32px 28px;
  background: var(--surface);
}

.feature-card h3,
.card h3 {
  margin-top: 22px;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.card h3 {
  margin-top: 26px;
  font-size: 21px;
}

.feature-card p,
.card p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Process ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
}

.step-num {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border-radius: var(--radius-m);
  background: var(--accent-tile);
  color: var(--accent-strong);
  font-size: 22px;
  font-weight: 800;
}

.step-num::before {
  content: counter(step, decimal-leading-zero);
}

.step h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
}

.step p {
  max-width: 250px;
  margin: 10px auto 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Contact ---------- */

.section-contact {
  padding-top: 0;
}

.contact-panel {
  padding: 72px 64px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  background: var(--accent-soft);
}

.contact-panel .section-head {
  margin-bottom: 48px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr);
  gap: 48px;
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 28px;
  margin: 8px 0 0;
}

.contact-details dt {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-details dd {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.contact-details a {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 36px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-l);
  background: var(--surface);
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 14px;
  font-weight: 700;
}

.field .optional {
  color: var(--text-muted);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft-2);
}

.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: #c0392b;
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-strong);
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  grid-column: 1 / -1;
}

.form-status {
  font-size: 15px;
  font-weight: 600;
}

.form-status.is-error {
  color: #b3261e;
}

.form-status.is-success {
  color: #1d7a3a;
}

.form .btn:disabled {
  cursor: progress;
  opacity: 0.75;
}

/* Spam honeypot (people never see or fill it) and the Cloudflare Turnstile slot.
   Both stay out of the grid flow, so the form keeps its original layout; the
   Turnstile slot joins the layout only when the widget needs the visitor. */
.form-hp,
.form-turnstile.is-idle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-turnstile,
.form noscript {
  grid-column: 1 / -1;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 64px 0 36px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 0.8fr);
  gap: 48px;
}

.footer-about {
  max-width: 300px;
  margin-top: 16px;
  color: var(--text-muted);
}

.footer-title {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  color: var(--text-muted);
}

.legal-details dt {
  color: var(--text);
  font-weight: 600;
}

.legal-details dd {
  margin: 0;
}

.footer-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Legal pages ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.legal-hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.legal-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.035em;
}

.legal-hero .updated {
  margin-top: 16px;
  color: var(--text-muted);
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  gap: 64px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 120px;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 14px;
}

.legal-toc-title {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--border);
  color: var(--text-soft);
  line-height: 1.4;
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--accent-strong);
}

.legal-toc a[aria-current='true'] {
  border-left-color: var(--accent-strong);
  color: var(--accent-strong);
  font-weight: 700;
}

.legal h2 {
  margin: 56px 0 16px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p,
.legal li {
  color: #3b3544;
}

.legal p + p {
  margin-top: 14px;
}

.legal ul {
  margin: 14px 0 0;
  padding-left: 22px;
}

.legal li + li {
  margin-top: 8px;
}

.legal-box {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-l);
  background: var(--accent-soft);
}

.legal-box + p {
  margin-top: 20px;
}

.legal-box .legal-details {
  gap: 10px 24px;
  color: #3b3544;
}

.legal-box .legal-details dd {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Reveal on scroll ----------
   Mirrors the reference site: blocks rise 20px and fade in once when they enter
   the viewport; cards in a group follow one another (delay set by main.js from
   data-stagger). The hero text rises 40px on load, the CTA fades in after it.
   Applies only when JS has marked the page (.js); otherwise nothing is hidden. */

.js [data-reveal],
.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--reveal-delay, 0s);
}

/* Above the fold: a load animation (no observer needed), ending fully visible. */
.js [data-reveal='hero'] {
  animation: reveal-up-lg 0.8s ease-out both;
}

.js [data-reveal='fade'] {
  transform: none;
  animation: reveal-fade 0.5s ease-out 0.8s both;
}

@keyframes reveal-up-lg {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes reveal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.js .is-visible,
.reveal-all [data-reveal],
.reveal-all [data-stagger] > * {
  opacity: 1;
  transform: none;
}

/* Card hover still needs its own quick transition once revealed. */
.js [data-stagger] > .is-visible {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color 0.25s, box-shadow 0.25s;
  transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s), 0s, 0s;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 48px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .legal-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 48px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 68px;
    --gutter: 24px;
  }

  .nav-toggle {
    display: grid;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 12px var(--gutter) 28px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 16px 24px rgba(21, 11, 36, 0.06);
  }

  .nav.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 18px;
  }

  .nav .btn {
    min-height: 52px;
  }

  .section {
    padding: 88px 0;
  }

  .section-contact {
    padding-top: 0;
  }

  .hero {
    padding: 72px 0 72px;
  }

  .channels {
    margin-top: 64px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-panel {
    padding: 48px 32px;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .section-head {
    margin-bottom: 44px;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-toc {
    display: none;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .section-contact {
    padding-top: 0;
  }

  .hero {
    padding: 56px 0 56px;
  }

  .hero-text {
    margin-top: 24px;
    font-size: 17px;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .channels {
    margin-top: 48px;
    padding-top: 24px;
  }

  .channel {
    padding: 9px 14px;
    font-size: 14px;
  }

  .section-lead {
    font-size: 16px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card,
  .card {
    padding: 24px 22px;
  }

  .steps {
    gap: 32px 16px;
  }

  .step-num {
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    font-size: 18px;
  }

  .step h3 {
    font-size: 17px;
  }

  .step p {
    font-size: 14px;
  }

  .contact-panel {
    margin: 0 -4px;
    padding: 36px 16px;
    border-radius: 24px;
  }

  .form {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }

  .form-footer .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .legal-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .legal-details dd {
    margin-bottom: 10px;
  }

  .legal-box {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .js [data-reveal],
  .js [data-stagger] > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
