/* =========================================================
   JIMJAMIO — styles.css
   Static, RTL-first, mobile-first. No frameworks.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Ground & ink */
  --cream: #FFF7EC;        /* page ground */
  --cream-deep: #F6E8D2;   /* tone step for alternate sections */
  --paper: #FFFDF8;        /* labels, form surface, glass */
  --ink: #1F1A17;          /* text: 16.2:1 on cream */
  --ink-soft: #5A4E45;     /* secondary text: 7.6:1 on cream, 6.7:1 on cream-deep */
  --field-line: #8A7B6F;   /* form field borders: 4.0:1 on paper (non-text >= 3:1) */
  --shelf: #6B4430;        /* wooden plank */
  --shelf-lip: #4A2D1F;

  /* Fruit (jam) colors — used as fills, never as small text on cream */
  --raspberry: #E3265F;
  --raspberry-deep: #C2124B; /* button fill w/ white text: 6.0:1; link text on cream: 5.7:1 */
  --raspberry-light: #FF7FA3;
  --tangerine: #FF7F1F;
  --lime: #8BCB2F;
  --blueberry: #4E46B4;      /* focus ring on light grounds: 6.9:1 on cream */
  --blueberry-bright: #6E66E0;
  --cherry: #C4142F;
  --mango: #FFB627;          /* contact field; ink on mango 9.8:1 */
  --plum: #7A2E6B;

  /* Roles */
  --bg: var(--cream);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --accent: var(--raspberry-deep);
  --focus: var(--blueberry);

  /* Type */
  --font-display: "Fredoka", "Rubik", "Arial Hebrew", system-ui, sans-serif;
  --font-body: "Rubik", "Arial Hebrew", system-ui, sans-serif;
  --step-body: 1.0625rem;                                   /* 17px */
  --step-small: 0.9375rem;                                  /* 15px */
  --step-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --step-h2: clamp(2.1rem, 1.4rem + 3vw, 4rem);
  --step-h1: clamp(2.35rem, 1.3rem + 4.6vw, 5.75rem);

  /* Space */
  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1240px;
  --section: clamp(72px, 9vw, 160px);
  --radius: 22px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drop: cubic-bezier(0.34, 1.4, 0.64, 1);

  --tap: 44px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--shelf) var(--cream-deep);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--raspberry-deep);
  caret-color: var(--raspberry-deep);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--mango); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus { outline: none; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--sm { width: 1.05em; height: 1.05em; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* scroll targets clear the top edge */
section[id] { scroll-margin-top: 16px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: var(--tap);
  padding: 0.6em 1.3em;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--small { font-size: 0.975rem; padding: 0.5em 1.05em; }
.btn--large { min-height: 58px; font-size: 1.1875rem; padding: 0.7em 1.6em; }
.btn--primary { background: var(--raspberry-deep); color: #fff; }
.btn--ink { background: var(--ink); color: var(--cream); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #A80E3F; }
  .btn--ink:hover { background: #3A302A; }
}
.btn[disabled] { cursor: progress; opacity: 0.75; transform: none; }

.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: var(--tap);
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--raspberry);
}
.link-quiet .icon { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link-quiet:hover .icon { transform: translateX(-4px); }
}

/* ---------- Header ---------- */
.site-header { padding-block: 14px; }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--ink);
  border-radius: 8px;
}
.brand__mark { width: 128px; height: auto; }
.site-nav { display: none; margin-inline-start: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: 12px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover { background: var(--cream-deep); }
}
.site-header .btn { margin-inline-start: auto; }
@media (min-width: 860px) {
  .site-nav { display: block; }
  .site-header .btn { margin-inline-start: 8px; }
  .brand__mark { width: 150px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(28px, 6vw, 72px) clamp(64px, 8vw, 128px); }
.hero__mark {
  color: var(--ink);
  direction: ltr;           /* Latin wordmark reads LTR; layout stays RTL */
}
.wordmark { width: 100%; height: auto; }
.wordmark .drop--1 { fill: var(--raspberry); }
.wordmark .drop--2 { fill: var(--tangerine); }
.wordmark .drop--3 { fill: var(--lime); }
.wordmark .drop--4 { fill: var(--blueberry-bright); }

.hero__body {
  display: grid;
  gap: 32px;
  margin-top: clamp(24px, 4vw, 56px);
}
.hero__title {
  font-size: var(--step-h1);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 13ch;
}
.hero__sub {
  margin-top: 20px;
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem);
  line-height: 1.4;
  max-width: 38ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.hero__note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: var(--step-small);
}
@media (max-width: 479px) {
  .hero__actions .btn { width: 100%; }
}
@media (min-width: 960px) {
  .hero__body {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: 48px;
  }
  .hero__actions { padding-bottom: 8px; }
}

/* Signature move: the jam drops fall onto the letters on load */
@media (prefers-reduced-motion: no-preference) {
  .wordmark .drop {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: drop-in 760ms var(--ease-out) both;
  }
  .wordmark .drop--1 { animation-delay: 220ms; }
  .wordmark .drop--2 { animation-delay: 330ms; }
  .wordmark .drop--3 { animation-delay: 440ms; }
  .wordmark .drop--4 { animation-delay: 550ms; }
}
@keyframes drop-in {
  0%   { transform: translateY(-26px) scale(0.85, 1.15); opacity: 0; }
  55%  { transform: translateY(2px) scale(1.12, 0.86); opacity: 1; }
  78%  { transform: translateY(-1px) scale(0.97, 1.03); }
  100% { transform: translateY(0) scale(1, 1); opacity: 1; }
}

/* ---------- Section heads ---------- */
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 72px); }
.section-head h2 { font-size: var(--step-h2); letter-spacing: -0.01em; }
.lead {
  margin-top: 18px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  max-width: 40rem;
}

/* ---------- Jar shelf ---------- */
.shelf-section { padding-block: var(--section) calc(var(--section) * 0.8); }
.shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: clamp(40px, 5vw, 64px);
}
.jar {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) { .jar { flex-basis: 33.333%; } }
@media (min-width: 1040px) { .jar { flex-basis: 25%; } }

.jar__art {
  position: relative;
  width: min(84%, 220px);
  margin-inline: auto;
  aspect-ratio: 160 / 200;
  container-type: inline-size;
}
.jar__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* <use> shadow trees inherit fill from the <use> element */
.jam { fill: var(--fruit); transform: translateY(var(--level, 0px)); }
.lid { fill: var(--fruit); transform-box: fill-box; transform-origin: 85% 100%; transition: transform 320ms var(--ease-out); }

.jar__label {
  position: absolute;
  inset-inline: 19%;
  top: 47%;
  bottom: 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 6px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  text-align: center;
}
.jar__label h3 {
  font-size: 1.05rem;
  font-size: clamp(0.95rem, 11cqi, 1.55rem);
  font-weight: 600;
  line-height: 1.05;
}
.jar__flavor {
  font-size: 0.78rem;
  font-size: clamp(0.72rem, 6.4cqi, 0.9rem);
  line-height: 1.2;
  color: var(--ink-soft);
}

.jar__plank {
  height: 14px;
  margin-top: -6px;          /* jar sits on the plank */
  background: var(--shelf);
  border-bottom: 6px solid var(--shelf-lip);
  box-sizing: content-box;
}
.jar__info {
  padding: 18px clamp(8px, 1.6vw, 20px) 0;
  text-align: center;
}
.jar__info p { font-size: var(--step-small); line-height: 1.5; max-width: 26ch; margin-inline: auto; }
.jar__ask {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: var(--tap);
  margin-top: 4px;
  font-weight: 500;
  font-size: var(--step-small);
  color: var(--raspberry-deep);
  text-decoration: underline;
}
.jar__ask .icon { transition: transform 200ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .jar:hover .lid { transform: rotate(-9deg) translateY(-3px); }
  .jar__ask:hover .icon { transform: translateX(-4px); }
}
@media (min-width: 640px) {
  .jar__info p { font-size: 1rem; }
}

/* Jam fill on scroll. Default (no JS / reduced motion) = already filled. */
@media (prefers-reduced-motion: no-preference) {
  .js .fill-scope .jam {
    transition: transform 1150ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 110ms);
  }
  .js .fill-scope:not(.is-filled) .jam { transform: translateY(130px); }
}

/* ---------- How it works ---------- */
.how { background: var(--cream-deep); padding-block: var(--section); }
.steps {
  list-style: none;
  display: grid;
  gap: 40px;
  counter-reset: none;
}
.step {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.step__jar { width: 76px; height: auto; }
.step__text h3 { font-size: var(--step-h3); margin-top: 10px; }
.step__text p { margin-top: 10px; max-width: 34ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
  .step { grid-template-columns: 1fr; }
  .step__jar { width: 110px; }
  /* staircase: each step sits a little lower, like filling jars on a ramp */
  .step:nth-child(2) { margin-top: 56px; }
  .step:nth-child(3) { margin-top: 112px; }
}

/* ---------- Why ---------- */
.why {
  background: var(--ink);
  color: var(--cream);
  padding-block: var(--section);
  --focus: var(--mango);
}
.why .lead { color: #E9DCCB; }  /* 13.3:1 on ink */
.why__list {
  display: grid;
  gap: 44px 56px;
}
@media (min-width: 760px) { .why__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.why__item { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 18px; }
.why__drop { grid-row: span 2; width: 26px; height: 36px; fill: var(--fruit); margin-top: 2px; }
.why__item h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); }
.why__item p { margin-top: 12px; color: #E9DCCB; max-width: 44ch; }

/* ---------- FAQ ---------- */
.faq { padding-block: var(--section); }
.faq__grid { display: grid; gap: 36px; }
.faq__intro h2 { font-size: var(--step-h2); }
.faq__intro p { margin-top: 16px; max-width: 30ch; }
.faq__intro .link-quiet { margin-top: 8px; }
@media (min-width: 960px) {
  .faq__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
  .faq__intro { position: sticky; top: 32px; align-self: start; }
}
.faq__list { display: grid; gap: 10px; }
.faq details {
  background: var(--paper);
  border-radius: var(--radius);
  transition: background-color 200ms ease;
}
.faq details[open] { background: var(--cream-deep); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
.faq summary::-webkit-details-marker { display: none; }
.faq__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--raspberry);
  transition: transform 260ms var(--ease-out), background-color 200ms ease;
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  top: 50%;
  width: 14px;
  height: 2.5px;
  margin-top: -1.25px;
  margin-inline-start: -7px;
  background: #fff;
  border-radius: 2px;
}
.faq__icon::after { transform: rotate(90deg); }
.faq details[open] .faq__icon { transform: rotate(45deg); background: var(--ink); }
.faq__answer { padding: 0 22px 22px; }
.faq__answer p { max-width: 60ch; }
@media (hover: hover) and (pointer: fine) {
  .faq details:not([open]) summary:hover { background: #FBF0E0; }
}
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .faq__answer { animation: answer-in 280ms var(--ease-out); }
}
@keyframes answer-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Contact ---------- */
.contact {
  background: var(--mango);
  padding-block: var(--section);
  --focus: var(--ink);
}
.contact .lead { color: var(--ink); }
.contact__grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) {
  .contact__grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; }
}
.contact__noscript {
  grid-column: 1 / -1;
  padding: 18px 22px;
  background: var(--paper);
  border-radius: var(--radius);
  font-weight: 500;
}
html:not(.js) .lead-form { display: none; }

.lead-form {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 40px);
  background: var(--paper);
  border-radius: calc(var(--radius) + 6px);
}
@media (min-width: 640px) {
  .lead-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
  .field--wide { grid-column: 1 / -1; }
}
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-weight: 500; }
.req, .opt { font-weight: 400; color: var(--ink-soft); font-size: 0.9em; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: #fff;
  border: 2px solid var(--field-line);
  border-radius: 14px;
  font-size: 1.0625rem;   /* >=16px: no iOS zoom */
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input[dir="ltr"] { text-align: right; }   /* typed LTR, aligned with RTL labels */
.field input::placeholder,
.field textarea::placeholder { color: #7A6D62; opacity: 1; } /* 4.6:1 on white */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--blueberry);
  outline-offset: 1px;
  border-color: var(--ink);
}
.field [aria-invalid="true"] { border-color: var(--cherry); }
.field__error {
  display: flex;
  gap: 6px;
  color: #A3102A;          /* 6.9:1 on paper */
  font-size: var(--step-small);
  font-weight: 500;
}

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-inline-end: 44px; cursor: pointer; }
.select-wrap::after {
  content: "";
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg);
  pointer-events: none;
}

/* honeypot: off-screen, not display:none (some bots skip hidden fields) */
.hp {
  position: absolute !important;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}
.form-foot .btn { min-width: 180px; }
@media (max-width: 479px) { .form-foot .btn { width: 100%; } }
.form-privacy { font-size: var(--step-small); color: var(--ink-soft); }

.form-status:empty { display: none; }
.form-status {
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--cream-deep);
  font-weight: 500;
}
.form-status[data-tone="success"] { background: #E6F3D3; }
.form-status[data-tone="error"] { background: #FCE3E8; }
.form-status p + p, .form-status p + a { margin-top: 10px; }
.form-status .btn { margin-top: 12px; }

.contact__aside {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding-top: 8px;
}
.contact__aside h3 { font-size: var(--step-h3); }
.contact__aside p { max-width: 30ch; }
.contact__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: var(--tap);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-decoration: none;
}
.contact__phone span { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(56px, 8vw, 112px) calc(32px + env(safe-area-inset-bottom));
  --focus: var(--mango);
}
.site-footer__mark { width: 100%; height: auto; color: var(--cream); direction: ltr; }
.site-footer__row {
  display: grid;
  gap: 18px;
  margin-top: clamp(28px, 4vw, 56px);
  align-items: center;
}
.site-footer__tag { color: #E9DCCB; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: var(--tap);
  font-weight: 500;
}
.site-footer__copy { color: #CDBFAE; font-size: var(--step-small); }  /* 10.5:1 on ink */
@media (min-width: 860px) {
  .site-footer__row { grid-template-columns: 1fr auto auto; gap: 40px; }
}

/* ---------- Floating WhatsApp (mobile) ---------- */
.wa-float {
  position: fixed;
  z-index: 50;
  inset-inline-start: 16px;   /* RTL: right edge, under the thumb */
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--raspberry-deep);
  color: #fff;
  box-shadow: 0 8px 22px -6px rgba(31, 26, 23, 0.45);  /* it truly floats */
  transition: transform 260ms var(--ease-out), opacity 200ms ease, visibility 0s linear 0s;
}
.wa-float .icon { width: 30px; height: 30px; }
.wa-float:active { transform: scale(0.95); }
.js .wa-float.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.92);
  transition: transform 220ms var(--ease-out), opacity 180ms ease, visibility 0s linear 220ms;
}
@media (min-width: 860px) { .wa-float { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .wa-float, .js .wa-float.is-hidden { transition: opacity 120ms ease, visibility 0s linear 120ms; transform: none; }
}

/* ---------- Reduced motion: global safety net ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
