/* ============================================================
   IDSCloud — Landing page styles
   Dark theme, navy → cyan gradient accents
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Kabel";
  src: url("../resources/font/Kabel Book BT_0.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --navy-deep: #002e6e;
  --navy: #1b3a8c;
  --cyan: #00b8de;
  --cyan-bright: #2ab7e0;
  --bg-0: #050d1f;
  --bg-1: #0a1a3a;
  --text: #eaf2fb;
  --muted: #9db4d0;
  --panel: rgba(19, 38, 76, 0.45);
  --panel-border: rgba(42, 183, 224, 0.22);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --gradient: linear-gradient(
    135deg,
    var(--navy-deep) 0%,
    var(--navy) 45%,
    var(--cyan) 100%
  );
  --gradient-text: linear-gradient(
    90deg,
    var(--cyan-bright) 0%,
    var(--cyan) 50%,
    #7fd8f0 100%
  );
  --radius: 1rem;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-heading: "Kabel", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(
    180deg,
    var(--bg-0) 0%,
    var(--bg-1) 60%,
    var(--bg-0) 100%
  );
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
}

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

a {
  color: inherit;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container-narrow {
  max-width: 56rem;
}

.section {
  padding-block: 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--muted);
  max-width: 42rem;
  margin-inline: auto;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 184, 222, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 184, 222, 0.4);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-outline {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(157, 180, 208, 0.35);
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--cyan);
}

/* Simulation buttons row */
.form-sim {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(157, 180, 208, 0.15);
}

.form-sim-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.form-sim-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* Submit spinner */
.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 13, 31, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 183, 224, 0.12);
}

.nav-inner {
  max-width: 72rem;
  margin-inline: auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo floats over the navbar: overflows top and bottom without growing the bar */
.nav-logo {
  position: relative;
  z-index: 60;
  height: 2.5rem;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 8rem;
  width: auto;
  transform: translateY(1.25rem);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 6rem;
  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(27, 58, 140, 0.55) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 75% 75%,
      rgba(0, 184, 222, 0.18) 0%,
      transparent 50%
    );
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero-glow-1 {
  width: 28rem;
  height: 28rem;
  top: -8rem;
  left: -6rem;
  background: rgba(0, 46, 110, 0.6);
}

.hero-glow-2 {
  width: 22rem;
  height: 22rem;
  bottom: -6rem;
  right: -4rem;
  background: rgba(0, 184, 222, 0.22);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 48rem;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(42, 183, 224, 0.08);
  color: var(--cyan-bright);
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* ---------- Quote card (elevator speech) ---------- */
.quote-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 6px solid transparent;
  border-image: linear-gradient(180deg, var(--cyan) 0%, var(--navy-deep) 100%) 1;
  border-radius: var(--radius);
  padding: 2.5rem 2.5rem 2.5rem 2rem;
  backdrop-filter: blur(6px);
}

.quote-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 184, 222, 0.12);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.quote-card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.quote-card-text {
  color: var(--muted);
  font-style: italic;
  font-size: 1.05rem;
}

/* ---------- System cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 2.25rem;
  overflow: hidden;
  backdrop-filter: blur(6px);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Gradient top border */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(42, 183, 224, 0.3);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(0, 184, 222, 0.12);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-quote {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  border-left: 2px solid rgba(0, 184, 222, 0.4);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--cyan-bright);
  background: rgba(0, 184, 222, 0.1);
  border: 1px solid rgba(0, 184, 222, 0.2);
}

/* ---------- Form ---------- */
.form-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(6px);
}

.form-group-section {
  border: none;
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(157, 180, 208, 0.15);
}

.form-group-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.form-legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding: 0;
}

.form-legend-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(0, 184, 222, 0.12);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* Field spanning the full row of a multi-column grid */
.field-full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.required {
  color: var(--cyan-bright);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: rgba(5, 13, 31, 0.6);
  border: 1px solid rgba(157, 180, 208, 0.3);
  border-radius: 0.5rem;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(157, 180, 208, 0.5);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 184, 222, 0.2);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field input[aria-invalid="true"]:focus,
.field select[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

/* Native select: dark dropdown arrow */
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239db4d0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.field select option {
  background: var(--bg-1);
  color: var(--text);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

/* Submit area + banners */
.form-submit {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.form-banner {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 0.625rem;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

/* Author display:flex beats the UA [hidden] rule — restore it explicitly */
.form-banner[hidden] {
  display: none;
}

.form-banner::before {
  flex-shrink: 0;
  font-weight: 700;
}

.form-banner-success {
  background: var(--success-bg);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--success);
}

.form-banner-success::before {
  content: "✓";
}

.form-banner-error {
  background: var(--danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.form-banner-error::before {
  content: "⚠";
}

/* ---------- Contact section ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-pitch {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 2.25rem;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

/* Gradient top border, same accent as the system cards */
.contact-pitch::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient);
}

.contact-pitch .section-title {
  text-align: left;
}

.contact-pitch-text {
  color: var(--muted);
  margin-top: 1rem;
}

.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.75rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-row-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgba(0, 184, 222, 0.12);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-row a {
  color: var(--cyan-bright);
  text-decoration: none;
}

.contact-row a:hover {
  text-decoration: underline;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Slight stagger between siblings */
.cards-grid > .reveal:nth-child(2),
.contact-grid > .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

/* Keep the snappy hover lift on cards after they have revealed */
.card.reveal.visible {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.6s ease;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-deep);
  padding-block: 2rem;
  text-align: center;
}

.footer p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
}

/* ---------- Responsive (>= 768px) ---------- */
@media (min-width: 768px) {
  .section {
    padding-block: 5rem;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .hero {
    padding-block: 8rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-card {
    padding: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(5, 13, 31, 0.97);
    border-bottom: 1px solid rgba(42, 183, 224, 0.15);
    padding: 1rem 1.5rem 1.5rem;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu .nav-link {
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  .nav-menu .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .card {
    transition: none;
  }

  /* Reveal animations become instant and always visible */
  .reveal,
  .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
