/* ============================================================
   THE JUNGLE COFFEE — Prototype Design System
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --forest-900: #0b2416;
  --forest-800: #0f2e1d;
  --forest-700: #164028;
  --forest-600: #1d5334;
  --leaf-500: #3d8b5f;
  --leaf-400: #4faa74;
  --leaf-300: #7cc79a;
  --leaf-100: #d9f0e2;

  --cream: #f8f5ed;
  --sand: #ece5d5;
  --paper: #ffffff;

  --ink: #14201a;
  --ink-soft: #3d4a43;
  --muted: #6f7f76;
  --line: #dcd6c7;

  --amber: #c98a3c;
  --danger: #b4462f;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(11, 36, 22, 0.06), 0 1px 3px rgba(11, 36, 22, 0.08);
  --shadow-md: 0 4px 12px rgba(11, 36, 22, 0.08), 0 2px 4px rgba(11, 36, 22, 0.05);
  --shadow-lg: 0 18px 40px rgba(11, 36, 22, 0.14);

  /* Matches the production site's pairing */
  --font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

::selection { background: var(--leaf-300); color: var(--forest-900); }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--leaf-300); outline-offset: 3px; }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1.05em; color: var(--ink-soft); }

.display-conjunction { white-space: nowrap; }
.display-amp { display: inline-block; margin-right: .08em; }

.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--leaf-500);
  margin-bottom: 14px;
  font-family: var(--font-body);
}
.eyebrow.on-dark { color: var(--leaf-300); }

.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 650; font-size: .95rem; border: 1.5px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--leaf-500); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--leaf-400); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--leaf-500); color: var(--leaf-500); }
.btn-sm { padding: 8px 16px; font-size: .84rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(15, 46, 29, .97);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 8px; overflow: hidden; flex: none;
  display: block; object-fit: cover;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; }
.brand-name small { display: block; font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: var(--leaf-300); font-family: var(--font-body); font-weight: 600; }

/* Inline SVG icons */
.ico { display: block; flex: none; }
.card-icon .ico { color: var(--leaf-500); }

/* Circular team avatar (About Us) */
.avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--leaf-100); color: var(--forest-700);
  display: grid; place-items: center; border: 1px solid var(--line);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: rgba(255,255,255,.82); padding: 8px 14px; border-radius: 8px;
  font-size: .9rem; font-weight: 550; transition: .16s;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.09); }
.nav a.active { color: #fff; background: rgba(255,255,255,.14); }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r-sm); background: transparent; color: #fff;
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-dark { background: var(--forest-800); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,.76); }
.section-sand { background: var(--sand); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--forest-900); color: #fff; overflow: hidden;
  padding: 104px 0 96px;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 78% 18%, rgba(79,170,116,.28), transparent 62%),
    radial-gradient(700px 400px at 12% 88%, rgba(29,83,52,.5), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.8); font-size: 1.14rem; max-width: 54ch; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 30px; }
.hero-trust { display: flex; gap: 30px; margin-top: 46px; flex-wrap: wrap; }
.hero-trust div strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--leaf-300); }
.hero-trust div span { font-size: .82rem; color: rgba(255,255,255,.62); }
.hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-lg); padding: 26px; backdrop-filter: blur(6px);
}
.hero-card h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.hero-card ul { margin: 0; padding: 0; list-style: none; }
.hero-card li {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.09);
  font-size: .92rem; color: rgba(255,255,255,.85);
}
.hero-card li:last-child { border-bottom: none; }
.hero-card li .tick { color: var(--leaf-300); font-weight: 700; }

/* ---------- Photography within the Miro system ---------- */
.site-photo {
  position: relative; margin: 0; min-width: 0; overflow: hidden;
  background: var(--forest-800); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
}
.site-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 700ms cubic-bezier(.16,1,.3,1);
}
.site-photo:hover img { transform: scale(1.018); }
.hero .site-photo { border-color: rgba(255,255,255,.17); box-shadow: var(--shadow-lg); }
.hero-visual { display: grid; gap: 16px; min-width: 0; }
.hero-visual .hero-photo { height: 300px; }
.hero--image { padding: 80px 0 72px; }
.hero--image .wrap { grid-template-columns: minmax(0,1.05fr) minmax(340px,.95fr); }
.hero--image .hero-photo { height: 360px; }
.hero-briefing img { object-position: center 48%; }
.journal-hero-photo img { object-position: center 44%; }

.photo-split {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(320px,.9fr);
  gap: 42px; align-items: stretch;
}
.photo-split.media-left { grid-template-columns: minmax(320px,.85fr) minmax(0,1.15fr); }
.photo-split.media-left > .site-photo { order: -1; }
.photo-content { min-width: 0; }
.photo-content .section-head { margin-bottom: 34px; }
.photo-panel { min-height: 520px; }
.quality-section .site-photo { border-color: rgba(255,255,255,.16); }
.quality-grid { gap: 16px; }
.wide-photo { width: 100%; height: 360px; margin-bottom: 36px; }
.grading-photo { height: 320px; }
.authority-photo img { object-position: center 42%; }
.team-photo img { object-position: center 38%; }
.processing-photo img { object-position: center 56%; }
.quality-photo img { object-position: center 48%; }
.origin-farm-photo img { object-position: center 58%; }

.photo-duo {
  display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,.8fr);
  gap: 20px; margin-bottom: 32px;
}
.photo-duo .site-photo { height: 300px; }
.photo-duo-main img { object-position: center 58%; }
.photo-duo-detail img { object-position: center; }

.product-gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px; margin-bottom: 32px;
}
.product-gallery .site-photo { height: 230px; }
.product-gallery .product-photo-wide img { object-position: center 62%; }

.request-layout {
  display: grid; grid-template-columns: minmax(0,1fr) 340px;
  gap: 32px; align-items: start;
}
.request-layout > * { min-width: 0; }
.request-photo { position: sticky; top: 96px; height: 720px; }
.request-media-stack {
  position: sticky; top: 96px;
  display: grid; gap: 18px; min-width: 0;
}
.request-stack-photo { height: 350px; }
.request-export-photo img { object-position: 60% center; }
.post-cover { height: 390px; margin-top: 30px; }
.post-cover img { object-position: center 54%; }

/* ---------- Grids / Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .94rem; margin-bottom: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--leaf-100);
  display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 16px;
}
.card.on-dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.card.on-dark:hover { background: rgba(255,255,255,.09); }

.step-num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--forest-800); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-family: var(--font-display); margin-bottom: 15px;
}

/* ---------- Journey strip ---------- */
.journey { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.journey span {
  background: var(--leaf-100); color: var(--forest-700); border-radius: 999px;
  padding: 7px 15px; font-size: .8rem; font-weight: 600;
}

/* ---------- Spec cards ---------- */
.spec-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.spec-head { background: var(--forest-800); color: #fff; padding: 20px 24px; }
.spec-head h3 { color: #fff; margin: 0 0 3px; font-size: 1.16rem; }
.spec-head .origin { font-size: .82rem; color: var(--leaf-300); font-weight: 600; letter-spacing: .04em; }
.spec-body { padding: 6px 24px 20px; flex: 1; }
.spec-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: .9rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt { color: var(--muted); font-weight: 600; }
.spec-row dd { margin: 0; text-align: right; color: var(--ink); font-weight: 550; }
.spec-foot { padding: 0 24px 22px; }

/* ---------- Table ---------- */
.tbl { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.tbl th, .tbl td { padding: 14px 18px; text-align: left; font-size: .9rem; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--forest-800); color: #fff; font-weight: 650; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--cream); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: none; text-align: left;
  padding: 20px 40px 20px 0; font-size: 1.04rem; font-weight: 650; color: var(--ink);
  position: relative; font-family: var(--font-display);
}
.faq-q::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--leaf-500); font-weight: 400; }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-item.open .faq-a { max-height: 460px; }
.faq-a p { padding-bottom: 20px; margin: 0; font-size: .96rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.form-grid > *, .field input, .field select, .field textarea { min-width: 0; }
.field input, .field select, .field textarea { width: 100%; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .84rem; font-weight: 650; color: var(--ink); }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-family: inherit; font-size: .94rem; background: var(--paper); color: var(--ink);
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--leaf-500); }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.check {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
  cursor: pointer; font-size: .92rem; font-weight: 550; transition: .15s;
}
.check:hover { border-color: var(--leaf-300); }
.check input { accent-color: var(--leaf-500); width: 17px; height: 17px; }
.check.on { border-color: var(--leaf-500); background: var(--leaf-100); }
.form-note { font-size: .84rem; color: var(--muted); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-900); color: rgba(255,255,255,.72); padding: 62px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr 1fr; gap: 32px; }
.footer-grid > * { min-width: 0; }
.footer-grid h5 {
  color: #fff; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 16px; font-family: var(--font-body); font-weight: 700;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: .87rem; }
.footer-grid a:hover { color: var(--leaf-300); }
.footer-bottom {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.11);
  display: flex; justify-content: space-between; gap: 16px; font-size: .82rem; flex-wrap: wrap;
}
.news-form { display: flex; gap: 7px; margin-top: 12px; }
.news-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-size: .85rem; }
.news-form input::placeholder { color: rgba(255,255,255,.45); }
.news-form button { padding: 10px 15px; border-radius: var(--r-sm); border: none; background: var(--leaf-500); color: #fff; font-weight: 650; font-size: .85rem; }

/* ---------- Blog ---------- */
.blog-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .18s; display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-thumb { height: 172px; background: linear-gradient(135deg, var(--forest-700), var(--leaf-500)); position: relative; overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.blog-body h3 { font-size: 1.14rem; margin-bottom: 8px; }
.blog-meta { font-size: .78rem; color: var(--muted); margin-top: auto; padding-top: 14px; }
.tag { display: inline-block; background: var(--leaf-100); color: var(--forest-700); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 11px; }

/* Rendered canvas post */
.canvas-render { position: relative; margin: 0 auto; background: #fff; box-shadow: var(--shadow-lg); border-radius: var(--r-md); overflow: hidden; }
.canvas-render .el { position: absolute; }

/* ---------- Empty / notice ---------- */
.empty { text-align: center; padding: 68px 24px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--r-lg); }
.notice { background: var(--leaf-100); border-left: 4px solid var(--leaf-500); padding: 16px 20px; border-radius: var(--r-sm); font-size: .92rem; color: var(--forest-700); }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(140%);
  background: var(--forest-800); color: #fff; padding: 13px 26px; border-radius: 999px;
  box-shadow: var(--shadow-lg); z-index: 9999; transition: transform .3s cubic-bezier(.2,.8,.3,1); font-size: .92rem; font-weight: 550;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Scroll motion ---------- */
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 520ms cubic-bezier(.16,1,.3,1),
    transform 520ms cubic-bezier(.16,1,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready [data-reveal="copy"] { transform: translate3d(0, 22px, 0); }
.motion-ready [data-reveal="image"] { transform: translate3d(0, 20px, 0) scale(.99); }
.motion-ready [data-reveal="feature"] { transform: translate3d(0, 24px, 0) scale(.99); }
.motion-ready [data-reveal="card"] { transform: translate3d(0, 16px, 0) scale(.985); }
.motion-ready [data-reveal="row"] { transform: translate3d(0, 14px, 0); }
.motion-ready [data-reveal].is-revealed { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.motion-ready [data-reveal].motion-settled { transition-delay: 0ms; }
.motion-ready [data-reveal="card"].is-revealed.motion-settled:hover { transform: translateY(-3px); }

@media (max-width: 980px) {
  .site-header .wrap { position: relative; }
  .site-header .wrap > a.btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 20px 20px; background: var(--forest-800);
    border-bottom: 1px solid rgba(255,255,255,.09); box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 12px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero--image .hero-photo { height: 330px; }
  .photo-split, .photo-split.media-left { display: flex; flex-direction: column; }
  .photo-split .photo-content { display: contents; }
  .photo-split .section-head { order: 1; }
  .photo-split > .site-photo, .photo-split.media-left > .site-photo { order: 2; }
  .photo-split .grid { order: 3; }
  .request-layout { grid-template-columns: 1fr; }
  .photo-duo { grid-template-columns: minmax(0,1.5fr) minmax(220px,.8fr); }
  .photo-panel { min-height: 360px; height: 360px; }
  .request-photo { position: static; height: 340px; }
  .request-media-stack { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .request-stack-photo { height: 300px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .section { padding: 68px 0; }
  .hero { padding: 76px 0 70px; }
  .hero-visual .hero-photo, .hero--image .hero-photo { height: 270px; }
  .hero-visual { margin-top: 6px; }
  .photo-panel, .wide-photo, .grading-photo, .request-photo { height: 260px; min-height: 260px; }
  .photo-duo, .product-gallery, .request-media-stack { grid-template-columns: 1fr; }
  .photo-duo .site-photo, .product-gallery .site-photo, .request-stack-photo, .post-cover { height: 250px; }
  .wide-photo { margin-bottom: 28px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  #pricing-form { padding: 24px !important; }
  #turnstile-container { overflow: hidden; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-grid li, .footer-grid a { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .faq-a, .motion-ready [data-reveal] { transition: none; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
}
