/* Skeleton Files /free-guide/ page: the form card (the site's index card with a folder tab, like the newsletter card), the
   page previews and the text beside them. Loaded after /style.css, so it uses the site's tokens and follows <html data-theme>.
   No inline styles anywhere: every state is a class or an attribute (data-gd-state on the form: "", "sending", "ok", "err").
   Class names are gd-*: this page's form is not a newsletter form, and /newsletter.js (added to every page by
   tools/sync_footer_nav.py) leaves it alone. */

.gd-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: start; }
#get { scroll-margin-top: 56px; } /* the no-JS form lands on /free-guide/?ok=1#get: the folder tab stays clear of the sticky header */

/* ---------- the card ---------- */
.gd-card {
  position: relative; margin-top: 32px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 0 6px 6px 6px;
  padding: 38px 30px 22px;
  --gd-field-line: #8f8574;                                  /* 3.4:1 on --ink-2 light (WCAG 1.4.11) */
}
html[data-theme="dark"] .gd-card { --gd-field-line: #756d5c; } /* 3.6:1 on --ink-2 dark */
.gd-card::before { content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(212, 160, 23, 0.28); pointer-events: none; }
.gd-card > * { position: relative; }
.gd-card > .gd-tab { position: absolute; }
.gd-tab {
  left: -1px; top: -31px; height: 32px; max-width: calc(100% + 2px);
  display: flex; align-items: center; padding: 0 16px 1px;
  background: var(--ink-2); border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0;
  color: var(--amber); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gd-title {
  font-family: "Archivo Black", sans-serif; font-weight: normal;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 1.08; text-transform: uppercase; letter-spacing: 0.01em;
  margin: 0 0 12px; max-width: none; text-wrap: balance;
}
.gd-title em { font-style: normal; color: var(--amber); }
.gd-desc { color: var(--bone-dim); font-size: 1rem; line-height: 1.55; margin: 0 0 20px; max-width: 520px; text-wrap: pretty; }

/* ---------- the form ---------- */
.gd-form { max-width: none; position: relative; z-index: 1; }
.gd-label { margin-bottom: 8px; }
.gd-row { display: flex; flex-direction: column; gap: 10px; } /* the button is long: it gets its own full-width row */
.gd-row .gd-email { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 12px 14px; }
.gd-row .gd-email:not(:focus):not([aria-invalid="true"]) { border-color: var(--gd-field-line); }
.gd-row .gd-email::placeholder { color: var(--bone-dim); opacity: 0.9; }
.gd-row .gd-email:focus { box-shadow: 0 0 0 1px var(--amber); }
.gd-row .gd-email[aria-invalid="true"] { border-color: var(--stamp); }
.gd-btn {
  flex: none; width: 100%; min-height: 52px; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; white-space: nowrap; cursor: pointer; border: 0;
}
.gd-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.gd-btn[disabled], .gd-btn[aria-disabled="true"] { opacity: 0.72; cursor: progress; }

/* the optional newsletter tick box (never ticked for you). The global label style is small caps: this one reads as a sentence. */
.gd-opt {
  display: flex; align-items: flex-start; gap: 12px; margin: 14px 0 0; padding: 6px 0;
  font-size: 0.97rem; line-height: 1.45; letter-spacing: 0; text-transform: none; color: var(--bone); cursor: pointer;
}
.gd-opt input { width: 22px; height: 22px; padding: 0; margin: 1px 0 0; flex: none; accent-color: var(--amber-fill); cursor: pointer; }
.gd-opt input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.gd-nlnote { margin: 0 0 0 34px; font-size: 0.8rem; line-height: 1.5; color: var(--bone-dim); }

.gd-msg { min-height: 1.4em; margin: 8px 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--bone-dim); }
.gd-form[data-gd-state="err"] .gd-msg { color: var(--err-text); }

/* "Check your inbox" */
.gd-done { display: none; flex-direction: column; align-items: flex-start; gap: 14px; margin: 4px 0 0; }
.gd-done:focus { outline: none; }
.gd-done:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.gd-done p { color: var(--bone-dim); font-size: 0.95rem; line-height: 1.55; margin: 0 0 10px; }
.gd-done .gd-done-t { color: var(--bone); font-family: "Archivo Black", sans-serif; font-size: 1.25rem; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 8px; }
.gd-done a { color: var(--bone); text-decoration: underline; text-decoration-color: rgba(212, 160, 23, 0.6); text-underline-offset: 3px; }
.gd-done a:hover { color: var(--amber); }
.gd-form[data-gd-state="ok"] .gd-field, .gd-form[data-gd-state="ok"] .gd-msg { display: none; }
.gd-card:has(.gd-form[data-gd-state="ok"]) .gd-desc { display: none; } /* "Leave your email address…" is done with */
.gd-form[data-gd-state="ok"] .gd-done { display: flex; }
.gd-stamp {
  flex: none; color: var(--stamp-text); border: 2px solid var(--stamp);
  padding: 4px 10px; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
  transform: rotate(-4deg); white-space: nowrap; margin-top: 2px;
  animation: gd-stamp 0.32s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.gd-fine { margin-top: 10px; font-size: 0.8rem; line-height: 1.5; color: var(--bone-dim); letter-spacing: 0.02em; }
.gd-form[data-gd-state="ok"] .gd-fine { margin-top: 16px; }
.gd-fine a { color: var(--bone); text-decoration: underline; text-decoration-color: rgba(212, 160, 23, 0.6); text-underline-offset: 3px; position: relative; }
.gd-fine a:hover { color: var(--amber); }
.gd-fine a::after { content: ""; position: absolute; inset: -14px -4px; } /* a bigger tap area for the small link */

/* ---------- the text beside the card ---------- */
.gd-about { color: var(--bone-dim); max-width: 560px; }
.gd-about h2 { font-size: clamp(1.05rem, 2vw, 1.3rem); margin: 0 0 12px; color: var(--bone); }
.gd-about * + h2 { margin-top: 30px; }
.gd-about h2 + p, .gd-about p + p { margin-top: 10px; }
.gd-about ul { margin: 0 0 0 20px; }
.gd-about li { margin-bottom: 8px; }
.gd-about b { color: var(--bone); font-weight: 600; }
.gd-about a { color: var(--bone); text-decoration: underline; text-decoration-color: rgba(212, 160, 23, 0.6); text-underline-offset: 3px; }
.gd-about a:hover { color: var(--amber); }
.gd-small { font-size: 0.82rem; color: var(--bone-dim); letter-spacing: 0.04em; }
.gd-about * + .gd-small { margin-top: 18px; }

.gd-previews { margin: 32px 0 34px; }
.gd-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.gd-shots img {
  display: block; width: 100%; height: auto; background: var(--ink-3);
  border: 1px solid var(--line); box-shadow: var(--device-shadow);
}
.gd-shots img:nth-child(2) { margin-top: 14px; }
.gd-shots img:nth-child(3) { margin-top: 28px; }
.gd-previews figcaption { margin-top: 12px; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--bone-dim); }

@media (min-width: 861px) {
  .gd-page > .gd-card { position: sticky; top: 104px; } /* the form stays in view beside the longer text */
}
@media (max-width: 860px) {
  .gd-page { grid-template-columns: 1fr; gap: 40px; }
  .gd-about { max-width: none; }
  .gd-card { padding: 34px 20px 20px; }
  .gd-previews { margin-top: 0; }
}
/* the bot check (Cloudflare Turnstile, when it is switched on): nothing to see unless Cloudflare needs the visitor to do something */
.gd-ts { margin: 10px 0 0; }
.gd-ts:empty { display: none; }

@media (max-width: 560px) {
  .gd-tab { font-size: 0.68rem; letter-spacing: 0.12em; padding: 0 12px 1px; }
  .gd-shots { gap: 8px; }
  /* a phone should see the form without scrolling: a tighter header, a shorter lead, less air above the card */
  .gd-head { padding: 22px 0 18px; }
  .gd-head .crumb { display: none; }            /* the logo is one tap away, and the page says what it is in the heading */
  .gd-head h1 { font-size: clamp(1.4rem, 6.6vw, 1.7rem); line-height: 1.08; }
  .gd-head .lead { margin-top: 10px; font-size: 0.96rem; line-height: 1.5; }
  .gd-lead-extra { display: none; }              /* what is inside is listed right below the form's neighbour; the form comes first */
  #get { padding-top: 18px; }
  .gd-card { margin-top: 36px; padding-top: 24px; }
  /* the card's own heading repeats the page's: kept for screen readers, not shown (the folder tab above it names the card) */
  .gd-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .gd-desc { margin-bottom: 14px; font-size: 0.95rem; line-height: 1.5; }
}

@keyframes gd-stamp { from { opacity: 0; transform: rotate(-4deg) scale(1.5); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .gd-stamp { animation: none; } }
html.motion-off .gd-stamp { animation: none; }
/* Windows High Contrast: .btn has no border, so the button would read as plain text */
@media (forced-colors: active) { .gd-btn { border: 1px solid ButtonText; } }
