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

/* Reserve space for scrollbar so layout doesn't shift when navigating between
   short pages (no scrollbar) and long pages (scrollbar). Stops header/logo/menu shift.
   Responsive: scrollbar-gutter everywhere (safe on mobile); overflow fallback only on
   viewports where scrollbars typically take layout space (desktop). */
html {
  scrollbar-gutter: stable;
}
@supports not (scrollbar-gutter: stable) {
  @media (min-width: 768px) {
    html {
      overflow-y: scroll; /* fallback on desktop only; mobile often has overlay scrollbar */
    }
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

a { color: #4A90E2; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* === Layout === */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  padding-top: 40px;
  padding-bottom: 48px;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: stretch; }
.grid-2 > * { display: flex; }
.grid-2 > * > .card { flex: 1; }
.card-stack { display: flex; flex-direction: column; gap: 20px; }
.card-list { display: flex; flex-direction: column; gap: 16px; }

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(250, 249, 180, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a1a1a;
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover { text-decoration: none; }

.logo-icon {
  width: 32px;
  height: 32px;
  background: #4A90E2;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

nav { margin-left: auto; display: flex; gap: 4px; }
nav a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #555;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
nav a:hover { background: rgba(0, 0, 0, .06); text-decoration: none; }
nav a.active { background: rgba(0, 0, 0, .08); font-weight: 500; color: #1a1a1a; }

/* === Mobile nav === */
.hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger svg { width: 28px; height: 28px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 24px 12px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  background: rgba(250, 249, 180, .98);
}

.mobile-nav a {
  padding: 12px;
  border-radius: 6px;
  font-size: 1rem;
  color: #555;
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(0, 0, 0, .06);
  color: #1a1a1a;
}

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

/* === Hero === */
.hero { position: relative; overflow: hidden; }

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74, 144, 226, .08), transparent, rgba(250, 249, 180, .15));
}

.hero-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 36px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text { flex: 1; }

.hero-text .badge {
  display: inline-block;
  background: #f3f4f6;
  color: #555;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.hero-text h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.15; margin-bottom: 16px; }
.hero-text h1 span { color: #4A90E2; }
.hero-text p { font-size: 1.05rem; color: #666; max-width: 480px; margin-bottom: 24px; }

.hero-logo img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .1));
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }
.btn-primary { background: #4A90E2; color: #fff; }
.btn-primary:hover { background: #3a7bd5; }
.btn-outline { background: #fff; color: #1a1a1a; border: 1px solid #ddd; }
.btn-outline:hover { background: #f9f9f9; }
.btn-sm { padding: 6px 14px; font-size: 0.875rem; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* === Cards === */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  transition: box-shadow .15s, transform .15s;
}

.card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }

/* === Shared flex patterns === */
.flex-center { display: flex; align-items: center; }
.flex-center-gap { display: flex; align-items: center; gap: 12px; }
.flex-center-gap-sm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* === Icon boxes === */
.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(74, 144, 226, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #4A90E2;
  font-size: 18px;
}

.icon-box-lg {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

/* === Typography === */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.section-desc { color: #666; margin-bottom: 32px; font-size: 1rem; }
.text-muted { color: #666; }
.text-sm { font-size: 0.9375rem; }
.text-xs { font-size: 0.8125rem; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.heading-card { font-size: 1.1rem; }
.heading-md { font-size: 1.25rem; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Spacing === */
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-2 { margin-top: 4px; }
.mt-4 { margin-top: 8px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.pt-2 { padding-top: 8px; }

/* === Avatars & badges === */
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.avatar-p { background: rgba(74, 144, 226, .1); color: #4A90E2; }
.avatar-j { background: #f3f4f6; color: #555; }

.badge-sm {
  display: inline-block;
  background: #f3f4f6;
  color: #555;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 0.7rem;
}

.badge-outline {
  display: inline-block;
  border: 1px solid #ddd;
  color: #555;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-row { display: flex; gap: 4px; flex-wrap: wrap; }

/* === Feature rows === */
.feature-row { display: flex; align-items: start; gap: 12px; }
.feature-content { flex: 1; min-width: 0; }

/* === Giants card === */
.giants-card { display: flex; align-items: center; gap: 24px; }
.giants-card img {
  width: 256px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.9375rem; font-weight: 500; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, .1);
}

textarea { resize: vertical; min-height: 100px; }
textarea.short { min-height: 80px; }

/* === Lists & checklists === */
.check-item { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: #666; }
.check-box { width: 16px; height: 16px; border: 1px solid #ccc; border-radius: 3px; flex-shrink: 0; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
  margin-top: 8px;
}

.list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: #666;
  line-height: 1.5;
}

/* === Steps === */
.step { display: flex; align-items: center; gap: 12px; }

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: #666;
  flex-shrink: 0;
  font-family: monospace;
}

.step-label { font-size: 0.9375rem; font-weight: 500; }
.step-time { font-size: 0.8125rem; color: #666; }

/* === Social cards === */
.social-card {
  display: flex;
  align-items: start;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.social-card:hover { text-decoration: none; }
.social-link { text-decoration: none; color: inherit; }
.social-link:hover { text-decoration: none; }
.external-icon { font-size: 12px; }

/* === Footer === */
.footer {
  border-top: 1px solid #e5e7eb;
  padding: 32px 24px;
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer p { margin: 2px 0; }

/* === Misc === */
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state .icon-box { margin: 0 auto 16px; }
.empty-state p { max-width: 400px; margin-left: auto; margin-right: auto; }
.success-box { text-align: center; padding: 48px 24px; }

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: rgba(74, 144, 226, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  color: #4A90E2;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-indent { padding-left: 52px; }
.link-list { display: flex; gap: 6px; flex-wrap: wrap; }
.home-section { padding-top: 24px; padding-bottom: 64px; }
.home-section-flush { padding-bottom: 64px; }
.clickable { cursor: pointer; }

/* === Responsive: tablet and below === */
@media (max-width: 768px) {
  nav { display: none; }
  .hamburger { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; text-align: center; gap: 24px; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-logo img { width: 180px; height: 180px; }
  .hero-text h1 { font-size: 2rem; }
  .btn-group { justify-content: center; }
  .giants-card { flex-direction: column; }
  .giants-card img { width: 100%; height: 180px; }
  .section-indent { padding-left: 0; }
}

/* === Responsive: phone === */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; align-items: start; }
}
