/* =========================================================================
   Chris Joseph Solutions — site stylesheet
   Aesthetic: vintage letterpress / apothecary seal
   ========================================================================= */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Color */
  --ink:           #1F4A2C;   /* forest green — nav only */
  --ink-deep:      #143020;   /* deeper green — nav hover */
  --ink-soft:      #2A5C39;   /* nav link hover */
  --dark:          #0D0D0D;   /* near-black — hero, page-head, footer */
  --dark-soft:     #1A1A1A;   /* slightly lighter dark for hover states */
  --cream:         #F5E6C4;   /* primary parchment */
  --cream-bright:  #FAF1D9;   /* brighter cream for body backgrounds */
  --cream-mute:    #EADBB8;   /* dim cream for borders on cream pages */
  --charcoal:      #1A1A1A;   /* body text on cream */
  --rule:          rgba(245, 230, 196, 0.22);  /* hairline on dark */
  --rule-ink:      rgba(31, 74, 44, 0.22);      /* hairline on cream */

  /* Type */
  --font-display: "IM Fell English", "EB Garamond", Georgia, serif;
  --font-body:    "EB Garamond", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Scale */
  --max:   1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---- Reset & base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream-bright);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  font-feature-settings: "liga", "kern", "onum";
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-soft); }

/* ---- Typography -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.12;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem,  4.2vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 500;
  opacity: 0.78;
  margin: 0 0 1.2rem;
}
.lede { font-size: 1.18rem; line-height: 1.7; max-width: 60ch; }

/* ---- Containers & rules ----------------------------------------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.framed { position: relative; }
.framed::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid var(--rule);
  pointer-events: none;
}

/* Ornamental section divider — simple rule + center mark */
.ornament {
  display: flex; align-items: center; gap: 1.25rem;
  margin: 4rem auto; max-width: 320px; opacity: 0.55;
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 1px;
  background: currentColor;
}
.ornament span {
  font-family: var(--font-display);
  font-size: 1.1rem; letter-spacing: 0.4em;
}

/* ---- Header / Nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  color: var(--cream);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(120%);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 1rem;
}
.nav__brand {
  display: flex; align-items: center; gap: 0.85rem;
  text-decoration: none; color: var(--cream);
}
.nav__brand img {
  width: 42px; height: 42px;
  border-radius: 50%;
}
.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem; letter-spacing: 0.04em;
  line-height: 1;
}
.nav__wordmark small {
  display: block; font-size: 0.62rem; letter-spacing: 0.32em;
  text-transform: uppercase; opacity: 0.7; margin-top: 4px;
}
.nav__links {
  display: flex; gap: clamp(1rem, 3vw, 2.4rem);
  list-style: none; margin: 0; padding: 0;
}
.nav__links a {
  text-decoration: none;
  font-size: 0.82rem; letter-spacing: 0.28em;
  text-transform: uppercase;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  border-bottom-color: var(--cream);
  color: var(--cream);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none; border: 1px solid var(--rule); color: var(--cream);
  padding: 0.5rem 0.8rem; font-family: var(--font-body);
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer;
}
@media (max-width: 760px) {
  .nav__toggle { display: inline-block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--ink-deep);
    padding: 0.5rem var(--gutter) 1rem;
    border-bottom: 1px solid var(--rule);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .nav__links.is-open {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
  .nav__links li { border-top: 1px solid var(--rule); }
  .nav__links a { display: block; padding-block: 0.9rem; }
}

/* ---- Sections (dark, cream variants) ---------------------------------- */
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section--dark {
  background: var(--dark);
  color: var(--cream);
}
.section--dark .ornament { color: var(--cream); }
.section--dark .btn:hover { background: var(--cream); color: var(--dark); }
.section--cream {
  background: var(--cream-bright);
  color: var(--charcoal);
}
.section--cream .ornament { color: var(--ink); }
.section--cream-deep { background: var(--cream); color: var(--charcoal); }

/* ---- Hero -------------------------------------------------------------- */
.hero {
  background: var(--cream);
  color: var(--charcoal);
  min-height: 92vh;
  display: grid; place-items: center;
  text-align: center;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* Double-rule frame, mirroring the business card */
  content: "";
  position: absolute; inset: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--rule-ink);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: calc(clamp(1rem, 3vw, 2rem) + 6px);
  border: 1px solid var(--rule-ink);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 760px; }
.hero__seal {
  width: clamp(220px, 32vw, 360px);
  margin: 0 auto 2rem;
  border-radius: 50%;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.35));
  animation: rise 1.2s var(--ease) both;
}
.hero__tag {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.35; margin: 0 auto 1.5rem;
  max-width: 22ch;
  animation: rise 1.2s 0.15s var(--ease) both;
}
.hero__mission {
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  max-width: 50ch; margin: 0 auto;
  animation: rise 1.2s 0.3s var(--ease) both;
}
.hero__cta {
  margin-top: 2.5rem;
  animation: rise 1.2s 0.45s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Buttons / links -------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem; letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 0.95rem 1.8rem;
  border: 1px solid currentColor;
  text-decoration: none;
  background: transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--cream); color: var(--dark); }
.section--cream .btn:hover { background: var(--ink); color: var(--cream); }
.hero .btn:hover { background: var(--ink); color: var(--cream); }

/* ---- Page header (non-home pages) ------------------------------------ */
.page-head {
  background: var(--dark); color: var(--cream);
  padding: clamp(5rem, 10vw, 8rem) var(--gutter) clamp(3.5rem, 7vw, 5rem);
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 { margin-bottom: 0.4rem; }
.page-head .eyebrow { margin-bottom: 0.8rem; }

/* ---- Two-column layouts ---------------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (min-width: 820px) {
  .two-col { grid-template-columns: 1.1fr 1fr; }
  .two-col--reverse { grid-template-columns: 1fr 1.1fr; }
  .two-col--reverse > :first-child { order: 2; }
}
.two-col img { border: 1px solid var(--rule-ink); }

/* ---- Service cards (mirrors little brothers structure) --------------- */
.services {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .services { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .services { grid-template-columns: repeat(3, 1fr); } }

.service {
  border: 1px solid var(--rule-ink);
  padding: 2rem 1.75rem;
  background: var(--cream);
  color: var(--charcoal);  /* always dark text on cream card */
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid var(--rule-ink); pointer-events: none;
}
.service:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20,48,32,0.08); }
.service__num {
  font-family: var(--font-display);
  font-size: 0.95rem; letter-spacing: 0.3em;
  opacity: 0.5; margin-bottom: 1rem;
}
.service h3 { margin-bottom: 0.6rem; }
.service p { margin: 0; font-size: 0.98rem; }

/* ---- Contact block ---------------------------------------------------- */
.contact-card {
  text-align: center; max-width: 560px; margin: 0 auto;
}
.contact-card a { display: block; margin: 0.5rem 0; font-size: 1.15rem; }
.contact-card .phone {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: var(--cream);
  border-top: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  background-image: url('/assets/img/succulents-strip.svg');
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 120% auto;
}
.site-footer__content {
  padding: 3.5rem var(--gutter) clamp(8rem, 18vw, 14rem);
  text-align: center;
  position: relative;
  z-index: 1;
}
.site-footer__seal {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 0 auto 1.25rem;
  opacity: 0.9;
}
.site-footer__meta {
  font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; opacity: 0.55;
  margin-top: 1.5rem;
}
.site-footer a { color: var(--cream); }

/* ---- Product cards (cookies / Stripe) --------------------------------- */
.product-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .product-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  border: 1px solid var(--rule-ink);
  background: var(--cream);
  color: var(--charcoal);
  position: relative;
  display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.product-card::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid var(--rule-ink); pointer-events: none;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(20,48,32,0.08); }

.product-card__img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
}
.product-card__img--placeholder {
  background: var(--cream-mute);
  display: flex; align-items: center; justify-content: center;
}

.product-card__body {
  padding: 1.75rem; flex: 1; display: flex; flex-direction: column;
}
.product-card__name {
  font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.5rem;
}
.product-card__desc {
  font-size: 0.95rem; opacity: 0.8; margin: 0 0 1rem; flex: 1;
}
.product-card__prices { display: flex; flex-direction: column; gap: 0.25rem; }
.product-card__price {
  font-family: var(--font-display);
  font-size: 1.4rem;
}
.product-card__interval {
  font-family: var(--font-body);
  font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; opacity: 0.65;
}

/* ---- Utilities -------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
