/* ============================================================
   Data Factory OÜ — design system
   Dark premium + metallic silver accents
   ============================================================ */

:root {
  /* surfaces */
  --bg:            #0b0f14;
  --bg-2:          #0e1420;
  --surface:       rgba(255, 255, 255, 0.035);
  --surface-2:     rgba(255, 255, 255, 0.06);
  --hairline:      rgba(255, 255, 255, 0.09);
  --hairline-2:    rgba(255, 255, 255, 0.14);

  /* text */
  --text:          #e7ecf2;
  --text-soft:     #aab4c0;
  --text-dim:      #79838f;

  /* accent */
  --accent:        #5b8cff;
  --accent-2:      #7aa2ff;
  --accent-soft:   rgba(91, 140, 255, 0.14);

  /* metallic */
  --steel:         linear-gradient(135deg, #f4f7fb 0%, #c2cbd6 45%, #9aa6b4 72%, #6b7682 100%);

  /* type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* layout */
  --maxw: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(20px, 5vw, 48px);

  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 0 1px var(--hairline), 0 30px 70px -30px rgba(91, 140, 255, 0.35);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- ambient background ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(91, 140, 255, 0.16), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(154, 166, 180, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(1000px 700px at 50% -10%, #000 30%, transparent 75%);
          mask-image: radial-gradient(1000px 700px at 50% -10%, #000 30%, transparent 75%);
  pointer-events: none;
}

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
:where(section[id]) { scroll-margin-top: 84px; }

/* keyboard focus ring */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
:where(input, textarea, select):focus-visible { outline: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); opacity: 0.7; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.1; letter-spacing: -0.02em; margin: 14px 0 12px;
}
.section-head p { color: var(--text-soft); font-size: 1.06rem; margin: 0; }

.metal {
  background: var(--steel);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 15, 20, 0.55);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(11, 15, 20, 0.82); border-bottom-color: var(--hairline); }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 70px; }
/* brand lockup = metallic DF mark + wordmark, read as one logo */
.brand { display: inline-flex; align-items: center; gap: 11px; white-space: nowrap; flex: none; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--hairline-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 6px 16px -10px rgba(0, 0, 0, 0.8);
  transition: border-color .25s, transform .25s;
}
.brand:hover .brand-mark { border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.brand-mark img { width: 25px; height: auto; }
.brand-word { font-weight: 700; font-size: 1.12rem; letter-spacing: -0.025em; color: var(--text); }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--text-soft); font-size: 0.95rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

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

.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--hairline-2); border-radius: 999px; overflow: hidden;
  background: var(--surface);
}
.lang-toggle button {
  background: none; border: none; color: var(--text-dim);
  padding: 6px 12px; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  letter-spacing: 0.04em; transition: color .2s, background .2s;
}
.lang-toggle button.active { color: #0b0f14; background: var(--steel); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .18s, box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 10px 28px -12px rgba(91, 140, 255, 0.8);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(91, 140, 255, 0.9); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--hairline-2); }
.btn-ghost:hover { border-color: var(--text-dim); background: var(--surface-2); transform: translateY(-2px); }
.nav .btn { padding: 9px 18px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--hairline-2); border-radius: 10px; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: .25s; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(64px, 10vw, 120px) clamp(48px, 7vw, 90px); text-align: center; }
.hero-logo { height: clamp(46px, 7vw, 62px); width: auto; margin: 0 auto 24px; filter: drop-shadow(0 8px 24px rgba(0,0,0,.55)); }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05; letter-spacing: -0.03em; margin: 0 auto 22px; max-width: 14ch;
}
.hero .lead { color: var(--text-soft); font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 56ch; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px;
  padding: 7px 15px; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
  color: var(--text-soft); background: var(--surface); border: 1px solid var(--hairline);
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #38d39f; box-shadow: 0 0 0 4px rgba(56,211,159,.18); }

/* ---------- card grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
  overflow: hidden;
  transition: transform .3s, border-color .3s, background .3s;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(255,255,255,.18), transparent 40%);
  -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;
}
.card:hover { transform: translateY(-6px); border-color: var(--hairline-2); background: var(--surface-2); }
.card:hover::after { opacity: 1; }
.card .ico {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(91,140,255,.3); margin-bottom: 18px;
}
.card .ico svg { width: 24px; height: 24px; stroke: var(--accent-2); }
.card h3 { font-size: 1.25rem; margin: 0 0 10px; letter-spacing: -0.01em; }
.card p { color: var(--text-soft); margin: 0 0 16px; font-size: 0.97rem; }
.card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.card ul li { color: var(--text-soft); font-size: 0.92rem; padding-left: 24px; position: relative; }
.card ul li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px;
  border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2);
  transform: rotate(-45deg); border-radius: 1px;
}

/* ---------- training steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  padding: 26px 22px; position: relative; transition: transform .3s, border-color .3s;
}
.step:hover { transform: translateY(-5px); border-color: var(--hairline-2); }
.step .num {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em;
  display: inline-block; margin-bottom: 14px;
}
.step h4 { margin: 0 0 8px; font-size: 1.08rem; }
.step p { margin: 0; color: var(--text-soft); font-size: 0.92rem; }
.train-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text-soft); font-size: 0.9rem;
}
.chip strong { color: var(--text); font-weight: 600; }

/* ---------- why / stats ---------- */
.why { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  padding: 24px; text-align: left;
}
.stat .big { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stat .label { color: var(--text-dim); font-size: 0.88rem; margin-top: 8px; }
.why-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.why-list li { padding-left: 30px; position: relative; color: var(--text-soft); }
.why-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px;
  background: var(--accent-soft); border: 1px solid rgba(91,140,255,.35);
}
.why-list li::after {
  content: ""; position: absolute; left: 5px; top: 9px; width: 8px; height: 5px;
  border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg);
}

/* ---------- contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 18px; align-content: start; }
.contact-info .row { display: flex; gap: 14px; align-items: flex-start; }
.contact-info .row .ico {
  width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--hairline);
}
.contact-info .row .ico svg { width: 19px; height: 19px; stroke: var(--accent-2); }
.contact-info .label { font-size: 0.8rem; color: var(--text-dim); letter-spacing: 0.05em; text-transform: uppercase; }
.contact-info .val { color: var(--text); font-weight: 500; }
.contact-info a.val:hover { color: var(--accent-2); }

.form {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 30px; display: grid; gap: 16px; box-shadow: var(--shadow);
}
.field { display: grid; gap: 7px; }
.field label { font-size: 0.85rem; color: var(--text-soft); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; background: rgba(0,0,0,0.25); border: 1px solid var(--hairline-2); border-radius: 11px;
  color: var(--text); padding: 12px 14px; font-size: 0.96rem; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23aab4c0' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.hp { position: absolute; left: -9999px; opacity: 0; }
.form .btn { width: 100%; margin-top: 4px; }
.form-status { font-size: 0.92rem; min-height: 1.2em; }
.form-status.ok { color: #38d39f; }
.form-status.err { color: #ff7a8a; }
.form-note { color: var(--text-dim); font-size: 0.82rem; margin: 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding-block: 48px 36px; margin-top: 20px; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 30px; }
.footer .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.footer .brand-mark img { width: 22px; }
.footer-tag { color: var(--text-soft); max-width: 34ch; margin: 14px 0 0; font-size: 0.94rem; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin: 0 0 12px; }
.footer-col a, .footer-col p { display: block; color: var(--text-soft); font-size: 0.92rem; margin: 0 0 9px; }
.footer-col a:hover { color: var(--text); }
.footer-legal {
  border-top: 1px solid var(--hairline); padding-top: 22px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; color: var(--text-dim); font-size: 0.85rem;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .card, .step, .btn { transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .why { grid-template-columns: 1fr; gap: 32px; }
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 70px; left: 0; right: 0; margin: 0; padding: 14px var(--gutter) 22px;
    background: rgba(11,15,20,.97); border-bottom: 1px solid var(--hairline);
  }
  .nav-links.open a { padding: 10px 0; font-size: 1.05rem; }
}
@media (max-width: 620px) {
  /* declutter the nav: CTA lives in the menu + hero on small screens */
  .nav .nav-actions .btn-primary { display: none; }
}
@media (max-width: 680px) {
  .grid-3, .grid-2, .steps, .stats { grid-template-columns: 1fr; }
  .hero .btn { width: 100%; }
  .footer-top { flex-direction: column; }
}
