/* ==========================================================================
   Faber Labs – styles
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --indigo: #6366F1;
  --purple: #A855F7;
  --cyan: #22D3EE;
  --brand-gradient: linear-gradient(135deg, var(--purple) 0%, var(--indigo) 50%, var(--cyan) 100%);

  --bg: #F6F6F3;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #FFFFFF;
  --text: #17181C;
  --muted: #5C5F69;
  --subtle: #8A8D96;
  --border: rgba(23, 24, 28, 0.09);
  --border-strong: rgba(23, 24, 28, 0.16);
  --grid: rgba(23, 24, 28, 0.05);
  --header-bg: rgba(246, 246, 243, 0.72);
  --blob-opacity: 0.45;
  --shape-opacity: 0.55;
  --shadow: 0 1px 2px rgba(23, 24, 28, 0.04), 0 10px 30px rgba(23, 24, 28, 0.06);
  --shadow-hover: 0 2px 4px rgba(23, 24, 28, 0.05), 0 18px 40px rgba(99, 102, 241, 0.14);

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 68px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0E0F13;
  --surface: rgba(24, 25, 31, 0.66);
  --surface-strong: #17181E;
  --text: #E8E6E1;
  --muted: #A3A5AE;
  --subtle: #74767F;
  --border: rgba(232, 230, 225, 0.08);
  --border-strong: rgba(232, 230, 225, 0.16);
  --grid: rgba(232, 230, 225, 0.04);
  --header-bg: rgba(14, 15, 19, 0.7);
  --blob-opacity: 0.32;
  --shape-opacity: 0.45;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(99, 102, 241, 0.22);

  color-scheme: dark;
}

/* Bez JavaScriptu sa riadi systémovým nastavením */
@media (prefers-color-scheme: dark) {
  :root:not(.js) {
    --bg: #0E0F13;
    --surface: rgba(24, 25, 31, 0.66);
    --surface-strong: #17181E;
    --text: #E8E6E1;
    --muted: #A3A5AE;
    --subtle: #74767F;
    --border: rgba(232, 230, 225, 0.08);
    --border-strong: rgba(232, 230, 225, 0.16);
    --grid: rgba(232, 230, 225, 0.04);
    --header-bg: rgba(14, 15, 19, 0.7);
    --blob-opacity: 0.32;
    --shape-opacity: 0.45;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0;
}

p { margin: 0; }

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

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.container.narrow { max-width: 820px; }

@media (min-width: 640px) {
  .container { padding-inline: 24px; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 30px;
  height: 30px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.nav {
  display: none;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

@media (min-width: 760px) {
  .nav { display: flex; }
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (min-width: 760px) {
  .controls { margin-left: 8px; }
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem/1 var(--font-body);
  letter-spacing: 0.04em;
  padding: 8px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-switch button:hover { color: var(--text); }

.lang-switch button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.theme-toggle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle:active { transform: scale(0.94); }

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

/* Ikona ukazuje režim, na ktorý sa prepne */
.icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.icon-moon { opacity: 1; transform: none; }

:root[data-theme="dark"] .icon-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 40px) 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
}

.blob-1 {
  width: 520px; height: 520px;
  left: -8%; top: 4%;
  background: var(--purple);
}

.blob-2 {
  width: 480px; height: 480px;
  right: -6%; top: 18%;
  background: var(--cyan);
  opacity: calc(var(--blob-opacity) * 0.8);
}

.blob-3 {
  width: 560px; height: 420px;
  left: 30%; bottom: -12%;
  background: var(--indigo);
  opacity: calc(var(--blob-opacity) * 0.7);
}

/* Plávajúce tvary odvodené od znaku loga */
.shape {
  position: absolute;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  opacity: var(--shape-opacity);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.18);
  animation: float 9s ease-in-out infinite;
}

.shape-vertical {
  width: 64px; height: 220px;
  left: 9%; top: 26%;
  background: linear-gradient(180deg, var(--purple), var(--indigo));
  --r: -10deg;
}

.shape-top {
  width: 170px; height: 70px;
  right: 9%; top: 22%;
  background: linear-gradient(90deg, var(--indigo), var(--cyan));
  --r: 8deg;
  animation-delay: -3s;
}

.shape-small {
  width: 104px; height: 58px;
  right: 17%; bottom: 18%;
  background: var(--indigo);
  --r: -6deg;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-18px) rotate(calc(var(--r, 0deg) + 3deg)); }
}

@media (max-width: 720px) {
  .blob-1 { width: 320px; height: 320px; }
  .blob-2 { width: 300px; height: 300px; }
  .blob-3 { width: 340px; height: 280px; left: 10%; }
  .shape-vertical { width: 38px; height: 130px; left: 4%; top: 14%; }
  .shape-top { width: 104px; height: 42px; right: 4%; top: 15%; }
  .shape-small { width: 64px; height: 36px; right: 8%; bottom: 10%; }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.hero-title {
  margin-top: 28px;
  font-size: clamp(3.4rem, 13vw, 8.75rem);
  letter-spacing: -0.055em;
  word-spacing: 0.06em;
  line-height: 0.95;
  padding-bottom: 0.08em;
}

.hero-tagline {
  margin-top: 22px;
  max-width: 34ch;
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  color: var(--muted);
  line-height: 1.45;
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.hero-divider::before,
.hero-divider::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--border-strong);
}

@media (max-width: 480px) {
  .hero-divider { font-size: 0.75rem; }
  .hero-divider::before,
  .hero-divider::after { display: none; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--subtle);
  animation: bob 2.4s ease-in-out infinite;
}

.scroll-cue svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(23, 24, 28, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.3);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover { border-color: var(--indigo); }

.btn-lg {
  min-height: 52px;
  padding: 0 30px;
  font-size: 1rem;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(72px, 10vw, 120px);
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}

.section-head h2,
.contact-card h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--muted);
}

/* ---------- About ---------- */
.about { text-align: center; }

.about-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.about-note {
  margin-top: 24px;
  font-size: 0.9375rem;
  color: var(--subtle);
}

.about-note em {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.35);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.card p {
  margin-top: 10px;
  color: var(--muted);
}

.card .tags {
  margin-top: auto;
  padding-top: 22px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--subtle);
}

/* ---------- Process ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 600px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

.step {
  padding: 24px 4px 8px;
  border-top: 1px solid var(--border-strong);
}

.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step h3 {
  margin-top: 12px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.step p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 88px) 20px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 120%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 30% 50%, rgba(168, 85, 247, 0.22), transparent),
    radial-gradient(closest-side at 70% 50%, rgba(34, 211, 238, 0.18), transparent);
  filter: blur(30px);
}

.contact-card .lead { max-width: 40ch; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 32px 0 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 3.2vw, 1.375rem);
  letter-spacing: -0.01em;
  word-break: break-all;
  transition: color 0.2s ease;
}

.contact-email:hover { color: var(--indigo); }

.contact-email svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--indigo);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
  font-size: 0.875rem;
  color: var(--subtle);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.logo-sm .logo-mark { width: 24px; height: 24px; }
.logo-sm .wordmark { font-size: 1.05rem; color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.cards .reveal:nth-child(2),
.steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.cards .reveal:nth-child(3),
.steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps .reveal:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
