/* overseed placeholder site
   Type, charcoal and linen come from /brand/tokens.css. The site swaps the kit's
   walnut/sand accents for greens, defined here.
   Contrast (WCAG): charcoal on linen 14.13:1, moss on linen 7.24:1,
   linen on moss 7.24:1, linen on moss-dark 9.84:1. Sage is for rules/fills only, never text. */

:root {
  --color-moss: #3D5A40;
  --color-moss-dark: #2E4531;
  --color-sage: #C9D1BE;
  --color-sage-light: #DDE2D2;
  --color-linen: #FAF8F4; /* lighter than the kit's #F3EEE4: just off-white */

  --accent: var(--color-moss);
  --accent-dark: var(--color-moss-dark);
  --rule: var(--color-sage);
  --measure: 34rem;
  --gutter: 1.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gutter);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: var(--weight-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Accessibility helpers ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-invert);
  color: var(--text-invert);
  border-radius: 4px;
  transform: translateY(-150%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: none;
}

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

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

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

/* ---------- Header ---------- */

.site-header {
  padding-top: clamp(3rem, 10vw, 6rem);
}

/* Plain "overseed" wordmark; ".earth" only appears where the web address matters */
.logo {
  display: inline-block;
  padding: 0.5rem;
}

.logo img {
  display: block;
  width: clamp(9.5rem, 42vw, 12rem);
  height: auto;
}

/* ---------- Intro ---------- */

main {
  width: 100%;
  max-width: var(--measure);
  flex: 1;
}

.intro {
  padding: clamp(2.5rem, 9vw, 4.5rem) 0 clamp(2.5rem, 8vw, 4rem);
}

h1 {
  margin: 0 0 1.25rem;
  font-weight: var(--weight-heading);
  font-size: clamp(2rem, 8.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.subhead {
  margin: 0 auto 2.25rem;
  max-width: 28rem;
  font-size: 1.125rem;
  text-wrap: pretty;
}

.button {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  background: var(--accent);
  color: var(--text-invert);
  font-weight: var(--weight-medium);
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--accent-dark);
  color: var(--text-invert);
}

.button:focus-visible {
  outline-offset: 4px;
  border-radius: 999px;
}

/* ---------- Hero ---------- */

.hero-figure {
  margin: 0;
}

.hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 6px;
  background-color: var(--color-sage);
}

/* Woven-linen texture made from CSS only (no image request) */
.hero--placeholder {
  background-color: color-mix(in srgb, var(--color-sage-light) 70%, var(--color-linen));
  background-image:
    repeating-linear-gradient(0deg, rgba(61, 90, 64, 0.045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(61, 90, 64, 0.04) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(61, 90, 64, 0.08), transparent 55%);
}

/* ---------- About ---------- */

.about {
  padding: clamp(2.5rem, 8vw, 4rem) 0;
}

.about p {
  margin: 0 auto;
  max-width: 30rem;
  text-wrap: pretty;
}

/* ---------- Footer ---------- */

.site-footer {
  width: 100%;
  max-width: var(--measure);
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* Small brand descriptor; softened charcoal still passes AA (~5.2:1 on linen) */
.site-footer .descriptor {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: var(--tracking-label);
  color: color-mix(in srgb, var(--color-charcoal) 70%, var(--color-linen));
}

.footer-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  vertical-align: bottom;
}

.footer-ig svg {
  flex: none;
}

/* ---------- Preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ==========================================================
   Shop, journal and shared inner-page styles
   ========================================================== */

.site-header--compact {
  padding-top: 2rem;
}

.site-header--compact .logo img {
  width: 8rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 0.75rem;
  font-weight: var(--weight-medium);
}

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

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

.draft-banner {
  margin: 1.5rem 0 0;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: var(--color-sage-light);
  font-size: 0.875rem;
}

main.wide {
  max-width: 64rem;
}

.page-header {
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p,
.empty {
  margin: 0;
}

.empty {
  padding-bottom: 4rem;
}

.back {
  margin: 3rem 0 4rem;
}

.status--sold {
  color: color-mix(in srgb, var(--color-charcoal) 70%, var(--color-linen));
}

/* ---------- Shop grid ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 2.5rem 1.5rem;
  margin: 0 0 4rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.card {
  display: flex;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
}

.card img,
.card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}

.card--sold img {
  opacity: 0.6;
}

.card-title {
  margin-top: 0.75rem;
  font-weight: var(--weight-medium);
}

.card:hover .card-title {
  color: var(--accent);
  text-decoration: underline;
}

.card-meta {
  font-size: 0.9375rem;
}

/* ---------- Product page ---------- */

.product {
  display: grid;
  gap: 2rem;
  padding-top: 2rem;
  text-align: left;
}

@media (min-width: 48rem) {
  .product {
    grid-template-columns: 1.15fr 1fr;
    gap: 3.5rem;
    align-items: start;
  }

  /* Lead photo full width, the rest two across, so the gallery and the description
     scroll together at about the same length */
  .product-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .product-gallery > :first-child {
    grid-column: 1 / -1;
  }
}

.product-gallery {
  display: grid;
  gap: 1rem;
}

.product-gallery img,
.product-placeholder {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.product-placeholder {
  aspect-ratio: 4 / 5;
}

.product h1,
.post h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.price {
  margin: 0;
  font-size: 1.25rem;
}

.status {
  margin: 0.25rem 0 1.5rem;
}

.card-meta .status {
  margin: 0;
}

.checkout-note {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.details {
  margin: 2rem 0 0;
  border-top: 1px solid var(--rule);
}

.details div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--rule);
}

.details dt {
  font-weight: var(--weight-medium);
}

.details dd {
  margin: 0;
}

.note {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  font-style: italic;
}

/* ---------- Journal ---------- */

.post-list {
  max-width: 40rem;
  margin: 0 auto 4rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.post-list li {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.post-list h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.375rem;
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.post-list h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-list h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.post-list p {
  margin: 0;
}

.post-date {
  margin: 0;
  font-size: 0.875rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.post {
  max-width: 40rem;
  margin: 0 auto;
  padding-top: 2rem;
  text-align: left;
}

.post-header {
  margin-bottom: 2rem;
}

.post-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  border-radius: 6px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.375rem;
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 6px;
}

.post + .back {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.product-info .prose {
  margin-top: 1.5rem;
}

.prose figure {
  margin: 2rem 0;
}

.prose figure img {
  margin: 0 auto;
}

.prose .diagram {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--color-charcoal) 70%, var(--color-linen));
  text-align: center;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--rule);
}

.prose table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

/* Header-less tables (markdown needs a header row; leave it empty) */
.prose thead:has(th:empty) {
  display: none;
}

.prose pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  background: var(--color-sage-light);
  font-size: 0.875rem;
}

/* Inner pages: small mark beside the wordmark */
.site-header--compact .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.site-header--compact .logo .logo-mark {
  width: 2.5rem;
}

/* Homepage: mark centred above the wordmark */
.site-header:not(.site-header--compact) .logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.site-header:not(.site-header--compact) .logo .logo-mark {
  width: clamp(4.5rem, 20vw, 6rem);
}

/* ---------- Homepage: On Instagram ---------- */

.insta {
  width: 100%;
  max-width: 40rem;
  margin: 3rem auto 0;
  text-align: center;
}

.insta h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: var(--weight-medium);
}

.insta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .insta-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.insta-grid a {
  display: block;
}

.insta-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.insta-grid a:hover img,
.insta-grid a:focus-visible img {
  opacity: 0.85;
}

.insta p {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
}
