/* todue — apex landing page */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1 0 auto;   /* main rastie a vypĺňa zvyšok výšky → footer sticky pri spodku */
}
body > footer,
body > .t-stripe {
  flex: 0 0 auto;
}

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

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

/* ─── Layout ─── */

.t-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── Header ─── */

.t-header {
  padding: 24px 0;
}
.t-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.t-header__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Tagline rotator v header */
.t-header__tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
}
.t-header__tagline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: color 220ms var(--ease);
}
.t-header__tagline-icon svg { width: 100%; height: 100%; }
.t-header__tagline-text {
  display: inline-block;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  vertical-align: baseline;
}

/* Out — celý tagline (ikonka + text) fadne spolu cez 0.5 s */
.t-header__tagline.is-fading {
  animation: t-tagline-fade-out 500ms var(--ease) forwards;
}
@keyframes t-tagline-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Icon entrance — port z AE (Lottie data.json, comp 60fps × 44 frames = 733ms)
   Scale a opacity majú rôzne bezier krivky → dve oddelené animácie */
@keyframes t-claim-icon-pop-scale {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
@keyframes t-claim-icon-pop-opacity {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.t-claim-icon-anim {
  animation:
    t-claim-icon-pop-scale   733ms cubic-bezier(0.242, 1.958, 0.667, 1) both,
    t-claim-icon-pop-opacity 733ms cubic-bezier(0.167, 0.167, 0.211, 1) both;
  transform-origin: center center;
}

/* Caret pre typewriter — CSS-drawn bar (vyzerá ako underscore, ale bez font-glyph
   metrík → neovplyvňuje baseline ani line-height)
   margin-left: 0 → cursor ostáva v polohe kde sa zjaví prvý znak (žiadny left-jump) */
.t-header__tagline-text.is-typing::after {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 2px;
  background: currentColor;
  vertical-align: baseline;
  animation: t-caret-blink 0.7s steps(1) infinite;
}
@keyframes t-caret-blink {
  0%, 50%      { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (max-width: 600px) {
  .t-header__tagline { font-family: var(--font-display); font-size: 13px; gap: 8px; }
  .t-header__tagline-icon { width: 18px; height: 18px; }
}

/* ─── Hero ─── */

.t-hero {
  padding: 88px 0 72px;
  text-align: center;
}

.t-hero__logo {
  margin: 0 auto 64px;
  display: flex;
  justify-content: center;
}

.t-hero__wordmark {
  height: clamp(80px, 11vw, 128px);
  width: auto;
  color: var(--text-primary);
}

.t-hero__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 57px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 auto 6px;
  max-width: 20ch;
  color: var(--text-primary);
}

.t-hero__subline {
  font-family: var(--font);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 auto 56px;
  max-width: 42ch;
}

.t-hero__micro {
  font-size: 13px;
  color: var(--text-muted);
  margin: 22px auto 0;
  letter-spacing: 0.01em;
}

.t-hero__cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.t-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.t-btn--primary {
  background: var(--product-primary);
  border-color: var(--product-primary);
  color: #fff;
}
.t-btn--primary:hover { background: var(--product-primary-hover); border-color: var(--product-primary-hover); }

.t-btn--ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.t-btn--ghost:hover { background: var(--bg-hover); border-color: var(--border-strong); }

.t-btn--icon {
  padding: 10px;
  border-radius: var(--r-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.t-btn--icon:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text-primary); }

/* ─── Features ─── */

.t-features {
  padding: 80px 0 48px;
}
.t-features__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.t-features__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.t-features__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.t-features__title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
}
.t-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: inherit;
}
.t-word__inner {
  display: inline-block;
  will-change: transform;
}
.t-word-slide {
  display: inline-block;
  will-change: transform, opacity;
}
.t-feature {
  will-change: transform, opacity;
}

/* Button text swap — grid stack: oba texty na rovnakej cell, width = max(currentWidth, altWidth). */
.t-btn__label {
  display: inline-grid;
  grid-template-areas: "stack";
  overflow: hidden;
  vertical-align: middle;
  line-height: 1.2;
}
.t-btn__text {
  grid-area: stack;
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}
/* Alt text default neviditeľný — JS ho hneď postaví pod hranu cez yPercent + opacity 1. */
.t-btn__text--alt { opacity: 0; }

/* Skrytý scrollbar — page sa dá scrollovať cez Lenis (smooth), ale scrollbar nevidno. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; }

/* Hero entrance — reserve height aby sa layout pri typewriter / scale-in nehýbal. */
.t-hero__headline { min-height: 1.1em; }
.t-hero__subline { min-height: 1.5em; }
.t-hero__cta-row { min-height: 48px; }
.t-features__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
.t-features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.t-feature {
  border: 0;
  border-radius: var(--r-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #fff;
}
.t-feature--blue   { background: var(--brand-blue); }
.t-feature--green  { background: var(--brand-green); }
.t-feature--yellow { background: var(--brand-yellow); }
.t-feature--red    { background: var(--brand-red); }

.t-feature__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
  margin-bottom: 4px;
}
.t-feature__badge svg { width: 100%; height: 100%; }

.t-feature__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 0;
  color: #fff;
}
.t-feature__body {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Doc page (privacy / terms) ─── */

.t-doc {
  padding: 32px 0 64px;
}
.t-doc__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.t-doc__brand {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
}
.t-doc__brand svg { height: 32px; width: auto; }
.t-doc__back {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 8px 14px;
  border-radius: var(--r-full);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.t-doc__back:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.t-doc__article {
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 36px 40px 28px;
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.65;
}
.t-doc__article h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.t-doc__stripe {
  height: 2px;
  width: 100%;
  margin: 0 0 26px;
  background-image: url('./todue-stripes.svg');
  background-repeat: no-repeat;
  background-size: 100% 2px;
}
.t-doc__article h2 {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.t-doc__article p,
.t-doc__article li {
  margin: 8px 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.t-doc__article ul {
  margin: 8px 0 14px;
  padding-left: 22px;
}
.t-doc__article a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.t-doc__article a:hover { color: var(--brand-green); }
.t-doc__article strong { color: var(--text-primary); }
.t-doc__meta {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .t-doc__article { padding: 24px 22px 20px; }
}

/* Background deco — todue mark, big, rotated 30° CCW, scroll-bound, 300px nad footer */
.t-doc {
  position: relative;
  z-index: 1;
  overflow-x: clip;     /* clipne horizontalny presah (overlap doprava/dolava) */
  overflow-y: visible;  /* deco môže pretekať dole popod footer */
}
.t-doc-deco {
  position: absolute;
  bottom: 100px;
  left: 72%;
  width: clamp(420px, 56vw, 760px);
  height: clamp(420px, 56vw, 760px);
  transform: translateX(-50%) rotate(-30deg);
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}
.t-doc-deco img {
  width: 100%;
  height: 100%;
  display: block;
}
/* Druhý deco — vľavo hore, 30° clockwise */
.t-doc-deco--tl {
  bottom: auto;
  top: 600px;
  left: 28%;
  transform: translateX(-50%) rotate(30deg);
}
/* Veľký deco — vpravo s -70px overlap, 20° counter-clockwise (Privacy) */
.t-doc-deco--lg {
  bottom: 130px;             /* 130 lebo rotovaný bbox 1200×rot(-20) je 1539 → pri 100 by pretekal 23px pod body */
  left: auto;
  right: -70px;
  width: 1200px;
  height: 1200px;
  transform: rotate(-20deg);
}

/* ─── Footer ─── */

.t-footer {
  position: relative;
  z-index: 3;
  padding: 10px 0 12px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
}

.t-stripe {
  width: 100%;
  height: 6px;
  background-image: url('./todue-stripes.svg');
  background-repeat: no-repeat;
  background-size: 100% 6px;
  background-position: top left;
}
/* Mobile — stripe sticky to viewport bottom, always visible while scrolling. */
@media (max-width: 600px) {
  .t-stripe {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }
  body { padding-bottom: 6px; }
}
.t-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.t-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.t-footer__links a:hover { color: var(--text-primary); }

/* ─── Responsive ─── */

@media (max-width: 900px) {
  .t-features__layout { grid-template-columns: 1fr; gap: 32px; }
  .t-features__title { font-size: 36px; }
}
@media (max-width: 700px) {
  .t-features__grid { grid-template-columns: 1fr; }
  .t-hero { padding: 40px 0 32px; }
}
