:root {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-soft: #161a22;
  --card: #1c222d;
  --text: #e6edf5;
  --muted: #b0bdcc;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.2);
  --border: rgba(148, 163, 184, 0.15);
  --focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.5);
}

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

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0%, var(--bg) 60%);
  color: var(--text);
  line-height: 1.6;
}

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

.hero {
  padding: 32px 8vw 80px;
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.12), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  align-items: center;
}

.nav-links a:hover {
  color: var(--cyan);
}

.nav-item {
  position: relative;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  display: none;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.35);
  z-index: 20;
}

.submenu a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
}

.submenu a:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
}

.nav-item:focus-within .submenu,
.nav-item:hover .submenu,
.submenu:hover {
  display: flex;
}

.cta {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-weight: 600;
}

.hero-content {
  max-width: 720px;
}

.home-page .hero-content {
  max-width: 1500px;
}

.home-hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.home-hero-visual {
  justify-self: end;
}

.home-hero-image {
  width: min(640px, 100%);
  height: auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.eyebrow {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin-bottom: 20px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.hero-reassurance i {
  color: var(--cyan);
  margin-right: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: var(--cyan);
  color: #0b0f14;
}

.btn.ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(34, 211, 238, 0.2);
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cyan);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  padding: 70px 8vw;
}

.section.alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 36px;
  max-width: 560px;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.4);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 24px 48px rgba(34, 211, 238, 0.2);
}

.card i {
  font-size: 1.4rem;
  color: var(--cyan);
  margin-bottom: 14px;
}

.card h3 {
  margin-bottom: 10px;
}

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

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--cyan);
  font-weight: 600;
}

.card-link:hover {
  text-decoration: underline;
}

.card ul {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.project .tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  align-items: start;
}

.contact ul {
  list-style: none;
  margin-top: 16px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.contact li i {
  margin-right: 10px;
  color: var(--cyan);
}

.form {
  display: grid;
  gap: 16px;
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.slider-field {
  display: grid;
  gap: 10px;
}

.slider-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.slider-control {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slider-control.is-valid {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--cyan-soft);
}

.slider {
  flex: 1 1 220px;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  position: relative;
  animation: sliderPulse 2.5s ease-in-out infinite;
}

.slider-control.is-valid .slider {
  animation: none;
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(34, 211, 238, 0.35) 100%);
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 6px 14px rgba(34, 211, 238, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cyan);
  border: none;
  box-shadow: 0 6px 14px rgba(34, 211, 238, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.slider:active::-webkit-slider-thumb,
.slider:active::-moz-range-thumb {
  transform: scale(1.08);
}

.slider-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.slider-control.is-valid .slider-status {
  color: var(--cyan);
}

.slider-error {
  font-size: 0.85rem;
  color: #fca5a5;
}

.slider-error[hidden] {
  display: none;
}

.form .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.form-hint,
.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-note a {
  color: var(--cyan);
}

@keyframes sliderPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(34, 211, 238, 0.1);
  }
  50% {
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
  }
}

.form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
textarea {
  background: var(--bg-soft);
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--cyan-soft);
}

/* ===== FOOTER IMPROVEMENTS ===== */
.footer {
  padding: 40px 8vw 60px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  color: var(--muted);
}

.footer-brand p {
  font-size: 0.95rem;
}

.footer-columns {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-group-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  font-weight: 600;
}

.social {
  display: flex;
  gap: 14px;
}

.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--border);
}

.social a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--cyan);
}

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 90px;
  padding: 0 8vw;
  display: none;
  justify-content: center;
  z-index: 45;
}

.sticky-cta .btn {
  width: min(420px, 100%);
  justify-content: center;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8vw;
  background: rgba(15, 17, 21, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__content {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner__content p {
  color: var(--muted);
  flex: 1 1 420px;
}

.cookie-banner__content a {
  color: var(--cyan);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.confirmation-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, #111827 0%, var(--bg) 60%);
  color: var(--text);
}

.confirmation-wrapper {
  display: flex;
  justify-content: center;
  padding: 90px 8vw;
}

.confirmation-card {
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.4);
}

.confirmation-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ===== HAMBURGER MENU ===== */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 30;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background 0.2s ease;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== CHEVRON ANIMATION ===== */
.nav-chevron {
  font-size: 0.7rem;
  margin-left: 4px;
  transition: transform 0.25s ease;
}

.nav-item:hover .nav-chevron,
.nav-item:focus-within .nav-chevron {
  transform: rotate(180deg);
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--cyan);
  cursor: pointer;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

.scroll-top:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--cyan);
  color: var(--bg);
}

.scroll-top:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ===== FOCUS IMPROVEMENTS ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 12px 24px rgba(34, 211, 238, 0.2);
}

.card:focus-within {
  border-color: rgba(34, 211, 238, 0.4);
}

/* ===== FAQ ACCORDION ===== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.faq-item {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq-item:hover,
.faq-item:focus-within {
  border-color: rgba(34, 211, 238, 0.3);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.faq-question i:first-child {
  color: var(--cyan);
  margin-right: 12px;
}

.faq-question .faq-icon {
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.is-open .faq-question .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 300px;
}

.faq-answer-content {
  padding: 0 22px 20px;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  position: relative;
}

.testimonial-card::before {
  content: "\201C";
  font-size: 4rem;
  color: var(--cyan-soft);
  position: absolute;
  top: 10px;
  left: 20px;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-text {
  color: var(--text);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cyan-soft);
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-weight: 700;
}

.testimonial-info strong {
  display: block;
  color: var(--text);
}

.testimonial-info span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== PROJECT CARDS WITH VISUALS ===== */
.project-visual {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--card) 100%);
  border-radius: 10px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.project-visual i {
  font-size: 3rem;
  color: var(--cyan-soft);
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.project-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-stats i {
  color: var(--cyan);
  font-size: 0.9rem;
}

/* ===== BODY PADDING FOR STICKY CTA ===== */
body {
  padding-bottom: 0;
}

/* ===== NEWS ===== */
.news-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.news-filters {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
}

.news-filter-group {
  display: grid;
  gap: 10px;
}

.news-filter {
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.news-filter.is-active,
.news-filter:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.news-subscribe {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: grid;
  gap: 12px;
}

.news-feed {
  display: grid;
  gap: 24px;
}

.news-card h3 {
  margin-bottom: 8px;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 16px 0;
}

.news-meta i {
  color: var(--cyan);
}

.news-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.news-reader {
  display: grid;
  gap: 20px;
}

.news-reader-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.news-reader-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.news-reader-body p {
  color: var(--muted);
  margin-bottom: 16px;
}

.comment-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 24px;
}

.comment-list {
  display: grid;
  gap: 16px;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.news-auth {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 320px);
  gap: 24px;
  align-items: start;
}

.news-auth-info ul {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.news-auth-info li i {
  color: var(--cyan);
  margin-right: 8px;
}

.webhook-card {
  display: grid;
  gap: 20px;
}

.webhook-spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.webhook-spec ul {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.webhook-note pre {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  overflow-x: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  body {
    padding-bottom: 80px;
  }

  .nav {
    flex-wrap: wrap;
    position: relative;
  }

  .nav-toggle {
    display: block;
    order: 2;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    order: 3;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
  }

  .submenu {
    position: static;
    display: none;
    flex-direction: column;
    border: none;
    padding: 0 0 0 20px;
    box-shadow: none;
    background: transparent;
    margin-top: 8px;
  }

  .nav-item.is-open .submenu {
    display: flex;
  }

  .submenu a {
    padding: 8px 0;
  }

  .nav > .cta {
    display: none;
  }

  .hero-stats {
    gap: 20px;
  }

  .home-hero-layout {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    order: -1;
  }

  .sticky-cta {
    display: flex;
  }

  .scroll-top {
    bottom: 160px;
  }

  .footer {
    flex-direction: column;
    gap: 24px;
  }

  .footer-columns {
    flex-direction: column;
    gap: 24px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .news-layout,
  .comment-layout,
  .news-auth {
    grid-template-columns: 1fr;
  }

  .news-filters {
    position: static;
  }
}
