:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --paper: #fafaf7;
  --paper-alt: #f0efe9;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --rule: #e5e4de;
  --max: 720px;
  --pad: 1.5rem;
}

* { box-sizing: border-box; }

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}

/* Header */
.site-header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover { text-decoration: none; }

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Main */
main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.hero {
  padding: 1.5rem 0 2rem;
}

.tagline {
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  max-width: 40em;
}

h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

p { margin: 0 0 1rem; }

/* Product cards */
.products {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.product {
  border: 1px solid var(--rule);
  background: var(--paper-alt);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.15s ease;
}

.product:hover { border-color: var(--ink-soft); }

.product h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.product h3 a {
  color: var(--ink);
  text-decoration: none;
}

.product h3 a:hover { text-decoration: underline; }

.product .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product p { margin: 0; color: var(--ink-soft); }

.product .status {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 0.5rem;
}

/* Legal / long-form */
.prose h2 { margin-top: 2.5rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.25rem; }

.updated {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a { color: var(--ink-soft); }

@media (max-width: 480px) {
  html { font-size: 16px; }
  .tagline { font-size: 1.5rem; }
  .site-header { padding: 1.5rem 0 0.75rem; }
  main { padding: 1.5rem 0 3rem; }
}

/* --- Per-page image treatments --- */

/* Treatment 1 — Side background: paper-column of text, photo bleeds on the sides */
main.with-side-bg {
  padding: 0;
  display: flex;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

main.with-side-bg > .wrap {
  background: var(--paper);
  padding: 2.5rem var(--pad) 4rem;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
}

/* Treatment 2 — Side-by-side: text next to an image panel */
main.with-side-image > .wrap {
  max-width: 960px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

main.with-side-image .side-image {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  border: 1px solid var(--rule);
  min-height: 200px;
}

main.with-side-image.image-right .content { order: 0; }
main.with-side-image.image-right .side-image { order: 1; }
main.with-side-image.image-left .side-image { order: 0; }
main.with-side-image.image-left .content { order: 1; }

@media (max-width: 780px) {
  main.with-side-image > .wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  main.with-side-image .side-image {
    aspect-ratio: 16 / 9;
    order: 0 !important;
  }
  main.with-side-image .content {
    order: 1 !important;
  }
}

/* Treatment 3 — Top banner: full-width image above the article */
main.with-top-banner {
  padding: 0 0 4rem;
}

main.with-top-banner .top-banner {
  height: 240px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 480px) {
  main.with-top-banner .top-banner {
    height: 150px;
    margin-bottom: 1.5rem;
  }
}

/* Per-page background image assignments (kept here to satisfy strict CSP) */
main.bg-home { background-image: url('/assets/img/emile-perron-xrVDYZRGdw4-unsplash.jpg'); }
main.bg-products { background-image: url('/assets/img/christopher-gower-m_HRfLhgABo-unsplash.jpg'); }
main.bg-about .side-image { background-image: url('/assets/img/ilya-pavlov-OqtafYT5kTw-unsplash.jpg'); }
main.bg-contact .side-image { background-image: url('/assets/img/florian-olivo-4hbJ-eymZ1o-unsplash.jpg'); }
main.bg-privacy .top-banner { background-image: url('/assets/img/fotis-fotopoulos-6sAl6aQ4OWI-unsplash.jpg'); }
main.bg-terms .top-banner { background-image: url('/assets/img/mohammad-rahmani-8qEB0fTe9Vw-unsplash.jpg'); }
