/* Highest Vitality — The Grape Reset free guide.
   Shared by /the-grape-reset (sign-up), /grape-reset-ready (confirmation)
   and the site pop-up (assets/grape-reset.js). Uses the site palette:
   ink, parchment, paper, amber, sienna, with the guide's own grape plum
   for the cover panel. */

:root { --grape: #5b3a4b; --grape-deep: #432a37; }

/* ---------- shared form ---------- */
.gr-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 480px; }
.gr-form input[type="email"] {
  flex: 1 1 230px; min-width: 0;
  font-family: 'Playfair Display', serif; font-size: 16px; /* 16px stops iOS zooming on focus */
  color: var(--ink, #12160f);
  padding: 15px 16px;
  background: var(--paper, #fbf8f0);
  border: 1px solid rgba(18,22,15,0.2); border-radius: 2px;
}
.gr-form input[type="email"]:focus { outline: none; border-color: var(--sienna, #7c4029); box-shadow: 0 0 0 3px rgba(124,64,41,0.14); }
.gr-form .gr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 16px 26px; border-radius: 2px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .25s ease, color .25s ease, transform .25s ease, opacity .2s ease;
}
.gr-btn-primary { background: var(--sienna, #7c4029); color: var(--paper, #fbf8f0); }
.gr-btn-primary:hover { background: var(--sienna-deep, #4a2517); transform: translateY(-1px); }
.gr-btn-outline { border-color: var(--sienna, #7c4029); color: var(--sienna-deep, #4a2517); background: transparent; }
.gr-btn-outline:hover { background: var(--sienna, #7c4029); color: var(--paper, #fbf8f0); }
.gr-btn[disabled] { opacity: 0.55; cursor: wait; transform: none; }
.gr-btn:focus-visible, .gr-close:focus-visible { outline: 2px solid var(--amber, #c98d43); outline-offset: 3px; }
.gr-status { flex-basis: 100%; min-height: 1.2em; margin-top: 2px; font-size: 13.5px; color: var(--sienna, #7c4029); }
.gr-fine { margin-top: 12px; font-size: 13px; color: #6b6f60; }

.gr-cover { display: block; width: 100%; height: auto; border-radius: 2px;
  box-shadow: 0 2px 4px rgba(18,22,15,0.08), 0 34px 60px -26px rgba(67,42,55,0.6); }

/* ---------- minimal header for the guide pages ---------- */
.gr-top { padding: 22px 0; }
.gr-top .wrap { display: flex; align-items: center; justify-content: space-between; }
.gr-brand { display: flex; align-items: center; gap: 12px; color: var(--ink, #12160f); }
.gr-brand img { width: 30px; height: 30px; object-fit: contain; }
.gr-brand span { font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase; }
.gr-top-link { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sienna-deep, #4a2517); }
.gr-top-link:hover { color: var(--sienna, #7c4029); }

/* ---------- sign-up page ---------- */
.gr-hero { padding: 24px 0 80px; }
.gr-hero .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 96px); align-items: center; }
.gr-hero .gr-cover { max-width: 400px; justify-self: end; }
.gr-hero h1 { font-size: clamp(40px, 5.6vw, 64px); line-height: 1.02; letter-spacing: -0.02em; margin: 14px 0 16px; }
.gr-hero h1 em { color: var(--grape); }
.gr-sub { font-size: 18px; font-style: italic; line-height: 1.5; color: #3a3f33; max-width: 40ch; margin-bottom: 28px; }
.gr-rule { width: 64px; height: 2px; background: var(--sienna, #7c4029); margin: 26px 0; }
.gr-inside { margin: 34px 0 14px; padding-top: 22px; border-top: 1px solid var(--line, rgba(18,22,15,0.12)); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sienna, #7c4029); }
.gr-list { list-style: none; display: grid; gap: 12px; }
.gr-list li { position: relative; padding-left: 22px; font-size: 15.5px; color: #2f342a; }
.gr-list li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--grape); }

/* ---------- confirmation page ---------- */
.gr-ready { padding: 30px 0 90px; }
.gr-ready .wrap { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.gr-ready .gr-cover { max-width: 300px; justify-self: end; }
.gr-ready h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.02em; margin: 14px 0 16px; }
.gr-ready .lede { font-size: 17.5px; line-height: 1.6; color: #3a3f33; max-width: 46ch; }
.gr-ready .lede em { color: var(--grape); }
.gr-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0 18px; }
.gr-note { font-size: 13.5px; color: #6b6f60; max-width: 52ch; }
.gr-note + .gr-note { margin-top: 6px; }
.gr-next { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line, rgba(18,22,15,0.12)); font-size: 15px; color: #3a3f33; }
.gr-next a { color: var(--sienna, #7c4029); border-bottom: 1px solid currentColor; }

@media (max-width: 760px) {
  .gr-hero .wrap, .gr-ready .wrap { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .gr-hero .gr-cover { max-width: 128px; justify-self: start; }
  .gr-hero h1 { margin-top: 8px; }
  .gr-top-link { display: none; }
  .gr-top { padding: 16px 0; }
  .gr-ready .gr-cover { max-width: 140px; justify-self: start; }
  .gr-hero { padding-top: 4px; }
  .gr-sub { font-size: 16.5px; }
  .gr-sub { margin-bottom: 20px; }
  .gr-form .gr-btn, .gr-actions .gr-btn { flex: 1 1 100%; }
}

/* ---------- pop-up ---------- */
.gr-pop { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; }
.gr-pop[hidden] { display: none; }
.gr-pop-backdrop { position: absolute; inset: 0; background: rgba(9,11,7,0.62); backdrop-filter: blur(3px); }
.gr-pop-card {
  position: relative; width: min(780px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  background: var(--parchment, #f5efe2); color: var(--ink, #12160f);
  font-family: 'Playfair Display', serif;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.6);
  animation: grPopIn .4s cubic-bezier(.22,.61,.36,1);
}
.gr-pop-art { background: var(--grape); display: grid; place-items: center; padding: 36px 30px; }
.gr-pop-art .gr-cover { max-width: 240px; box-shadow: 0 24px 46px -18px rgba(0,0,0,0.7); }
.gr-pop-body { padding: 44px 38px 34px; }
.gr-pop-body .eyebrow { display: block; }
.gr-pop-body h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.05; margin: 12px 0 12px; color: var(--ink, #12160f); }
.gr-pop-body p { font-size: 15px; line-height: 1.6; color: #3a3f33; }
.gr-pop-body .gr-form { margin-top: 22px; }
.gr-pop-body .gr-form .gr-btn { flex: 1 1 100%; }
.gr-close {
  position: absolute; top: 10px; right: 12px; z-index: 1;
  width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
  font-size: 28px; line-height: 1; color: #6b6f60;
}
@keyframes grPopIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gr-pop-card { animation: none; } }

/* phones: a bottom sheet with a short plum band behind a small cover */
@media (max-width: 640px) {
  .gr-pop { place-items: end center; padding: 0; }
  .gr-pop-card { grid-template-columns: minmax(0, 1fr); width: 100%; max-height: 90vh; }
  .gr-pop-art { padding: 26px 20px 0; background: linear-gradient(var(--grape) 68%, var(--parchment, #f5efe2) 68%); }
  .gr-pop-art .gr-cover { max-width: 112px; }
  .gr-pop-body { padding: 18px 22px calc(26px + env(safe-area-inset-bottom, 0px)); }
  .gr-pop-body h2 { margin-top: 8px; }
  .gr-close { color: var(--parchment, #f5efe2); }
}
