/* Juju & Tea — shared styles for every page */

/* FONTS: this is the only place fonts are set for the whole site.
   To change a font: update the Google Fonts address below, then the
   --display (headings) and --body (text) names in :root.          */
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,400;6..96,500&family=Instrument+Sans:wght@400;500;600&display=swap");

:root {
  --mist: #E5EAE1;      /* page background: celadon glaze */
  --paper: #F2F4EE;     /* lighter panels */
  --ink: #1F2C26;       /* text and line drawing: pine-soot ink */
  --sage: #56675B;      /* secondary text */
  --field: #2C4637;     /* deep tea-field green */
  --field-text: #E8EDE3;
  --field-soft: #B8C6BA;
  --amber: #A8692A;     /* oolong accent, used sparingly */
  --rule: #C5CEC2;

  --display: "Bodoni Moda", "Bodoni MT", Didot, Georgia, serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --measure: 36rem;
  --wide: 70rem;

  /* SPEED of the leaf drawing at the top of the homepage, and the text fading in after it.
     1 = original speed, 0.5 = twice as fast, 0.25 = four times as fast. */
  --speed: 0.5;
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Use Bodoni Moda's sturdier small-text design at every size, so the thin
     strokes in big headings stay readable. The body font ignores this. */
  font-variation-settings: "opsz" 11;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wide), 100% - 2.5rem); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* Header */
.site-header { padding-block: 1.5rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem 2rem; }
.brand { font-family: var(--display); font-size: 1.5rem; text-decoration: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-nav a { text-decoration: none; font-size: 0.9375rem; }
.site-nav a:hover { text-decoration: underline; text-decoration-color: var(--amber); }

/* Hero */
.hero { text-align: center; padding: clamp(2rem, 8vh, 5rem) 0 clamp(4rem, 12vh, 7rem); }
.hero-mark { width: min(40rem, 100%); margin: 0 auto -0.5rem; color: var(--ink); }
.hero-mark path { fill: none; stroke: currentColor; stroke-width: 1.561; stroke-linecap: round; stroke-linejoin: round; }
.hero h1 { font-size: clamp(3.5rem, 11vw, 7.5rem); line-height: 1; }
.hero .lede { font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.625rem); line-height: 1.35; max-width: 30rem; margin: 1.5rem auto 0; }
.hero .status { color: var(--sage); max-width: 30rem; margin: 1.25rem auto 2rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.75rem; }
.button {
  display: inline-block; background: var(--field); color: var(--field-text);
  padding: 0.85rem 1.75rem; border-radius: 999px; text-decoration: none; font-weight: 500;
}
.button:hover { background: var(--ink); }

/* The one moment of motion: the logo line draws itself */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw calc(var(--t) * var(--speed)) linear calc(var(--d) * var(--speed)) both;
  }
  .hero h1, .hero .lede, .hero .status, .hero .actions { opacity: 0; animation: settle calc(1.4s * var(--speed)) ease-out calc(2.2s * var(--speed)) forwards; }
  .hero .lede { animation-delay: calc(2.5s * var(--speed)); }
  .hero .status, .hero .actions { animation-delay: calc(2.8s * var(--speed)); }
}
@keyframes draw { from { stroke-dashoffset: 1; opacity: 0; } 2% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes settle { to { opacity: 1; } }

/* Sections */
.section { padding-block: clamp(4rem, 10vw, 7rem); }
.section-head { max-width: var(--measure); margin-bottom: 3rem; }
.section-head p { color: var(--sage); margin-top: 1rem; }

/* Our teas: intro text, a link to the "first 11 teas" post and the shop note, then six featured teas */
.teas { border-top: 1px solid var(--rule); }
.featured-title { font-family: var(--body); font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); margin-bottom: 1.75rem; }
.featured-teas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 2.5rem 1.5rem; }
.featured-tea img {
  width: 6.5rem; height: 6.5rem; object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 0.4rem var(--paper), 0 0 0 calc(0.4rem + 1px) var(--rule);
  margin: 0.5rem 0 1.4rem 0.4rem;
}
.featured-tea__type { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); margin: 0 0 0.25rem; }
.featured-tea h4 { font-family: var(--display); font-weight: 400; font-size: 1.375rem; line-height: 1.15; margin: 0 0 0.4rem; }
.featured-tea p:last-child { color: var(--sage); font-size: 0.9375rem; margin: 0; max-width: 16rem; }
.teas .section-head { margin-bottom: 2rem; }
.teas-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--rule); }
.shop-note { margin: 0; padding: 1rem 1.25rem; background: var(--paper); border-left: 3px solid var(--amber); border-radius: 0 4px 4px 0; }
.shop-note strong { font-weight: 600; }

/* Markets */
.markets { background: var(--field); color: var(--field-text); }
.markets .grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem 5rem; align-items: start; }
.markets p { color: var(--field-soft); max-width: var(--measure); }
.markets h2 { margin-bottom: 1.25rem; }
.markets a { color: var(--field-text); text-decoration-color: var(--field-soft); }
.wholesale { border-left: 1px solid rgba(232, 237, 227, 0.25); padding-left: 2rem; }
.wholesale h3 { margin-bottom: 0.75rem; }

/* Journal */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.post-row { display: grid; grid-template-columns: 11rem 1fr; gap: 0.5rem 2rem; padding-block: 2rem; border-bottom: 1px solid var(--rule); }
.post-row time { color: var(--sage); font-size: 0.9375rem; padding-top: 0.35rem; }
.post-row h3 a { text-decoration: none; }
.post-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 1px; }
.post-row p { color: var(--sage); margin: 0.6rem 0 0; max-width: var(--measure); }

/* Contact */
.contact { text-align: center; border-top: 1px solid var(--rule); }
.contact p { color: var(--sage); }
.email-big { font-family: var(--display); font-size: clamp(1.5rem, 5vw, 3rem); text-decoration: none; overflow-wrap: anywhere; }
.email-big:hover { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 1px; }

/* Footer */
.site-footer { background: var(--paper); color: var(--sage); font-size: 0.875rem; padding-block: 2.5rem; }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 1rem 3rem; align-items: start; }
.site-footer .footer-mark { width: 7rem; opacity: 0.8; }
.site-footer p { margin: 0 0 0.4rem; max-width: 46rem; }

/* Blog post pages */
.article { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4rem, 10vw, 7rem); }
.article-head { max-width: 42rem; margin-bottom: 2.5rem; }
.article-head time { color: var(--sage); font-size: 0.9375rem; }
.article-head .meta { color: var(--sage); font-size: 0.9375rem; } /* date · author line */
.article-head h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); margin-top: 0.75rem; }
.prose { max-width: var(--measure); font-size: 1.125rem; line-height: 1.7; }
.prose h2 { font-size: 1.875rem; margin: 2.5rem 0 1rem; }
.prose h3 { font-size: 1.375rem; margin: 2rem 0 0.75rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 2rem 0; padding-left: 1.25rem; border-left: 2px solid var(--amber); font-family: var(--display); font-size: 1.375rem; line-height: 1.4; }
.prose img { border-radius: 4px; margin: 2rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0 2rem; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 600; }
.back { display: inline-block; margin-top: 3rem; }

@media (max-width: 760px) {
  .markets .grid { grid-template-columns: 1fr; }
  .wholesale { border-left: 0; padding-left: 0; border-top: 1px solid rgba(232, 237, 227, 0.25); padding-top: 2rem; }
  .post-row { grid-template-columns: 1fr; }
  .featured-tea img { width: 5.5rem; height: 5.5rem; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}


/* ===== NEXT MARKET CARD (Markets section) ===== */
.markets .grid { grid-template-areas: "intro card" "wholesale card"; grid-template-rows: auto 1fr; }
.markets-intro { grid-area: intro; }
.markets .wholesale { grid-area: wholesale; border-left: 0; padding-left: 0; border-top: 1px solid rgba(232, 237, 227, 0.25); padding-top: 2rem; }
.next-market { grid-area: card; background: var(--paper); color: var(--ink); border-radius: 6px; padding: clamp(1.5rem, 4vw, 2.25rem); border-top: 4px solid var(--amber); }
.markets .next-market p { color: var(--sage); max-width: none; margin: 0 0 0.9rem; }
.markets .next-market a { color: var(--ink); text-decoration-color: var(--rule); }
.markets .next-market .button { color: var(--field-text); }
.next-market__label { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.markets .next-market .next-market__label { color: var(--amber); margin-bottom: 0.5rem; }
.markets .next-market .next-market__date { font-family: var(--display); font-size: clamp(2.25rem, 6vw, 3rem); line-height: 1.05; color: var(--field); margin-bottom: 0.75rem; }
.next-market h3 { margin-bottom: 0.4rem; }
.markets .next-market .next-market__sub { color: var(--ink); font-weight: 500; }
.markets .next-market .next-market__place { color: var(--ink); }
.markets .next-market .next-market__note { font-size: 0.875rem; }
.next-market__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.25rem; }
/* "After that" line: the market after the next one, in a single line */
.markets .next-market .next-market__then { margin: 1.75rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; }
.next-market__then span { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); margin-right: 0.5rem; }
@media (max-width: 860px) {
  .markets .grid { grid-template-columns: 1fr; grid-template-areas: "intro" "card" "wholesale"; }
}
