:root {
  --graphite: #2b2b2b;
  --graphite-light: #3d3d3d;
  --sky: #87ceeb;
  --sky-bright: #5bbde4;
  --sky-pale: #d6eef8;
  --cream: #f8f6f2;
  --white: #ffffff;
  --slate: #6b7280;
  --border: rgba(43,43,43,0.08);
  --shadow: 0 4px 32px rgba(43,43,43,0.10);
  --shadow-lg: 0 16px 64px rgba(43,43,43,0.16);
  --sans: "Futura Book", "Futura", "Jost", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--graphite);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(6%, calc((100% - 1250px) / 2));
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
nav::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
nav.scrolled { box-shadow: var(--shadow); }

.nav-logo img { height: 40px; display: block; }

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: var(--sans);
  font-size: 17px; font-weight: 500; letter-spacing: .03em;
  color: var(--graphite); text-decoration: none;
  position: relative; padding-bottom: 2px;
  transition: color .2s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--sky-bright);
  transition: width .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--sky-bright); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px; height: 24px;
  background: transparent; border: none;
  cursor: pointer; padding: 0;
  z-index: 101;
  position: relative;
}
.nav-hamburger span {
  width: 28px; height: 3px;
  background: var(--graphite);
  border-radius: 10px;
  transition: all .3s linear;
  position: relative;
  transform-origin: 1px;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(20px); }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg); }
.no-scroll { overflow: hidden; }

/* ── HERO ── */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px max(6%, calc((100% - 1250px) / 2)) 80px;
  gap: 60px;
  background: var(--cream);
  position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: -120px; right: -80px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(135,206,235,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sky-pale); color: var(--sky-bright);
  font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px;
  margin-bottom: 28px;
  animation: fadeUp .6s ease both;
}
.hero-badge span { display: inline-block; width: 6px; height: 6px; background: var(--sky-bright); border-radius: 50%; }

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  font-weight: 500; line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--graphite);
  animation: fadeUp .7s .1s ease both;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--sky-bright), #3a9ec4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  margin-top: 24px; font-size: 19px; line-height: 1.7;
  color: var(--slate); max-width: 480px;
  animation: fadeUp .7s .2s ease both;
}

.hero-actions {
  display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap;
  animation: fadeUp .7s .3s ease both;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--graphite); color: var(--white);
  padding: 14px 28px; border-radius: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(43,43,43,0.25);
}
.btn-primary:hover { background: var(--sky-bright); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(91,189,228,0.4); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--graphite);
  padding: 14px 28px; border-radius: 8px; border: 1.5px solid rgba(43,43,43,0.2);
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: border-color .2s, color .2s, transform .15s;
}
.btn-secondary:hover { border-color: var(--sky-bright); color: var(--sky-bright); transform: translateY(-2px); }

.hero-stats {
  display: flex; gap: 40px; margin-top: 52px; flex-wrap: wrap;
  animation: fadeUp .7s .4s ease both;
}
.stat-item { }
.stat-num {
  font-family: var(--sans);
  font-size: 2rem; font-weight: 500; color: var(--graphite);
}
.stat-num span { color: var(--sky-bright); }
.stat-label { font-size: 15px; color: var(--slate); margin-top: 2px; }

/* Hero visual */
.hero-visual {
  position: relative; display: flex; justify-content: center; align-items: center;
  animation: fadeIn .9s .2s ease both;
}

.db-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  width: 100%; max-width: 420px;
  position: relative;
}

.db-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.db-card-title { font-family: var(--sans); font-size: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.db-status { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #22c55e; }
.db-status::before { content: ''; width: 7px; height: 7px; background: #22c55e; border-radius: 50%; animation: pulse 2s infinite; }

.db-metric {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.db-metric:last-of-type { border-bottom: none; }
.db-metric-label { font-size: 15px; color: var(--slate); display: flex; align-items: center; gap: 10px; }
.db-metric-icon { width: 32px; height: 32px; background: var(--sky-pale); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.db-metric-icon svg { width: 16px; height: 16px; }
.db-metric-val { font-family: var(--sans); font-size: 17px; font-weight: 500; }
.db-metric-val.ok { color: #22c55e; }
.db-metric-val.warn { color: #f59e0b; }
.db-metric-val.normal { color: var(--graphite); }

.db-bar-group { margin-top: 20px; }
.db-bar-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--slate); margin-bottom: 6px; }
.db-bar-track { background: var(--sky-pale); border-radius: 999px; height: 8px; overflow: hidden; }
.db-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--sky-bright), #3a9ec4); transition: width 1.5s ease; }

.floating-chip {
  position: absolute;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(43,43,43,0.15);
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  animation: float 4s ease-in-out infinite;
}
.chip-1 { top: -18px; left: -28px; animation-delay: 0s; }
.chip-2 { bottom: -18px; right: -28px; animation-delay: 2s; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── SECTION COMMONS ── */
section { padding: 100px max(6%, calc((100% - 1250px) / 2)); }
.section-label {
  font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--sky-bright); margin-bottom: 14px;
}
.section-title {
  font-family: var(--sans);
  font-size: clamp(1.4rem, 5vw, 2.8rem);
  font-weight: 500; line-height: 1.15; letter-spacing: -.02em;
  color: var(--graphite); max-width: 720px;
}
.section-desc {
  font-size: 18px; line-height: 1.7; color: var(--slate);
  max-width: 520px; margin-top: 16px;
}

/* ── SERVICES ── */
#teenused {
  background: var(--white);
}
.services-header { text-align: center; margin-bottom: 64px; }
.services-header .section-title, .services-header .section-desc { margin-left: auto; margin-right: auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 28px;
  max-width: 1100px; margin: 0 auto;
}

.service-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative; overflow: hidden;
  border: 1px solid transparent;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  cursor: pointer;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sky-bright), #3a9ec4);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover { border-color: var(--sky-pale); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 52px; height: 52px;
  background: var(--white);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 2px 12px rgba(43,43,43,0.08);
}
.service-icon svg { width: 26px; height: 26px; color: var(--sky-bright); }

.service-card h3 {
  font-family: var(--sans);
  font-size: 1.5rem; font-weight: 500; margin-bottom: 10px;
}
.service-card p { font-size: 18px; line-height: 1.65; color: var(--slate); }

.service-tag {
  display: inline-flex; align-items: center;
  margin-top: 20px; padding: 5px 12px;
  background: var(--sky-pale); border-radius: 20px;
  font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--sky-bright);
}

/* Coming soon card */
.service-card.coming-soon {
  background: var(--white);
  border: 1.5px dashed rgba(135,206,235,0.5);
  opacity: .75;
}
.service-card.coming-soon:hover { transform: none; box-shadow: none; }
.coming-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 14px;
}
.coming-badge span { width: 5px; height: 5px; background: var(--slate); border-radius: 50%; opacity: .5; }

/* ── WHY ── */
#meist {
  background: var(--graphite);
  color: var(--white);
  position: relative; overflow: hidden;
}
#meist::before {
  content: '';
  position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(91,189,228,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.why-header { text-align: center; margin-bottom: 60px; }
.why-header .section-title, .why-header .section-desc { margin-left: auto; margin-right: auto; }
.why-header .section-title { color: var(--white); }
.why-header .section-desc { color: rgba(255,255,255,0.6); }

.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; max-width: 1100px; margin: 0 auto; }

.why-features { display: flex; flex-direction: column; gap: 20px; }
.why-feature {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 20px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background .2s, border-color .2s;
}
.why-feature:hover { background: rgba(255,255,255,0.07); border-color: rgba(135,206,235,0.2); }
.why-feat-icon {
  width: 40px; height: 40px; min-width: 40px;
  background: rgba(135,206,235,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.why-feat-icon svg { width: 20px; height: 20px; color: var(--sky); }
.why-feat-title { font-family: var(--sans); font-size: 1.3rem; font-weight: 500; color: var(--white); margin-bottom: 4px; }
.why-feat-desc { font-size: 18px; color: rgba(255,255,255,0.65); line-height: 1.6; }

.why-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.num-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 32px 24px;
  transition: background .2s, transform .2s;
}
.num-card:hover { background: rgba(255,255,255,0.09); transform: translateY(-3px); }
.num-big {
  font-family: var(--sans);
  font-size: 3rem; font-weight: 500; color: var(--sky);
  line-height: 1;
}
.num-label { font-size: 17px; color: rgba(255,255,255,0.65); margin-top: 8px; line-height: 1.4; }

/* ── TOOLS ── */
#tööriistad {
  background: var(--cream);
  text-align: center;
}
.tools-header { margin-bottom: 60px; }
.tools-header .section-title, .tools-header .section-desc { margin: 0 auto; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px; max-width: 1000px; margin: 0 auto;
}
.tool-card {
  background: var(--white);
  border-radius: 14px; padding: 30px 24px;
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
  height: 100%;
}
.tool-card:hover { border-color: var(--sky-bright); transform: translateY(-3px); box-shadow: var(--shadow); }
.tool-card-icon { font-size: 2rem; margin-bottom: 12px; }
.tool-card h3 { font-family: var(--sans); font-size: 1.4rem; font-weight: 500; margin-bottom: 6px; }
.tool-card p { font-size: 18px; color: var(--slate); line-height: 1.55; flex-grow: 1; margin-bottom: 24px; }
.tool-soon { display: inline-block; margin-top: auto; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--slate); background: var(--border); padding: 4px 10px; border-radius: 4px; align-self: center; }

/* ── CTA ── */
#kontakt {
  background: linear-gradient(135deg, var(--graphite) 0%, #1a1a1a 100%);
  text-align: center; color: var(--white);
  position: relative; overflow: hidden;
}
#kontakt::before {
  content: '';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(91,189,228,0.10) 0%, transparent 65%);
}
.cta-inner { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
#kontakt .section-title { color: var(--white); margin: 0 auto 16px; text-align: center; }
#kontakt .section-desc { color: rgba(255,255,255,0.6); text-align: center; margin: 0 auto 40px; }
.cta-email-box {
  display: flex; gap: 12px; max-width: 440px; margin: 0 auto;
}
.cta-input {
  flex: 1;
  padding: 14px 18px; border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: var(--white); font-size: 16px;
  outline: none; transition: border-color .2s;
  font-family: var(--sans);
}
.cta-input::placeholder { color: rgba(255,255,255,0.35); }
.cta-input:focus { border-color: var(--sky-bright); }
.cta-send {
  background: var(--sky-bright); color: var(--white);
  padding: 14px 22px; border-radius: 8px; border: none;
  font-size: 16px; font-weight: 600; cursor: pointer;
  font-family: var(--sans);
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.cta-send.sent { background: #22c55e; }
.cta-input.error {
  border-color: #f87171 !important;
  transition: border-color .2s;
}
.cta-send:hover { background: #4aade0; transform: translateY(-1px); }

/* ── FOOTER ── */
footer {
  background: #1a1a1a; color: rgba(255,255,255,0.4);
  padding: 32px max(6%, calc((100% - 1250px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  font-size: 17px;
}
footer img { height: 28px; opacity: .7; filter: brightness(10); }
footer a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--sky-bright); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.4); }
}

/* Scroll reveal */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 110px 20px 60px; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.8rem); overflow-wrap: break-word; }
  .hero-desc { margin: 16px auto 0; font-size: 17px; padding: 0 10px; }
  section { padding: 80px 20px; }
  .section-desc { font-size: 17px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; gap: 20px; }
  .hero-visual { display: none; }
  .why-features { text-align: left; }
  .why-feature > div { min-width: 0; }
  .why-grid { grid-template-columns: 1fr; gap: 48px; }
  .why-numbers { gap: 12px; }
  .num-card { padding: 20px 16px; min-width: 0; }
  .num-big { font-size: 2.2rem; }
  .num-label { word-break: break-word; }
  .cta-email-box { flex-direction: column; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    width: 80%;
    max-width: 320px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 18px; }

  .nav-hamburger { display: flex; }
}