/* Pennoun Studio - v1 MVP stylesheet */

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

:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1c1917;
  --color-text-secondary: #57534e;
  --color-border: #e7e5e4;
  --color-accent: #0c4a6e;
  --color-accent-hover: #075985;
  --color-focus: #0284c7;
  --color-status-live: #15803d;
  --color-status-active: #1e40af;
  --color-status-practice: #9333ea;
  --color-status-prototype: #b45309;
  --color-status-planned: #78716c;
  --color-status-research: #78716c;
  --color-status-completed: #15803d;
  --color-badge-bg: #f0f0ee;
  --max-width: 1200px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', monospace;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
}

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

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Header / Nav */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--color-text);
  line-height: 1;
}

.nav-toggle:hover,
.nav-toggle:focus {
  background: var(--color-border);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.nav-menu {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.nav-menu a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-cta a {
  color: var(--color-accent);
  font-weight: 600;
}

/* Mobile nav */
@media (max-width: 767px) {
  .site-header .container {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "title toggle"
      "menu menu";
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 60px;
  }

  .site-title {
    grid-area: title;
  }

  .nav-toggle {
    grid-area: toggle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  .site-header nav {
    grid-area: menu;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0.25rem 0;
    gap: 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
  }

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

  .nav-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.75rem var(--space-md);
    border-bottom: none;
  }

  .nav-menu a:hover,
  .nav-menu a:focus {
    border-bottom-color: transparent;
  }

  .nav-menu a[aria-current="page"] {
    color: var(--color-accent);
    font-weight: 700;
    background: var(--color-badge-bg);
  }

  .nav-cta a {
    font-weight: 700;
    color: var(--color-accent);
  }
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-xl);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

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

.footer-nav a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

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

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--color-accent);
  color: #fff;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--color-badge-bg);
  color: var(--color-text-secondary);
}

.status-Live,
.status-live {
  background: #dcfce7;
  color: var(--color-status-live);
}

.status-Active,
.status-active {
  background: #dbeafe;
  color: var(--color-status-active);
}

.status-Practice\ Case,
.status-practice-case {
  background: #f3e8ff;
  color: var(--color-status-practice);
}

.status-Prototype,
.status-prototype {
  background: #fef3c7;
  color: var(--color-status-prototype);
}

.status-Planned,
.status-planned,
.status-Research,
.status-research {
  background: var(--color-badge-bg);
  color: var(--color-status-planned);
}

.status-Completed,
.status-completed {
  background: #dcfce7;
  color: var(--color-status-completed);
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  max-width: 70ch;
}

a {
  color: var(--color-accent);
}

a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* Section spacing */
.section {
  padding: var(--space-lg) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* Hero */
.hero {
  padding: var(--space-2xl) 0 var(--space-lg);
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-size: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subheadline {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hero-proof {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Credibility strip */
.credibility-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.credibility-item {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

/* Card grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.card-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  flex: 1;
}

.card .card-example {
  font-size: 0.85rem;
  margin-top: var(--space-sm);
  color: var(--color-text-secondary);
}

.card .card-link {
  margin-top: var(--space-md);
  font-weight: 600;
}

/* Project card */
.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card-image {
  width: 100%;
  height: 200px;
  background-color: var(--color-badge-bg);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 12px,
    rgba(0,0,0,0.03) 12px,
    rgba(0,0,0,0.03) 13px
  );
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}

.project-card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.project-card-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.project-card-meta .status-badge {
  font-size: 0.7rem;
}

.project-card-category {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.project-card-body p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  flex: 1;
  margin-bottom: var(--space-sm);
}

.project-card-body .card-link {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Process steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  counter-reset: step;
}

.process-step {
  counter-increment: step;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.process-step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.process-step h3 {
  margin-bottom: var(--space-xs);
}

.process-step p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Why points */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.why-point {
  padding: var(--space-md);
  border-left: 3px solid var(--color-accent);
}

.why-point h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.why-point p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: var(--space-xl) 0;
}

.cta-section h2 {
  margin-bottom: var(--space-sm);
}

.cta-section p {
  margin: 0 auto var(--space-lg);
  color: var(--color-text-secondary);
}

.cta-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Build history feed */
.build-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.build-entry {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  align-items: center;
}

.build-entry-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.build-entry h3 {
  font-size: 1rem;
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
}

.build-entry p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
  width: 100%;
}

/* Page header */
.page-header {
  padding: var(--space-lg) 0;
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

/* Services page */
.service-block {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: var(--space-lg);
}

.service-block h2 {
  margin-bottom: var(--space-sm);
}

.service-block p {
  color: var(--color-text-secondary);
}

.service-block .service-examples {
  margin-top: var(--space-md);
  font-size: 0.9rem;
}

/* Form placeholder */
.form-placeholder {
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  text-align: center;
}

.form-placeholder p {
  margin: 0 auto;
  color: var(--color-text-secondary);
}

.form-placeholder .contact-options {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

/* Privacy / Terms */
.prose {
  max-width: 70ch;
  margin: 0 auto;
}

.prose h2 {
  margin-top: var(--space-xl);
}

.prose h3 {
  margin-top: var(--space-lg);
}

.prose ul,
.prose ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.prose li {
  margin-bottom: var(--space-xs);
}

.prose p {
  color: var(--color-text-secondary);
}

/* Utility */
.text-center {
  text-align: center;
}

.btn--full {
  width: 100%;
}

.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.text-muted-spaced {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.prose-centered {
  margin: 0 auto;
  text-align: center;
}

.section-centered {
  min-height: 50vh;
  display: flex;
  align-items: center;
}

.mt-lg {
  margin-top: var(--space-lg);
}

/* Responsive */
@media (max-width: 767px) {
  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.25rem;
  }

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

  .hero-subheadline {
    font-size: 1rem;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

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

  .card-grid--wide {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

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

  .site-footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  .section {
    padding: var(--space-lg) 0;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .credibility-strip {
    flex-direction: column;
    align-items: center;
  }

  .build-entry {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}
