/* SFH Digital — sfhdigital.com */

:root {
  --bg: #0e141f;
  --bg-raise: #121a28;
  --card: #171f2e;
  --card-2: #1b2434;
  --line: rgba(154, 178, 214, 0.16);
  --line-strong: rgba(154, 178, 214, 0.28);
  --text: #eef2f8;
  --muted: #a3aec1;
  --faint: #76839a;
  --blue: #5aa7ff;
  --blue-deep: #2f7fe8;
  --red: #ff6b6b;
  --radius: 18px;
  --shell: 1120px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(90, 167, 255, 0.35); }

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

a { color: inherit; }

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 20, 31, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .shell {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand span { color: var(--blue); font-weight: 600; }

.main-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.18s ease;
}

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

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 10px;
}

.lang-switch button {
  background: none;
  border: none;
  color: var(--faint);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

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

.lang-switch span { color: var(--faint); font-size: 12px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero::before {
  width: 560px;
  height: 560px;
  right: -140px;
  top: -180px;
  background: rgba(47, 127, 232, 0.16);
}

.hero::after {
  width: 380px;
  height: 380px;
  left: -160px;
  bottom: -200px;
  background: rgba(255, 107, 107, 0.08);
}

.hero .shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 22px 0 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--blue);
}

.hero-intro {
  color: var(--muted);
  font-size: 18px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:active { transform: translateY(1px); }

.button-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #071120;
}

.button-primary:hover { filter: brightness(1.08); }

.button-secondary {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.button-secondary:hover { border-color: var(--blue); }

.hero-visual {
  position: relative;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(1.2deg);
}

.hero-card img { border-radius: 10px; }

.hero-chip {
  position: absolute;
  top: -14px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.hero-art {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.hero-art svg { display: block; width: 100%; height: auto; }

/* ---------- Project cards ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover { border-color: var(--blue); transform: translateY(-3px); }

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.project-top svg { width: 28px; height: 28px; stroke: var(--blue); }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 12px;
}

.status-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}

.status-chip.early i { background: var(--faint); animation: none; }

.project-card h3 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 25px;
  margin-bottom: 10px;
}

.project-card > p { color: var(--muted); font-size: 15.5px; }

.project-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--blue);
  font-weight: 600;
  font-size: 14.5px;
}

/* ---------- Subpage hero ---------- */

.page-hero { padding: 72px 0 56px; }

.back-link {
  display: block;
  width: fit-content;
  color: var(--faint);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  margin-bottom: 26px;
}

.back-link:hover { color: var(--text); }

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 18px 0 18px;
  max-width: 20ch;
}

.page-hero .hero-intro { max-width: 58ch; }

.page-hero .dev-note { max-width: 640px; }

/* ---------- UI screenshots ---------- */

.ui-section { padding: 24px 0 72px; }

.ui-shot {
  max-width: 940px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.5);
  background: #0b0d12;
}

.ui-shot img { width: 100%; height: auto; display: block; }

.ui-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.ui-grid .ui-shot { max-width: none; margin: 0; }

.ui-shot figcaption {
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  padding: 10px 14px 12px;
}

@media (max-width: 860px) {
  .ui-grid { grid-template-columns: 1fr; }
}

.ui-caption {
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  margin-top: 18px;
}

.feature-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Legal pages ---------- */

.legal-section { padding: 8px 0 72px; }

.legal { max-width: 72ch; }

.legal h2 {
  font-size: 19px;
  margin: 34px 0 10px;
}

.legal p { color: var(--muted, #c6cfd8); margin: 0 0 14px; }

.legal a { color: inherit; }

.foot-legal a {
  color: inherit;
  text-decoration: none;
}

.foot-legal a:hover { text-decoration: underline; }

/* Võrdlustabelid (features-leht) */

.vordlus {
  width: 100%;
  max-width: 72ch;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 14px;
}

.vordlus th, .vordlus td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-strong, #2a3340);
}

.vordlus th { color: var(--faint, #8a94a0); font-weight: 600; }

.vordlus td:nth-child(2) { color: #2dd4bf; }

/* ---------- Waveform divider ---------- */

.wave-divider {
  display: block;
  width: 100%;
  height: 56px;
  opacity: 0.9;
}

/* ---------- Sections ---------- */

section { padding: 88px 0; }

.section-head {
  max-width: 62ch;
  margin-bottom: 48px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 16px 0 18px;
}

.section-head p { color: var(--muted); font-size: 17px; }

.dev-note {
  margin-top: 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--red);
  background: rgba(255, 107, 107, 0.06);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: 15px;
}

/* Product */

.product { background: var(--bg-raise); border-block: 1px solid var(--line); }

.product-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 52px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature:hover { border-color: var(--blue); transform: translateY(-3px); }

.feature h3 {
  font-size: 17px;
  font-weight: 650;
  margin: 14px 0 8px;
}

.feature p { color: var(--muted); font-size: 14.5px; }

.feature svg { width: 26px; height: 26px; stroke: var(--blue); }

/* Services */

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.service {
  position: relative;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  overflow: hidden;
}

.service::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(90, 167, 255, 0.08);
  filter: blur(30px);
}

.service.alt::after { background: rgba(255, 107, 107, 0.08); }

.service-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid rgba(90, 167, 255, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
}

.service.alt .service-tag {
  color: var(--red);
  border-color: rgba(255, 107, 107, 0.35);
}

.service h3 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 26px;
  margin: 20px 0 12px;
}

.service p { color: var(--muted); }

/* Company */

.company { background: var(--bg-raise); border-block: 1px solid var(--line); }

.company .shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: start;
}

.company .section-head { margin-bottom: 24px; }

.registry-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.registry-link:hover { border-bottom-color: var(--blue); }

.facts {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.facts > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 18px 22px;
  background: var(--card);
  font-size: 15px;
}

.facts > div + div { border-top: 1px solid var(--line); }

.facts dt {
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  align-self: center;
}

.facts dd { font-weight: 500; }

/* Contact */

.contact-card {
  background: linear-gradient(150deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: -40% 30% auto;
  height: 300px;
  background: radial-gradient(closest-side, rgba(90, 167, 255, 0.14), transparent);
  pointer-events: none;
}

.contact-card .eyebrow { justify-content: center; }

.contact-card h2 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(30px, 4vw, 44px);
  margin: 18px 0 16px;
}

.contact-card > p {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto;
  font-size: 17px;
}

.contact-rows {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.contact-rows a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 22px;
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.18s ease;
}

.contact-rows a:hover { border-color: var(--blue); }

.contact-rows a small {
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Footer */

footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
}

footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  color: var(--faint);
  font-size: 14px;
}

footer .foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
}

footer .foot-brand img { width: 28px; height: 28px; border-radius: 7px; }

footer .foot-right { margin-left: auto; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero .shell { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 64px 0; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company .shell { grid-template-columns: 1fr; gap: 40px; }
  .main-nav { display: none; }
}

@media (max-width: 860px) {
  .feature-grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .feature-grid, .service-grid, .project-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 48px 24px; }
  section { padding: 64px 0; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
}
