/* ==========================================================================
   Anthill — Minimalist Black & White System Stylesheet
   No external CDNs, no webfonts, fully responsive, WCAG 4.5:1+ contrast
   ========================================================================== */

:root {
  --bg: #ffffff;
  --text: #111113;
  --text-muted: #52525b;
  --border: #e4e4e7;
  --card-bg: #f8f8fa;
  --card-hover: #f1f1f4;
  --accent: #18181b;
  --accent-text: #ffffff;
  --focus-ring: #18181b;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --card-bg: #18181b;
    --card-hover: #222226;
    --accent: #f4f4f5;
    --accent-text: #09090b;
    --focus-ring: #ffffff;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-system);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Accessibility: Skip to Content */
.skip-link {
  position: absolute;
  top: -120px;
  left: 1rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  z-index: 9999;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
header.site-header {
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.2;
}

nav.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}

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

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Main Content */
main {
  flex: 1;
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p.lead {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.1s ease, background-color 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn.btn-disabled,
span.btn.btn-disabled {
  opacity: 0.75;
  cursor: default;
  pointer-events: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--card-bg);
}

/* App Screenshot & Placeholder */
.screenshot-container {
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background-color: var(--card-bg);
}

.screenshot-placeholder {
  border: 2px dashed var(--border);
  background: var(--card-bg);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: none;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 460px;
}

.placeholder-icon {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.placeholder-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.placeholder-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.screenshot-container picture,
.screenshot-container img {
  display: block;
  width: 100%;
  height: auto;
}

/* Features Section */
.features-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}

.feature-card:hover {
  border-color: var(--text-muted);
}

.feature-icon {
  margin-bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

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

/* FAQ Section */
.faq-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

details.faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

details.faq-item:hover {
  border-color: var(--text-muted);
}

summary.faq-question {
  padding: 1.1rem 1.25rem;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

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

summary.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

details[open] summary.faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 1.25rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Legal & Policy Pages */
.page-header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-header .page-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto 4rem;
}

.legal-content section {
  margin-bottom: 2.2rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.legal-content p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 0.9rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal-content li {
  margin-bottom: 0.35rem;
}

.legal-content a,
.faq-answer a,
.support-card a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover,
.faq-answer a:hover,
.support-card a:hover {
  text-decoration: none;
}

.highlight-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin: 1.2rem 0;
}

.highlight-box p {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 500;
}

/* Support Page */
.support-container {
  max-width: 760px;
  margin: 0 auto 4rem;
}

.support-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.support-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.support-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.support-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  padding: 0.85rem 1.8rem;
}

.tips-section {
  margin-top: 3rem;
}

.tips-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.tip-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.tip-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.tip-item p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 0;
}

/* 404 Page */
.error-page {
  text-align: center;
  padding: 5rem 0;
  max-width: 500px;
  margin: 0 auto;
}

.error-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  display: block;
}

.error-page h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

.footer-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  nav.site-nav ul {
    gap: 1rem;
  }
  
  .hero {
    padding: 2.5rem 0 2rem;
  }
  
  .support-card {
    padding: 1.5rem;
  }
  
  .support-email-btn {
    font-size: 0.92rem;
    padding: 0.75rem 1.2rem;
    word-break: break-all;
  }
}
