html {
  scroll-behavior: smooth;
}

:root {
  --ink: #1a1a1a;
  --ink-light: #555;
  --paper: #faf8f4;
  --paper-alt: #f0ece3;
  --accent: #c94f2b;
  --accent-dark: #a83f20;
  --border: #ddd6c9;
  --max-width: 1200px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin: 0 0 16px;
  color: var(--ink-light);
}

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

/* Beta banner */

.beta-banner {
  background: var(--accent-dark);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px 8px 24px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

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

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 24px;
  font-size: 0.95rem;
}

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

/* Hero */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero .subhead {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
}

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

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

/* Value props */

.value-props {
  padding: 0 0 56px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  background: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.value-card h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.value-card p {
  font-size: 0.95rem;
  margin: 0 0 20px;
}

.value-card .btn {
  margin-top: auto;
}

/* How it works */

.how-it-works {
  padding: 56px 0;
  background: var(--paper-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 40px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.steps li {
  text-align: left;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.steps h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.steps p {
  font-size: 0.92rem;
  margin: 0;
}

/* Community */

.community-section {
  padding: 56px 0;
  background: var(--paper-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.community-section h2 {
  margin-bottom: 16px;
}

.community-subhead {
  max-width: 640px;
  margin: 0 auto 40px;
}

.community-features {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: left;
}

.community-features h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.community-features p {
  font-size: 0.92rem;
  margin: 0;
}

.community-cta {
  display: flex;
  justify-content: center;
}

/* Browse shops */

.browse-section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.browse-section h2 {
  margin-bottom: 8px;
}

.shop-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 32px;
  max-width: 560px;
}

.shop-filters .form-row {
  flex: 1;
  min-width: 180px;
}

.shop-filters select,
.shop-filters input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.shop-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.shop-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.shop-card-thumb {
  width: calc(100% + 40px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin: -20px -20px 0;
}

.shop-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.shop-card .shop-category {
  display: inline-block;
  align-self: flex-start;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-light);
}

.shop-card .shop-location {
  font-size: 0.9rem;
  color: var(--ink-light);
  margin: 0;
}

.shop-card .shop-meta {
  font-size: 0.9rem;
  margin: 0;
}

.shop-card .shop-blurb {
  font-size: 0.9rem;
  margin: 0;
}

.shop-card .btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 10px 18px;
  font-size: 0.9rem;
}

.shops-empty {
  color: var(--ink-light);
  font-size: 0.95rem;
  padding: 24px 0;
}

.quote-banner {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 16px;
}

/* Nav auth */

#nav-auth {
  display: inline-flex;
  align-items: center;
}

#nav-auth a,
#nav-auth .nav-user {
  margin-left: 24px;
  font-size: 0.95rem;
}

.nav-user {
  color: var(--ink-light);
}

.verify-banner {
  background: #fdf3e2;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #8a5b1e;
}

.verify-banner .btn {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* Auth pages */

.role-toggle {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.role-option {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  background: #fff;
}

.role-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--paper-alt);
}

.role-option input {
  margin: 0;
}

.auth-switch {
  margin-top: 16px;
  font-size: 0.9rem;
}

.auth-prompt {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 8px;
}

.auth-prompt p {
  margin-bottom: 16px;
}

/* Dashboard */

.dashboard-status {
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: inline-block;
}

.status-pending {
  background: #fdf3e2;
  color: #8a5b1e;
}

.status-approved {
  background: #e4f3e6;
  color: #2a7a3b;
}

.status-rejected {
  background: #fbe6e4;
  color: #b3261e;
}

/* Admin */

.admin-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: #fff;
}

.admin-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.admin-card p {
  font-size: 0.9rem;
  margin: 0 0 6px;
}

.admin-meta {
  color: var(--ink-light);
  font-size: 0.8rem;
}

.admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.admin-actions .btn {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.admin-shop-images {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}

.admin-shop-image {
  margin: 0;
}

.admin-shop-image .image-preview {
  width: 120px;
  height: 120px;
}

.admin-shop-image figcaption {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-top: 4px;
}

/* Signup sections */

.signup-section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.signup-section .wrap {
  max-width: 560px;
}

.signup-section h2 {
  margin-bottom: 12px;
}

.signup-form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--ink-light);
  margin: 0;
}

.form-row input,
.form-row textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.signup-form .btn {
  align-self: flex-start;
  margin-top: 8px;
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.2em;
}

.form-status.success {
  color: #2a7a3b;
}

.form-status.error {
  color: #b3261e;
}

.image-preview {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.shop-profile-section {
  padding: 48px 0;
}

.shop-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.shop-profile-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.shop-profile-header h1 {
  margin: 4px 0;
  font-size: 1.6rem;
}

.shop-profile-bio {
  white-space: pre-wrap;
  margin: 16px 0;
}

.shop-work-photo {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  display: block;
}

/* Quote requests + messaging */

.quotes-section {
  padding: 40px 0 56px;
}

.quotes-section h2 {
  margin-bottom: 8px;
}

.quote-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: #fff;
}

.quote-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.quote-card p {
  font-size: 0.9rem;
  margin: 0 0 6px;
}

.quote-meta {
  color: var(--ink-light);
  font-size: 0.8rem;
}

.thread-panel {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.thread-messages {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.thread-empty {
  color: var(--ink-light);
  font-size: 0.85rem;
}

.message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--paper-alt);
  border: 1px solid var(--border);
}

.message-bubble.mine {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.message-bubble.mine p,
.message-bubble.mine .message-time {
  color: rgba(255, 255, 255, 0.85);
}

.message-bubble p {
  margin: 0 0 6px;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.attachment-download {
  display: block;
  cursor: pointer;
}

.message-bubble img {
  max-width: 100%;
  border-radius: 6px;
  display: block;
  margin-bottom: 6px;
}

.message-time {
  font-size: 0.75rem;
  color: var(--ink-light);
}

.thread-composer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.thread-composer textarea {
  flex: 1;
  min-width: 180px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.thread-composer input[type="file"] {
  font-size: 0.85rem;
  max-width: 160px;
}

/* Maker feed */

.feed-section {
  padding: 40px 0 56px;
}

.feed-section h2 {
  margin-bottom: 8px;
}

.location-banner {
  background: #fdf3e2;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #8a5b1e;
}

.location-banner form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-banner input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100px;
}

.location-banner .btn {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.feed-toolbar label {
  font-size: 0.9rem;
  color: var(--ink-light);
}

.feed-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.feed-composer {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  background: #fff;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-composer[hidden] {
  display: none;
}

.feed-composer textarea {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.feed-composer-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.feed-composer input[type="file"] {
  font-size: 0.85rem;
  max-width: 200px;
}

.feed-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-post {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  background: #fff;
}

.feed-post-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.feed-post-author {
  font-weight: 600;
  font-size: 0.95rem;
}

.feed-post-meta {
  font-size: 0.8rem;
  color: var(--ink-light);
}

.feed-post-body {
  font-size: 0.95rem;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 10px;
}

.feed-post-image {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  display: block;
}

.feed-post-actions {
  display: flex;
  gap: 8px;
}

.feed-post-actions .btn {
  padding: 6px 14px;
  font-size: 0.85rem;
}

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

.feed-comments {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.feed-load-more {
  display: block;
  margin: 24px auto 0;
}

.feed-load-more[hidden] {
  display: none;
}

.feed-empty {
  color: var(--ink-light);
  font-size: 0.95rem;
  padding: 24px 0;
}

/* Footer */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* Policies page */

.policy-section {
  padding: 56px 0 72px;
}

.policy-wrap {
  max-width: 720px;
}

.policy-section h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 8px;
}

.policy-section .subhead {
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.policy-section h2 {
  font-size: 1.4rem;
  margin-top: 40px;
}

.policy-section h3 {
  font-size: 1.05rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.policy-section ul {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--ink-light);
}

.policy-section li {
  margin-bottom: 8px;
}

/* Responsive */

@media (max-width: 720px) {
  .steps,
  .community-features {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .site-header nav a {
    margin-left: 16px;
  }
}

@media (max-width: 480px) {
  .steps,
  .community-features {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 40px;
  }
}
