*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg: #FAF8F5;
  --bg-warm: #F5F0EB;
  --surface: #FEFDFB;
  --surface-alt: #F7F3EF;
  --text: #2C1810;
  --text-secondary: #6B5B50;
  --text-tertiary: #9C8B80;
  --accent: #8B4513;
  --accent-hover: #6D3610;
  --accent-light: #D4A574;
  --accent-bg: #FDF6EE;
  --border: #E8DDD4;
  --border-light: #F0E8E0;
  --glow: rgba(139, 69, 19, 0.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* Warm radial glow */
body::after {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-wrapper {
  position: relative;
  z-index: 1;
}

/* ---- Navbar ---- */
.navbar-wrapper {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 2rem);
  max-width: 900px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 1.25rem;
  background: rgba(250, 248, 245, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(44, 24, 16, 0.06);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.wordmark-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-left: 10px;
}

.wordmark-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: color 0.15s;
}

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

.nav-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.15s;
}

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

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 7rem 2rem 4rem;
  max-width: 780px;
  margin: 0 auto;
}

.credibility {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
  padding: 0.35rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.credibility-logo {
  height: 14px;
  width: auto;
  opacity: 0.85;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero .subheadline {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 2.25rem;
}

.primary-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 2.25rem;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(139, 69, 19, 0.2), 0 4px 12px rgba(139, 69, 19, 0.1);
}

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

.cta-helper {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  margin-top: 1rem;
  letter-spacing: 0.01em;
}

.vision-line {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  margin-top: 1.25rem;
  opacity: 0.7;
}

/* ---- Hero visual ---- */
.hero-visual {
  margin: 3.5rem auto 0;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(44, 24, 16, 0.04), 0 8px 32px rgba(44, 24, 16, 0.03);
}

.visual-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.visual-header::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 2px;
}

.visual-steps {
  padding: 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.visual-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  font-size: 0.88rem;
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;
  color: var(--text-secondary);
}

.visual-step:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.visual-step .indicator {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.indicator-fail {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.indicator-detect {
  background: #FDF6EE;
  color: var(--accent);
  border: 1px solid #F0DCC8;
}

.indicator-fix {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

/* ---- Section shared ---- */
section {
  padding: 5rem 2rem;
  max-width: 1080px;
  margin: 0 auto;
}

.section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 3rem;
  color: var(--text);
}

/* ---- Flow ---- */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.flow-item {
  padding: 2rem 1.75rem;
  position: relative;
}

.flow-item:not(:last-child) {
  border-right: 1px solid var(--border);
}

.flow-item .num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.flow-item h3 {
  font-size: 0.95rem;
  font-weight: 650;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.flow-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ---- Pain ---- */
.pain-section {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.pain-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.pain-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ---- Trust ---- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.trust-item {
  padding: 2rem 1.75rem;
  background: var(--surface);
}

.trust-item h3 {
  font-size: 0.92rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.trust-item p {
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ---- Team ---- */
.team-section {
  text-align: center;
}

.team-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 540px;
  margin: -1.5rem auto 2.5rem;
}

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

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.team-linkedin {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.team-linkedin:hover {
  text-decoration: underline;
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.team-avatar.initials {
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.team-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.team-bio {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ---- Final CTA ---- */
.final-cta {
  text-align: center;
  padding: 5rem 2rem 6rem;
  max-width: 1080px;
  margin: 0 auto;
}

.final-cta-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.final-cta-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
}

.final-cta h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.final-cta .body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-light);
}

/* ---- Dashboard ---- */
.dashboard-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

.dashboard-header {
  margin-bottom: 1.5rem;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.dashboard-meta {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: 0 2px 8px rgba(44, 24, 16, 0.04), 0 8px 32px rgba(44, 24, 16, 0.03);
}

.admin-owner-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  margin-bottom: 0.35rem;
}

.admin-owner-filter label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.admin-owner-filter input {
  height: 30px;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  min-width: 180px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.dashboard-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.dashboard-table tbody tr {
  transition: background 0.1s;
}

.dashboard-table tbody tr:hover {
  background: var(--accent-bg);
}

.dashboard-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  color: var(--text);
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table .col-diagnosis {
  max-width: 480px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.dashboard-table .col-repo {
  font-weight: 600;
  white-space: nowrap;
}

.dashboard-table .col-repo small {
  display: block;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}

.dashboard-table .col-meta {
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.dashboard-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dashboard-badge.success {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.dashboard-badge.failed {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.dashboard-badge.investigating,
.dashboard-badge.fixing,
.dashboard-badge.polling {
  background: #FDF6EE;
  color: var(--accent);
  border: 1px solid #F0DCC8;
}

.dashboard-badge.pending {
  background: var(--surface-alt);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

.dashboard-dim {
  color: var(--text-tertiary);
  font-style: italic;
}

.dashboard-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.dashboard-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.dashboard-logsage-btn {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid #F0DCC8;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s;
}

.dashboard-logsage-btn:hover {
  background: #F0DCC8;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .hero { padding: 6rem 1.5rem 3rem; }

  .hero h1 { font-size: 2.2rem; }

  .flow-grid {
    grid-template-columns: 1fr;
  }

  .flow-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  section { padding: 3.5rem 1.5rem; }
  .pain-section { padding: 3.5rem 1.5rem; }
  .final-cta { padding: 3.5rem 1.5rem 4rem; }
  .final-cta-inner { padding: 3rem 1.5rem; }

  .dashboard-container {
    padding: 5rem 1rem 2rem;
  }

  .dashboard-card {
    overflow-x: auto;
  }

  .dashboard-table {
    min-width: 700px;
  }

  .hamburger {
    display: flex;
  }

  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.6rem 1.25rem;
    border-radius: 16px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid var(--border);
    margin-top: 0.6rem;
  }

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

  .nav-link {
    text-align: center;
    padding: 0.5rem;
  }

  .nav-cta {
    text-align: center;
    width: 100%;
  }
}

/* Allowlist management */
.allowlist-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.allowlist-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.allowlist-input:focus {
  outline: none;
  border-color: var(--accent);
}
.allowlist-add-btn {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.allowlist-add-btn:hover {
  opacity: 0.9;
}
.allowlist-remove-btn {
  padding: 3px 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.allowlist-remove-btn:hover {
  border-color: #c0392b;
  color: #c0392b;
}
