/* DSG Drone — public site styles.
   Design tokens live in the shared tokens.css (served at /shared/tokens.css and
   linked before this file); do not redefine the palette here. */

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

a { color: var(--action); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--grey-900);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  color: var(--grey-800);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover { color: var(--action); }

.site-nav .btn { margin-left: 4px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--grey-900);
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--action);
  color: var(--white);
}

.btn-primary:hover { background: var(--orange-600); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--grey-900);
}

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

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover { background: #a8321f; }

/* Hero */
.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero img.hero-logo {
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 0 auto 24px;
  display: block;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--grey-900);
  margin: 0 0 12px;
}

.hero p.tagline {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cards / sections */
.section {
  padding: 48px 0;
}

.section h2 {
  text-align: center;
  color: var(--grey-900);
  margin-bottom: 32px;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  color: var(--grey-900);
}

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

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.gallery-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

/* Forms */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--grey-900);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  background: var(--white);
  color: var(--text);
}

.form-errors {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 4px;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Security / 2FA (portal) */
.muted { color: var(--text-muted); }

.section-subhead {
  margin: 20px 0 8px;
  font-size: 1rem;
  color: var(--grey-900);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }

.totp-secret {
  display: inline-block;
  padding: 4px 8px;
  background: var(--grey-50);
  border-radius: var(--radius);
}

.totp-qr-wrap { margin: 12px 0; }

.backup-codes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.backup-codes-list code {
  display: block;
  padding: 6px 10px;
  background: var(--grey-50);
  border-radius: var(--radius);
  text-align: center;
}

.flash {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.flash-success { background: var(--success-bg); color: var(--success); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-info { background: var(--grey-50); color: var(--grey-800); border: 1px solid var(--border); }

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
}

.contact-list li { margin-bottom: 8px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer a { color: var(--text-muted); }

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.inline-block { display: inline-block; }

/* --- Hero, features, lightbox, contact --- */
.btn-lg {
  padding: 13px 26px;
  font-size: 1.05rem;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }

.hero--image {
  position: relative;
  padding: 0;
  min-height: 460px;
  display: flex;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(26, 28, 31, 0.45), rgba(26, 28, 31, 0.7));
}
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero--image .hero-inner {
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero--image h1 { color: var(--white); }
.hero--image .tagline { color: rgba(255, 255, 255, 0.92); }

.section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-block {
  max-width: 760px;
  text-align: center;
}

.feature-card {
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(26, 28, 31, 0.12);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: rgba(196, 74, 22, 0.1);
  color: var(--action);
}

.cta-banner { background: var(--grey-900); }
.cta-banner h2 { color: var(--white); }
.cta-banner .section-lead { color: rgba(255, 255, 255, 0.85); }

.nav-login { font-weight: 600; }

/* Gallery items + captions */
.gallery-item {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--white);
  text-align: left;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent);
}

/* Lightbox */
.lightbox {
  position: relative;
  border: none;
  border-radius: var(--radius);
  padding: 0;
  background: var(--grey-900);
  max-width: min(92vw, 1000px);
  max-height: 92vh;
  color: var(--white);
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  object-fit: contain;
}
.lightbox-caption {
  margin: 0;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.9rem;
}
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(0, 0, 0, 0.7); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: start;
}
.contact-card h3 { margin-top: 0; }
.contact-card .contact-list { margin-top: 12px; }
.contact-list .contact-label {
  display: inline-block;
  min-width: 96px;
  font-weight: 600;
  color: var(--grey-900);
}
.contact-cta { background: var(--grey-50); }

/* Portal account */
.account-layout { max-width: 560px; }
.account-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.account-tab {
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.account-tab:hover { color: var(--action); }
.account-tab.is-active {
  color: var(--grey-900);
  border-bottom-color: var(--action);
}
.account-signout {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 0 0;
  text-align: right;
}
