/* ═══════════ TableBook esitlusleht — v3 ═══════════ */
:root {
  --navy: #0a1626;
  --navy-2: #101f36;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --teal: #2dd4bf;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #1e293b;
  --text-2: #55647a;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(10, 22, 38, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ─── Navigatsioon ─── */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 38, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topnav-inner { display: flex; align-items: center; gap: 26px; height: 60px; }
.logo { font-size: 21px; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: #7aa5ff; }
.topnav-links { display: flex; gap: 18px; margin-left: auto; }
.topnav-links a { color: #c6d2e5; text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s; }
.topnav-links a:hover { color: #fff; }
@media (max-width: 960px) { .topnav-links { display: none; } .topnav-inner { justify-content: space-between; } }

/* ─── Nupud ─── */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 15px; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-small { padding: 8px 18px; font-size: 14px; }
.btn-ghost { background: transparent; color: #dbe6ff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* ═══════════ HERO — liikuv zen-visuaal ═══════════ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(175deg, #08111f 0%, #0c1c31 55%, #0f2740 100%);
  padding: 108px 0 150px;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }

/* pehmed „aurora" laigud — vesi, mets, heaolu */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .38; will-change: transform;
}
.blob-1 { width: 560px; height: 560px; left: -140px; top: -120px;
  background: radial-gradient(circle, #2dd4bf, transparent 65%);
  animation: drift-1 21s ease-in-out infinite alternate; }
.blob-2 { width: 640px; height: 640px; right: -180px; top: 40px;
  background: radial-gradient(circle, #3b82f6, transparent 65%);
  animation: drift-2 26s ease-in-out infinite alternate; }
.blob-3 { width: 520px; height: 520px; left: 30%; bottom: -220px;
  background: radial-gradient(circle, #34d399, transparent 65%);
  animation: drift-3 24s ease-in-out infinite alternate; }
@keyframes drift-1 { to { transform: translate(70px, 50px) scale(1.12); } }
@keyframes drift-2 { to { transform: translate(-60px, 70px) scale(1.08); } }
@keyframes drift-3 { to { transform: translate(50px, -60px) scale(1.15); } }

/* rahulik „hingamise" ring pealkirja taga */
.breath {
  position: absolute; left: 50%; top: 46%;
  width: 620px; height: 620px; margin: -310px 0 0 -310px;
  border: 1px solid rgba(122,165,255,.16); border-radius: 50%;
  animation: breath 9s ease-in-out infinite;
}
.breath::after {
  content: ""; position: absolute; inset: 60px;
  border: 1px solid rgba(45,212,191,.13); border-radius: 50%;
}
@keyframes breath { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.07); opacity: 1; } }

/* vee lained all — kaks kihti, eri kiirus ja suund */
.waves { position: absolute; bottom: 0; left: 0; width: 200%; height: 130px; }
.waves path { fill: #7cc7d8; }
.waves-1 { opacity: .13; animation: wave-x 18s linear infinite; }
.waves-2 { opacity: .22; height: 96px; animation: wave-x 11s linear infinite reverse; }
@keyframes wave-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(122,165,255,.14); color: #9db9f5;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  color: #fff; font-size: clamp(34px, 5.4vw, 58px); line-height: 1.1;
  font-weight: 800; letter-spacing: -.025em; margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: #7ee0d0; white-space: nowrap; }
.hero-tagline {
  color: #d7e2f2; font-size: clamp(18px, 2.5vw, 24px); font-weight: 600;
  letter-spacing: -.01em; max-width: 720px; margin: 0 auto 22px;
}
.hero-lead { color: #b9c6dc; font-size: clamp(16px, 2vw, 19px); max-width: 740px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.hero-facts { display: flex; gap: 34px; justify-content: center; flex-wrap: wrap; list-style: none; }
.hero-facts li { color: #9fb0ca; font-size: 14px; }
.hero-facts strong { color: #fff; font-size: 17px; display: block; }

/* ═══════════ ÜLEVAADE — moodulite ringid ═══════════ */
.overview { padding: 78px 0 40px; text-align: center; }
.overview-title { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -.02em; margin-bottom: 14px; }
.overview-lead { color: var(--text-2); font-size: 16.5px; max-width: 680px; margin: 0 auto 12px; }
.orbit-wrap { max-width: 720px; margin: 0 auto; }
.orbit { width: 100%; height: auto; display: block; }

.orbit-lines line { stroke: #c9d6ec; stroke-width: 1.5; }
.orbit-ring {
  fill: none; stroke: var(--teal); stroke-width: 1.6; opacity: .55;
  stroke-dasharray: 7 9; stroke-linejoin: round;
  animation: ring-flow 30s linear infinite;
}
@keyframes ring-flow { to { stroke-dashoffset: -640; } }

/* ring = värviline halo + heledast gradiendist keha + pehme vari */
.node .halo { stroke: none; }
.node .body { fill: url(#gNode); stroke-width: 2.5; filter: url(#soft); transition: stroke-width .15s; }
.node text {
  fill: var(--text); font-size: 14.5px; font-weight: 600; text-anchor: middle;
  font-family: inherit; pointer-events: none;
}
.node-sm text { font-size: 13px; }
.node .sub { fill: var(--text-2); font-size: 11.5px; font-weight: 500; }

.m1 .body { stroke: #2563eb; } .m1 .halo { fill: #2563eb; fill-opacity: .10; }
.m2 .body { stroke: #0d9488; } .m2 .halo { fill: #0d9488; fill-opacity: .10; }
.m3 .body { stroke: #7c3aed; } .m3 .halo { fill: #7c3aed; fill-opacity: .10; }
.m4 .body { stroke: #0891b2; } .m4 .halo { fill: #0891b2; fill-opacity: .10; }
.m5 .body { stroke: #d97706; } .m5 .halo { fill: #d97706; fill-opacity: .10; }
.m6 .body { stroke: #db2777; } .m6 .halo { fill: #db2777; fill-opacity: .10; }
.m7 .body { stroke: #059669; } .m7 .halo { fill: #059669; fill-opacity: .10; }

.node-center .body { fill: url(#gCenter); stroke: var(--teal); stroke-width: 3; filter: url(#soft); }
.node-center text { fill: #fff; font-size: 17px; font-weight: 700; }
.node-center .sub { fill: #8fe6d8; font-size: 12px; }

.orbit a { text-decoration: none; cursor: pointer; }
.orbit a:hover .body { stroke-width: 4.5; }
.orbit a:hover .halo { fill-opacity: .2; }

/* õrn hõljumine — kolm faasi, et ringid ei liiguks sünkroonis */
.float-a, .float-b, .float-c { transform-box: fill-box; transform-origin: center; }
.float-a { animation: floaty 6.5s ease-in-out infinite; }
.float-b { animation: floaty 7.8s ease-in-out 1.2s infinite; }
.float-c { animation: floaty 7.1s ease-in-out 2.3s infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ═══════════ Moodulid ═══════════ */
.module { padding: 76px 0; }
.module-alt { background: #eaeef5; }
.module-head { max-width: 780px; margin: 0 auto 36px; text-align: center; }
.module-kicker {
  color: var(--accent); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
}
.module-head h2, .opencode h2 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -.02em; margin-bottom: 14px; }
.module-lead { color: var(--text-2); font-size: 16.5px; }

/* ─── Ekraanipildi raam ─── */
.frame {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border); background: #fff;
}
.shot-bar {
  display: flex; align-items: center; gap: 7px;
  background: #eef1f6; border-bottom: 1px solid var(--border);
  padding: 10px 14px;
}
.shot-bar i { width: 11px; height: 11px; border-radius: 50%; }
.shot-bar i:nth-child(1) { background: #f87171; }
.shot-bar i:nth-child(2) { background: #fbbf24; }
.shot-bar i:nth-child(3) { background: #34d399; }
.shot-bar span { margin-left: 10px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }

/* ═══════════ Slaider — üks mooduli kohta ═══════════ */
.slider { position: relative; }
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
  outline: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
  padding: 0 2px; /* varju jaoks õhku */
}
.slide figcaption {
  max-width: 860px; margin: 16px auto 0; text-align: center;
  color: var(--text-2); font-size: 15px; min-height: 72px;
}
.slide figcaption strong { color: var(--text); }
@media (max-width: 720px) { .slide figcaption { min-height: 110px; } }

.slider-btn {
  position: absolute; top: 50%; transform: translateY(-70%);
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,.94);
  box-shadow: 0 6px 20px rgba(10,22,38,.16);
  color: var(--navy); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s, opacity .15s;
  z-index: 2;
}
.slider-btn svg { width: 22px; height: 22px; }
.slider-btn:hover { background: #fff; transform: translateY(-70%) scale(1.06); }
.slider-btn:disabled { opacity: 0; pointer-events: none; }
.slider-btn.prev { left: -12px; }
.slider-btn.next { right: -12px; }
@media (max-width: 1200px) { .slider-btn.prev { left: 8px; } .slider-btn.next { right: 8px; } }
@media (max-width: 720px) { .slider-btn { width: 38px; height: 38px; } }

.slider-dots { display: flex; gap: 9px; justify-content: center; margin-top: 16px; }
.slider-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0;
  background: #c3cfe2; cursor: pointer; transition: background .15s, transform .15s;
}
.slider-dots button:hover { background: #94a7c4; }
.slider-dots button.on { background: var(--accent); transform: scale(1.25); }

/* ilma JS-ita: nupud/punktid puuduvad, slaidid keritavad sõrmega */
html:not(.js) .slide figcaption { min-height: 0; }

/* ─── Kaardid ─── */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .cards3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: left; }
.card h3 { font-size: 17px; margin-bottom: 9px; letter-spacing: -.01em; }
.card p { color: var(--text-2); font-size: 14.5px; }

/* ═══════════ Integratsioonid ═══════════ */
.integr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .integr-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .integr-grid { grid-template-columns: 1fr; } }
.integr-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.integr-card h3 { font-size: 15px; margin-bottom: 12px; letter-spacing: -.01em; }
.pills-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pills-row span {
  padding: 6px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  background: #eef2fa; color: #3a4a63; border: 1px solid #e2e8f0;
}
.integr-note { text-align: center; color: var(--text-2); font-size: 14.5px; margin-top: 26px; }

/* ═══════════ Protsess (kuidas me töötame) ═══════════ */
.steps { list-style: none; max-width: 780px; margin: 0 auto; counter-reset: step; }
.step { display: flex; gap: 20px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 18px;
}
.step h3 { font-size: 17px; margin-bottom: 4px; letter-spacing: -.01em; }
.step p { color: var(--text-2); font-size: 15px; }

/* ═══════════ Avatud kood ═══════════ */
.opencode { padding: 82px 0; text-align: center; background: #eaf7f4; }
.opencode .module-kicker { color: #0d9488; }
.opencode-lead { color: var(--text-2); font-size: 17px; max-width: 640px; margin: 0 auto 34px; }
.opencode .card { border-color: #cbe9e2; }
.license-note {
  max-width: 720px; margin: 30px auto 0; padding: 16px 22px;
  background: rgba(13,148,136,.07); border: 1px solid #b9e4db; border-radius: 12px;
  color: var(--text-2); font-size: 14.5px; line-height: 1.55;
}
.license-note a { color: #0d9488; font-weight: 600; }
.license-note a:hover { text-decoration: underline; }

/* ═══════════ KKK ═══════════ */
.faq { padding: 80px 0; background: var(--bg); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 18px 22px; font-size: 16.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 24px; font-weight: 400; color: var(--accent);
  line-height: 1; flex: 0 0 auto; transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-item p {
  padding: 0 22px 20px; color: var(--text-2); font-size: 15px; max-width: 700px;
}
.faq-item a { color: var(--accent); }

/* ═══════════ Kontakt ═══════════ */
.cta {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #10365c 100%);
  padding: 88px 0; text-align: center;
}
.cta::before, .cta::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.cta::before {
  width: 720px; height: 720px; left: -260px; top: -320px;
  background: radial-gradient(circle, rgba(45,212,191,.14), transparent 65%);
}
.cta::after {
  width: 640px; height: 640px; right: -240px; bottom: -340px;
  background: radial-gradient(circle, rgba(59,130,246,.16), transparent 65%);
}
.cta-inner { position: relative; z-index: 1; }
.cta h2 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -.02em; margin-bottom: 16px; }
.cta p { color: #b9c6dc; font-size: 17px; max-width: 640px; margin: 0 auto 38px; }

.contact-cards { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 250px; padding: 26px 30px 24px; border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  text-decoration: none;
  transition: background .15s, transform .15s, border-color .15s;
}
.contact-card:hover {
  background: rgba(255,255,255,.11);
  border-color: rgba(122,165,255,.45);
  transform: translateY(-3px);
}
.contact-ico {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(122,165,255,.14); color: #9fc2ff;
  margin-bottom: 12px;
}
.contact-ico svg { width: 21px; height: 21px; }
.contact-label { color: #9fb0ca; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.contact-value { color: #fff; font-size: 18px; font-weight: 650; }

/* Kontaktivorm */
.contact-form {
  max-width: 640px; margin: 40px auto 0; text-align: left;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 28px;
}
.form-title { color: #fff; font-size: 17px; font-weight: 600; margin-bottom: 18px; text-align: center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.contact-form label { display: block; color: #b9c6dc; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: 5px; padding: 11px 13px;
  border-radius: 9px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07); color: #fff; font-size: 15px; font-family: inherit;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #7c8aa5; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: #7aa5ff; background: rgba(255,255,255,.1);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.form-status { font-size: 14px; }
.form-status.ok { color: #7ee0d0; }
.form-status.err { color: #fca5a5; }
.form-consent { color: #7c8aa5; font-size: 12.5px; margin-top: 12px; }

/* ═══════════ Jalus ═══════════ */
.footer { background: #07101d; padding: 46px 0 32px; }
.footer-inner { text-align: center; }
.footer-logo { font-size: 22px; }
.footer-tag { color: #8fa2c0; font-size: 14px; margin: 6px 0 0; }
.footer-rule {
  width: 170px; height: 1px; margin: 24px auto;
  background: linear-gradient(90deg, transparent, rgba(122,165,255,.45), transparent);
}
.footer-attribution { color: #c6d2e5; font-size: 15px; margin-bottom: 8px; }
.footer-attribution a { color: #9fc2ff; text-decoration: none; }
.footer-attribution a strong { color: #fff; font-weight: 700; }
.footer-attribution a:hover { text-decoration: underline; }
.footer-meta { color: #7488a8; font-size: 13px; }
.footer-meta a { color: #9fb0ca; }
.footer-meta a:hover { color: #fff; }
.footer-sub {
  margin-top: 12px; color: #4d6285; font-size: 11.5px;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ─── Ilmumine kerimisel (ainult kui JS on olemas) ─── */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ─── Vähendatud liikumine ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slides { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .breath, .waves-1, .waves-2, .orbit-ring, .float-a, .float-b, .float-c { animation: none; }
}
