/*!
Theme Name: JoieThings
Theme URI: https://joiethings.com
Author: JoieThings
Description: JoieThings "Bloom" storefront — a warm, botanical WooCommerce theme (dot grid notebooks). Single sage accent, Space Grotesk + Plus Jakarta Sans.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: joiethings
*/

/* ============================== Tokens ============================== */
:root {
  --bg: #F6F3EA;
  --ink: #22271F;
  --muted: #6B7363;
  --line: rgba(34, 39, 31, 0.10);
  --navbg: rgba(246, 243, 234, 0.8);
  --footbg: #EFEBDF;
  --panel: #FFFFFF;
  --accent: #7C9A5E;            /* THE single brand knob */
  --blush: #F1D9C9;
  /* All greens derive from --accent */
  --accent-deep: color-mix(in oklab, var(--accent), #1b2414 58%);
  --accent-soft: color-mix(in oklab, var(--accent), #ffffff 74%);
  --accent-shadow: color-mix(in srgb, var(--accent) 38%, transparent);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --gutter: 40px;
  --maxw: 1200px;
}

/* ============================== Base ============================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; }
.jt-wrap { max-width: var(--maxw); margin: 0 auto; }
.jt-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}

/* ============================== Keyframes ============================== */
@keyframes jt-reveal { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes jt-revealL { from { opacity: 0; transform: translateX(-46px); } to { opacity: 1; transform: translateX(0); } }
@keyframes jt-revealR { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: translateX(0); } }
@keyframes jt-scale { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes jt-parslow { from { transform: translateY(34px); } to { transform: translateY(-34px); } }
@keyframes jt-drift { from { background-position: 0 0; } to { background-position: 42px 42px; } }
@keyframes jt-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes jt-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes jt-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

/* scroll reveal: hidden until .is-in (IntersectionObserver) */
.jt-rv { opacity: 0; }
.jt-rv.is-in { animation: jt-reveal .85s ease both; }
.jt-rv-l.is-in { animation: jt-revealL .9s cubic-bezier(.2,.7,.2,1) both; }
.jt-rv-r.is-in { animation: jt-revealR .9s ease both; }
.jt-rv-s.is-in { animation: jt-scale 1s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .jt-rv { opacity: 1 !important; }
}

/* ============================== Buttons ============================== */
.jt-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; text-decoration: none;
  border: none; cursor: pointer; border-radius: 999px;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.jt-btn--accent {
  background: var(--accent); color: #fff;
  box-shadow: 0 14px 30px var(--accent-shadow);
}
.jt-btn--accent:hover { transform: translateY(-2px); }
.jt-btn--light { background: #fff; color: var(--accent-deep); }
.jt-btn--light:hover { transform: translateY(-2px); }
.jt-btn--lg { font-size: 16px; padding: 16px 30px; }
.jt-btn--md { font-size: 15px; padding: 14px 26px; }

/* ============================== Nav ============================== */
.jt-nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  backdrop-filter: blur(10px); background: var(--navbg);
  border-bottom: 1px solid var(--line);
}
.jt-nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.jt-nav__brand img { height: 30px; width: auto; }
.jt-nav__links { display: flex; align-items: center; gap: 26px; }
.jt-nav__links a { text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; opacity: .82; }
.jt-nav__links a:hover { opacity: 1; }
.jt-nav__links a.is-active { color: var(--accent); font-weight: 700; opacity: 1; }
.jt-nav__div { width: 1px; height: 16px; background: var(--line); }
.jt-nav__cta {
  display: inline-flex !important; align-items: center; gap: 8px;
  background: var(--accent); color: #fff !important; font-size: 14px; font-weight: 700;
  padding: 11px 20px; border-radius: 999px; box-shadow: 0 8px 22px var(--accent-shadow);
  opacity: 1 !important; text-decoration: none;
}
.jt-nav__toggle { display: none; }

/* ============================== Marquee ============================== */
.jt-marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--accent-deep); padding: 14px 0;
}
.jt-marquee__track { display: flex; width: max-content; animation: jt-marq 22s linear infinite; }
.jt-marquee__row {
  display: flex; gap: 46px; padding-right: 46px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff; letter-spacing: .02em;
  white-space: nowrap;
}

/* ============================== Hero (home) ============================== */
.jt-hero { position: relative; padding: 70px var(--gutter) 90px; overflow: hidden; }
.jt-dotfield {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(var(--accent) 1.6px, transparent 1.6px);
  background-size: 26px 26px; animation: jt-drift 7s linear infinite;
}
.jt-blob { position: absolute; pointer-events: none; }
.jt-blob--1 { top: -90px; right: -80px; width: 420px; height: 420px;
  border-radius: 48% 52% 60% 40%/55% 45% 55% 45%; background: var(--accent-soft); filter: blur(2px); animation: jt-bob 9s ease-in-out infinite; }
.jt-blob--2 { bottom: 40px; left: -70px; width: 260px; height: 260px;
  border-radius: 60% 40% 45% 55%/50% 60% 40% 50%; background: var(--blush); opacity: .6; animation: jt-bob 11s ease-in-out infinite reverse; }
.jt-hero__grid {
  position: relative; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
}
.jt-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep);
}
.jt-hero__title {
  font-size: clamp(48px, 6vw, 86px); line-height: .98; letter-spacing: -.03em; margin: 22px 0 0;
}
.jt-hero__title .jt-squiggle { color: var(--accent); position: relative; white-space: nowrap; }
.jt-hero__title .jt-squiggle svg { position: absolute; left: 0; bottom: -6px; width: 100%; height: 12px; }
.jt-hero__sub { font-size: 18px; line-height: 1.6; max-width: 480px; margin: 26px 0 0; color: var(--muted); }
.jt-hero__cta { display: flex; align-items: center; gap: 18px; margin-top: 34px; flex-wrap: wrap; }
.jt-stars { color: var(--accent-deep); font-size: 18px; letter-spacing: 2px; }
.jt-loved { font-size: 13.5px; font-weight: 600; color: var(--muted); }

/* interactive flip notebook */
.jt-flipwrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.jt-scene { perspective: 1400px; cursor: pointer; width: min(380px, 80vw); aspect-ratio: 4/5; }
.jt-tilt { width: 100%; height: 100%; transform: rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); transition: transform .15s ease-out; }
.jt-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(var(--flip, 0deg)); transition: transform .9s cubic-bezier(.4,.1,.2,1); }
.jt-flip__face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; }
.jt-flip__front { border-radius: 14px 20px 20px 14px; box-shadow: -14px 24px 50px rgba(31,36,33,.28); border-left: 9px solid rgba(0,0,0,.18); }
.jt-flip__back { transform: rotateY(180deg); border-radius: 20px 14px 14px 20px; box-shadow: 14px 24px 50px rgba(31,36,33,.28); border-right: 9px solid rgba(0,0,0,.18); }
.jt-flip__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jt-fliphint {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted);
  background: #fff; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
}

/* ============================== Features (home) ============================== */
.jt-features { position: relative; padding: 100px var(--gutter); }
.jt-features__head { max-width: 640px; margin-bottom: 64px; }
.jt-features__title { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -.025em; margin: 14px 0 0; }
.jt-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 84px; }
.jt-frow:nth-child(odd) .jt-frow__media { order: 0; } /* placeholder; order set inline per row */
.jt-frow__media { position: relative; }
.jt-frow__blob { position: absolute; inset: -18px; border-radius: 30px; }
.jt-frow__img { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 26px 50px rgba(31,36,33,.18); aspect-ratio: 5/4; }
.jt-frow__img img { width: 100%; height: 118%; object-fit: cover; margin-top: -9%; }
.jt-fnum { display: flex; align-items: baseline; gap: 8px; }
.jt-fnum b { font-family: var(--font-display); font-weight: 700; font-size: 64px; line-height: 1; color: var(--accent); }
.jt-fnum span { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--accent-deep); text-transform: uppercase; letter-spacing: .04em; }
.jt-frow__h { font-size: 30px; letter-spacing: -.02em; margin: 16px 0 0; }
.jt-frow__p { font-size: 17px; line-height: 1.65; color: var(--muted); margin: 14px 0 0; max-width: 430px; }

/* ============================== Story + video ============================== */
.jt-story { position: relative; padding: 90px var(--gutter); background: var(--accent-deep); color: #fff; overflow: hidden; }
.jt-story__dots { position: absolute; inset: 0; opacity: .16; background-image: radial-gradient(#fff 1.4px, transparent 1.4px); background-size: 28px 28px; animation: jt-drift 8s linear infinite; }
.jt-story__grid { position: relative; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: .85fr 1.15fr; gap: 54px; align-items: center; }
.jt-story__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); }
.jt-story__title { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.025em; margin: 14px 0 0; }
.jt-story__p { font-size: 17px; line-height: 1.7; opacity: .82; margin: 20px 0 0; }
.jt-story__media { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.4); aspect-ratio: 16/10; }
.jt-story__media .jt-video { position: absolute; inset: 0; }
.jt-story__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.jt-video__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255,255,255,.92); box-shadow: 0 10px 28px rgba(0,0,0,.35); display: grid; place-items: center; transition: transform .2s ease, background .2s ease; z-index: 2; }
.jt-video__play:hover { background: #fff; transform: translate(-50%, -50%) scale(1.06); }
.jt-video__play span { display: block; width: 0; height: 0; margin-left: 5px; border-left: 18px solid var(--accent-deep); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.jt-video.is-playing .jt-video__play { display: none; }

/* ============================== FAQ ============================== */
.jt-faq { padding: 100px var(--gutter); }
.jt-faq__inner { max-width: 820px; margin: 0 auto; }
.jt-faq__head { text-align: center; margin-bottom: 50px; }
.jt-faq__title { font-size: clamp(32px, 4vw, 50px); letter-spacing: -.025em; margin: 14px 0 0; }
.jt-faq__list { display: flex; flex-direction: column; gap: 12px; }
.jt-acc { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.jt-acc__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 17px; font-weight: 700; color: var(--ink); }
.jt-acc__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-deep); display: grid; place-items: center; font-size: 18px; transition: transform .25s ease; }
.jt-acc.is-open .jt-acc__icon { transform: rotate(45deg); }
.jt-acc__body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.jt-acc__bodyinner { padding: 0 24px 22px; font-size: 15.5px; line-height: 1.65; color: var(--muted); }

/* ============================== Footer ============================== */
.jt-footer { padding: 64px var(--gutter) 40px; background: var(--footbg); border-top: 1px solid var(--line); }
.jt-footer__top { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 2fr; gap: 48px; align-items: start; }
.jt-footer__brand img { height: 28px; }
.jt-footer__tag { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.jt-footer__social { display: flex; gap: 18px; margin-top: 16px; font-size: 14px; font-weight: 600; }
.jt-footer__social a { text-decoration: none; color: var(--ink); opacity: .75; }
.jt-footer__social a:hover { opacity: 1; color: var(--accent-deep); }
.jt-footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.jt-footer__col { display: flex; flex-direction: column; gap: 11px; }
.jt-footer__h { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.jt-footer__col a { text-decoration: none; color: var(--ink); opacity: .72; font-size: 14px; }
.jt-footer__col a:hover { opacity: 1; color: var(--accent-deep); }
.jt-footer__legal { max-width: 1180px; margin: 44px auto 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ============================== Breadcrumb ============================== */
.jt-crumb { max-width: var(--maxw); margin: 0 auto; padding: 22px var(--gutter) 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.jt-crumb a { color: var(--muted); text-decoration: none; }
.jt-crumb .sep { margin: 0 8px; opacity: .5; }
.jt-crumb .cur { color: var(--accent); }
