/* BuildWise — shared styles */

:root {
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --blue: #2563eb;
  --blue-soft: #3b82f6;
  --orange: #f97316;
  --neutral-bg: #f8fafc;
  --neutral-card: #ffffff;
  --neutral-border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-on-dark: #f1f5f9;
  --text-on-dark-secondary: #cbd5e1;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --max-width: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --neutral-bg: #0b1220;
    --neutral-card: #131c2e;
    --neutral-border: #22304a;
    --text-primary: #f1f5f9;
    --text-secondary: #a8b3c5;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--neutral-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

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

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Header / Nav */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-on-dark);
  font-weight: 700;
  font-size: 1.15rem;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-on-dark-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: #fff;
  background: var(--blue);
}

.nav-toggle {
  display: none;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--text-on-dark);
  padding: 72px 24px 96px;
  text-align: center;
}

.hero .container {
  max-width: 760px;
}

.hero-logo {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--orange);
  font-weight: 600;
  margin: 0 0 20px;
}

.hero p.description {
  font-size: 1.05rem;
  color: var(--text-on-dark-secondary);
  margin: 0 auto 32px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--blue-soft);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.btn-disabled {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Main content sections */
main {
  padding: 64px 0;
}

.section {
  padding: 48px 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  text-align: center;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-lead {
  text-align: center;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--neutral-card);
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* Pro callout */
.pro-callout {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.pro-callout h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.pro-callout p {
  color: var(--text-on-dark-secondary);
  max-width: 560px;
  margin: 0 auto 24px;
}

.badge-orange {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* Store badges placeholder */
.store-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Legal / content pages */
.page-header {
  background: var(--navy);
  color: var(--text-on-dark);
  padding: 48px 24px;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.page-header .updated {
  color: var(--text-on-dark-secondary);
  font-size: 0.95rem;
}

.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
}

.content h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 12px;
  font-weight: 700;
}

.content h2:first-of-type {
  margin-top: 0;
}

.content p,
.content li {
  color: var(--text-secondary);
  font-size: 1rem;
}

.content ul {
  padding-left: 20px;
}

.content a {
  word-break: break-word;
}

/* FAQ */
.faq-item {
  background: var(--neutral-card);
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 400;
  margin-left: 12px;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item .faq-answer {
  padding: 0 22px 20px;
  color: var(--text-secondary);
}

.support-contact {
  background: var(--neutral-card);
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.support-contact a {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--text-on-dark-secondary);
  padding: 40px 24px 28px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  color: var(--text-on-dark);
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-on-dark-secondary);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark-secondary);
}

/* Responsive nav */
@media (max-width: 640px) {
  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    padding: 10px;
    font-size: 0.92rem;
  }

  .nav-brand span.brand-text {
    display: none;
  }

  .hero {
    padding: 56px 20px 72px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
