/* ============================================================
   atmosfere Components
   Source: atmosfere Brand Guidelines §18.4–18.8
   ============================================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-family);
  font-weight: var(--font-medium);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--ease-base);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}

.btn-sm { font-size: var(--text-sm);   padding: var(--space-2) var(--space-4);  min-height: 36px; }
.btn-md { font-size: var(--text-base); padding: var(--space-3) var(--space-6); }
.btn-lg { font-size: var(--text-lg);   padding: var(--space-4) var(--space-8); }

.btn-primary {
  background: var(--color-brand-blue);
  color: var(--color-white);
  border-color: var(--color-brand-blue);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background: var(--color-brand-blue-deep);
  border-color: var(--color-brand-blue-deep);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  opacity: 1;
}
.btn-primary:focus-visible {
  outline: 2px solid var(--color-brand-blue);
  outline-offset: 3px;
}

.btn-secondary {
  background: transparent;
  color: var(--color-brand-blue);
  border-color: var(--color-brand-blue);
}
.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.06);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border-light);
}
.btn-ghost:hover {
  background: var(--color-surface-light);
  color: var(--color-text-primary);
  opacity: 1;
}

.btn-outline-dark {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.btn-pill { border-radius: var(--radius-full); }

/* ── Navigation ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding-block: var(--space-4);
  background: var(--color-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow var(--ease-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-card);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img { display: block; width: 160px; height: auto; }

@media (max-width: 767px) {
  .nav-logo img { width: auto; height: 32px; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
  margin-left: auto;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  transition: color var(--ease-fast);
  padding-block: var(--space-2);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-text-primary);
  opacity: 1;
}
.nav-links a[aria-current="page"] {
  color: var(--color-brand-blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Hamburger */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-mobile-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--ease-base), opacity var(--ease-base);
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-24) var(--space-6);
}
.nav-mobile-overlay.open {
  display: flex;
}
.nav-mobile-overlay .nav-links {
  display: flex; /* overrides the @media (max-width: 767px) { .nav-links { display: none } } rule */
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  margin-left: 0;
}
.nav-mobile-overlay .nav-links a {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  padding: var(--space-4) var(--space-6);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-mobile-overlay .nav-actions {
  margin-top: var(--space-4);
}
.nav-mobile-overlay .nav-actions .btn {
  width: 100%;
  justify-content: center;
  font-size: var(--text-lg);
  padding: var(--space-4) var(--space-8);
}

@media (max-width: 767px) {
  .nav-links     { display: none; }
  .nav-actions   { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-navy);
  padding-top: 72px; /* account for fixed nav */
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-lg);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  padding-block: var(--space-32);
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-brand-cyan);
  margin-bottom: var(--space-6);
}

.hero-headline {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-7xl));
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-white);
  margin-bottom: var(--space-6);
}

.hero-subheadline {
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}
.section-header .text-overline { margin-bottom: var(--space-3); }
.section-header h2 { margin-bottom: var(--space-4); }
.section-header p  { color: var(--color-text-secondary); }

.section-header.left {
  text-align: left;
  margin-inline: 0;
}

/* ── Cards ── */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--ease-base), transform var(--ease-base);
}
.card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.card-glass {
  background: var(--glass-light-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  transition: transform var(--ease-base);
}
.card-glass:hover { transform: translateY(-4px); }

.card-glass-dark {
  background: var(--glass-dark-bg);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-dark);
}

.card-feature {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--ease-base), transform var(--ease-base);
}
.card-feature:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}
.card-feature .card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(96, 165, 250, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.card-feature .card-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}
.card-feature .card-body {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

.card-dark {
  background: var(--color-surface-dark);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  color: var(--color-text-inverse);
}

/* ── Stats / Metrics ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.stat-value {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-brand-blue);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-medium);
  text-align: center;
  max-width: 160px;
}

@media (max-width: 767px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── CTA Section ── */
.section-cta {
  background: var(--gradient-cta);
  padding-block: var(--space-24);
  text-align: center;
}
.section-cta h2 {
  color: var(--color-white);
  margin-bottom: var(--space-4);
}
.section-cta p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
}

/* ── Glass Surface Utility ── */
.glass-surface {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

/* ── Footer ── */
.site-footer {
  background: var(--color-navy);
  color: var(--color-text-inverse);
  padding-block: var(--space-16);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-12);
  align-items: start;
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); }

.footer-logo {
  height: 48px;
  width: auto;
  display: block;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 280px;
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  gap: var(--space-12);
}

.footer-nav-group h4 {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-nav-group ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}

.footer-nav-group a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--ease-fast);
}
.footer-nav-group a:hover {
  color: var(--color-white);
  opacity: 1;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-legal {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-links a:hover {
  color: var(--color-white);
  opacity: 1;
}

@media (max-width: 767px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .footer-nav { flex-direction: column; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Contact Form ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  outline: none;
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
  min-height: 44px;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea { min-height: 140px; resize: vertical; }

.form-error { font-size: var(--text-sm); color: #DC2626; margin-top: var(--space-1); }
.form-hint  { font-size: var(--text-sm); color: var(--color-text-muted); }

.form-success {
  display: none;
  padding: var(--space-4) var(--space-5);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: #065F46;
  margin-top: var(--space-4);
}
.form-success.visible { display: block; }

.form-failure {
  display: none;
  padding: var(--space-4) var(--space-5);
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: #991B1B;
  margin-top: var(--space-4);
}
.form-failure.visible { display: block; }

/* ── Product Cards ── */
.product-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  background: var(--glass-dark-bg);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-dark);
  color: var(--color-text-inverse);
  transition: transform var(--ease-base);
}
.product-card:hover { transform: translateY(-4px); }

.product-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: #fff;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.product-name {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  color: var(--color-white);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.product-attribution {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.product-tagline {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  color: var(--color-brand-ice);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.product-description {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.65);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* ── Engagement Steps ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  counter-reset: step;
}

.step-item {
  position: relative;
  padding-top: var(--space-10);
}

.step-item::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-widest);
  color: var(--color-brand-blue);
  margin-bottom: var(--space-4);
}

.step-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.step-body {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

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

/* ── Industries strip ── */
.industries-strip {
  text-align: center;
  padding: var(--space-8);
  background: var(--color-surface-light);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  font-weight: var(--font-medium);
  letter-spacing: var(--tracking-wide);
}

/* ── Founder section ── */
.founder-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-12);
  align-items: start;
}

.founder-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.founder-name {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.founder-title {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.founder-bio {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.founder-bio p { margin-bottom: var(--space-4); }
.founder-bio p:last-child { margin-bottom: 0; }

.founder-linkedin {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-brand-blue);
}

@media (max-width: 767px) {
  .founder-card { grid-template-columns: 1fr; }
  .founder-photo { width: 120px; height: 120px; }
}

/* ── About teaser (home page) ── */
.about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about-teaser-photo {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-premium);
}

@media (max-width: 767px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser-photo { max-width: 240px; margin-inline: auto; }
}

/* ── 404 page ── */
.error-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-24) var(--space-6);
  padding-top: calc(var(--space-24) + 72px);
}

.error-code {
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: var(--font-bold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

/* ── Page Layout Helpers ── */
.page-hero-offset {
  padding-top: 72px; /* height of fixed nav */
}

.bg-light   { background: var(--color-surface-light); }
.bg-navy    { background: var(--color-navy); }
.bg-white   { background: var(--color-white); }
.bg-gradient { background: var(--gradient-hero-dark); }

/* .text-overline on navy: #2563eb has insufficient contrast — use Glass Cyan */
.bg-navy .text-overline { color: var(--color-brand-cyan); }

.text-white  { color: var(--color-white); }
.text-brand  { color: var(--color-brand-blue); }

/* Responsive form+aside layout — collapses to single column on mobile */
.layout-form-aside {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-16);
  align-items: start;
}
@media (max-width: 900px) {
  .layout-form-aside {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}
