/* ── profpi homepage ── */
/* Design tokens (colors, reset) come from css/tokens.css, loaded first. */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-space);
  color: var(--text-main);
  min-height: 100vh;
}

a {
  color: inherit;
}

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

html[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.85);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  border-radius: 8px;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.site-nav a.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.site-nav a.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle {
  display: flex;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--card-active);
}

/* ── Hero ── */
.hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: background 0.2s, transform 0.15s;
}

.btn-hero-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-hero-secondary {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-hero-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-visual {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  aspect-ratio: 420 / 320;
}

/* ── Shared section styling ── */
.features,
.tools {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 24px;
  scroll-margin-top: 80px;
}

.features h2,
.tools h2 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 36px;
}

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--card-active);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Tools grid ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tool-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

a.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.tool-card-visual {
  background: var(--card-active);
  padding: 20px;
  height: 150px;
}

.tool-card-visual-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.tool-card-body {
  padding: 20px;
}

.tool-card-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tool-card-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}

.tool-card-soon {
  opacity: 0.75;
  cursor: default;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border-color);
  margin-top: 24px;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    display: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }

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

  .site-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-color);
  }

  .site-nav a.nav-cta {
    text-align: center;
    margin-top: 10px;
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 40px 20px 24px;
  }

  .hero-visual {
    order: -1;
  }

  .hero-sub {
    max-width: none;
  }

  .features,
  .tools {
    padding: 40px 20px;
  }

  .features-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-copy h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-hero-primary {
    width: 100%;
    justify-content: center;
  }
}
