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

:root {
  --bg: #ffffff;
  --bg-subtle: #f9fafb;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 1rem;

  --accent: #f97316;
  --accent-light: #fff7ed;
  --accent-hover: #ea580c;

  --stim: #8b5cf6;
  --stim-light: #f5f3ff;
  --mersea: #0ea5e9;
  --mersea-light: #f0f9ff;
  --pump: #22c55e;
  --pump-light: #f0fdf4;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ===== Header ===== */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 1.5rem; }

.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--accent);
  transition: color 0.15s;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

/* ===== Hero ===== */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero p {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Project Tiles ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 0 0 4rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.project-card .card-accent {
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

.project-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  flex: 1;
}

.card-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ===== Contact Section ===== */
.contact-section {
  text-align: center;
  padding: 3rem 0;
}

.contact-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-section p { color: var(--text-muted); }

.contact-section a {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.15s;
}

.contact-section a:hover { color: var(--accent-hover); }

/* ===== Project Detail Page ===== */
.project-hero {
  padding: 4rem 0 3rem;
}

.project-hero .container {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.project-hero-text { flex: 1; min-width: 0; }

.project-hero-phones {
  flex-shrink: 0;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.project-hero .project-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.project-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.project-hero .tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 560px;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ===== Phone Screenshot ===== */
.phone-mockup {
  width: 240px;
}

.phone-mockup img {
  width: 100%;
  border-radius: 0.5rem;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.15s;
}

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

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

.btn-primary:hover { background: #374151; }

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: #f3f4f6; }

/* ===== Features List ===== */
.features-section { padding: 2rem 0 3rem; }

.features-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-item {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
}

.feature-item h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== Sub-navigation (Support / Privacy) ===== */
.sub-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.sub-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: color 0.15s, border-color 0.15s;
}

.sub-nav a:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ===== Content Pages (Support / Privacy) ===== */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-header .breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.page-header .breadcrumb a {
  color: var(--accent);
  transition: color 0.15s;
}

.page-header .breadcrumb a:hover { color: var(--accent-hover); }

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-size: 0.9375rem;
}

.content-section {
  padding: 2.5rem 0;
  max-width: 680px;
}

.content-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.content-section h2:first-child { margin-top: 0; }

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.content-section ul {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text-muted);
}

.content-section li { margin-bottom: 0.5rem; }

.content-section strong { color: var(--text); }

.content-section a {
  color: var(--accent);
  transition: color 0.15s;
}

.content-section a:hover { color: var(--accent-hover); }

.updated-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ===== FAQ Accordion ===== */
.faq-list { margin-top: 1rem; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 1.125rem 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s;
}

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

.faq-item .faq-answer {
  padding: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ===== Contact Box ===== */
.contact-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin-top: 2.5rem;
}

.contact-box h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-box p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.contact-box a {
  color: var(--accent);
  font-weight: 600;
}

/* (screenshot-section removed — screenshots now inline in project-hero) */

/* ===== Color Variants ===== */
.accent-stim { background: var(--stim); }
.accent-mersea { background: var(--mersea); }
.accent-pump { background: var(--pump); }

.label-stim { background: var(--stim-light); color: var(--stim); }
.label-mersea { background: var(--mersea-light); color: var(--mersea); }
.label-pump { background: var(--pump-light); color: var(--pump); }

/* ===== Utilities ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .project-hero .container {
    flex-direction: column;
    text-align: center;
  }

  .project-hero-phones {
    justify-content: center;
    order: -1;
  }

  .phone-mockup { width: 180px; }

  .project-hero h1 { font-size: 1.75rem; }
  .project-hero .tagline { max-width: none; }
  .project-links { justify-content: center; }
  .sub-nav { justify-content: center; }
  .page-header h1 { font-size: 1.5rem; }

  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.8125rem; }
}

@media (max-width: 480px) {
  .site-header .container { flex-wrap: wrap; gap: 0.75rem; }
  .nav-links { width: 100%; justify-content: center; }
  .project-links { flex-direction: column; }
  .btn { justify-content: center; }
  .phone-mockup { width: 160px; }
}
