/* MessagePane Product Website
   Inspired by balena.io, Fly.io, Railway, Linear */

:root {
  /* Dark theme */
  --bg: #0d0d12;
  --bg-elevated: #15151d;
  --bg-card: #1a1a24;
  --text: #e8e8ed;
  --text-muted: #8b8b9a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #2a2a38;
  /* Layout */
  --max-width: 1200px;
  --section-padding: clamp(3rem, 8vw, 6rem);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.nav__logo-img {
  height: 2.25rem;
  width: auto;
  max-width: 2.75rem;
  object-fit: contain;
  flex-shrink: 0;
}

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

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__links a {
  color: var(--text-muted);
  font-weight: 500;
}

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

/* Hero */
.hero {
  padding: var(--section-padding) 1.5rem;
}

.hero__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero__container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
}

.hero__headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero__subhead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 32rem;
}

@media (max-width: 900px) {
  .hero__subhead {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero__cta {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}

.hero__cta:hover {
  background: var(--accent-hover);
  color: white;
}

.hero__image-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.hero__image {
  width: 100%;
  height: auto;
}

/* Features */
.features {
  padding: var(--section-padding) 1.5rem;
  background: var(--bg-elevated);
}

.features__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 3rem;
  letter-spacing: -0.02em;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

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

.feature-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.feature-card__icon {
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.feature-card__desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* Gallery */
.gallery {
  padding: var(--section-padding) 1.5rem;
}

.gallery__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 2rem;
  letter-spacing: -0.02em;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.gallery__img {
  border-radius: 8px;
  border: 1px solid var(--border);
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.gallery__img--lightbox:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Lightbox (gallery full-size) */
.lightbox:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.88);
  -webkit-tap-highlight-color: transparent;
}

.lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 100%);
  max-height: min(92vh, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: min(92vh, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox__close:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
}

.lightbox__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lightbox__close-icon {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
}

/* CTA */
.cta {
  padding: var(--section-padding) 1.5rem;
  background: var(--bg-elevated);
  text-align: center;
}

.cta__container {
  max-width: 560px;
  margin: 0 auto;
}

.cta__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.cta__subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 1.5rem;
}

.cta__button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.cta__button:hover {
  background: var(--accent-hover);
  color: white;
}

/* Support */
.support {
  padding: var(--section-padding) 1.5rem;
}

.support__container {
  max-width: 680px;
  margin: 0 auto;
}

.support__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.support__subtitle {
  color: var(--text-muted);
  margin: 0 0 2rem;
  text-align: center;
}

.support__form {
  display: grid;
  gap: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.support__label {
  font-size: 0.9rem;
  font-weight: 600;
}

.support__input,
.support__textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  padding: 0.7rem 0.8rem;
}

.support__input:focus,
.support__textarea:focus {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 1px;
  border-color: rgba(59, 130, 246, 0.65);
}

.support__textarea {
  resize: vertical;
  min-height: 120px;
}

.support__button {
  margin-top: 0.25rem;
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.support__button:hover {
  background: var(--accent-hover);
}

.support__recaptcha {
  margin-top: 0.25rem;
  display: flex;
  justify-content: flex-start;
}

.support__recaptcha-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.support__recaptcha-note--error {
  color: #ff9b9b;
}

.support__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.support__status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.support__status--success {
  color: #7ce2a2;
}

.support__status--error {
  color: #ff9b9b;
}

/* Footer */
.footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

.footer__copy {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}
