/* Shared styles for /free-forms lead-magnet pages */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f2ea;
  --bg-warm: #f1e7d8;
  --surface: #fffdf9;
  --border: #e6d9c6;
  --text: #241a22;
  --muted: #5b4f57;
  --accent: #27AAE1;
  --accent-hover: #1e8fc0;
  --gold: #c79a3c;
  --plum: #5a2a44;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(36,26,34,0.06), 0 4px 12px rgba(36,26,34,0.05);
  --shadow-md: 0 8px 30px rgba(36,26,34,0.10);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 80px;
  -webkit-font-smoothing: antialiased;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  text-decoration: none;
  color: var(--text);
}
.logo img { width: 32px; height: 32px; }
.logo-name { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }

.hub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s;
}
.hub-link:hover { color: var(--accent); }

header {
  text-align: center;
  margin-bottom: 40px;
  max-width: 560px;
}
header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
header p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 860px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
a.card { text-decoration: none; color: inherit; }

.card-img-wrap {
  position: relative;
  background: var(--bg-warm);
  overflow: hidden;
}
.card-img-wrap.zoom { cursor: zoom-in; }
.card-img-wrap img {
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 480px;
  transition: transform 0.3s var(--ease);
}
.card-img-wrap:hover img { transform: scale(1.02); }

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.card-blurb {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  margin-top: 4px;
  width: 100%;
}
.btn-download:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-download:active { transform: translateY(0); }
.btn-download:disabled { opacity: .7; cursor: wait; }
.btn-download svg { flex-shrink: 0; width: 16px; height: 16px; }
.btn-download.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid color-mix(in oklab, var(--accent) 45%, var(--border));
  box-shadow: none;
}
.btn-download.secondary:hover {
  background: color-mix(in oklab, var(--accent) 8%, var(--surface));
  border-color: var(--accent);
}

.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(36,26,34,0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
  backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(36,26,34,0.5);
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* PDF banner */
.pdf-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 860px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 10%, var(--surface)) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text);
  margin: 28px 0 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.pdf-banner:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.pdf-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.pdf-icon svg { width: 22px; height: 22px; }
.pdf-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pdf-title { font-size: 15px; font-weight: 700; color: var(--accent); }
.pdf-sub { font-size: 13px; color: var(--muted); }
.pdf-arrow { flex-shrink: 0; color: var(--accent); opacity: 0.8; }
.pdf-arrow svg { width: 20px; height: 20px; }
button.pdf-banner {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
button.pdf-banner:disabled { opacity: .7; cursor: wait; }

/* Email card — primary CTA */
.email-mount {
  width: 100%;
  max-width: 860px;
  margin-top: 8px;
  margin-bottom: 8px;
}
.email-mount.is-primary { margin-top: 0; max-width: 560px; }
.email-mount.is-hidden,
.email-mount[hidden] { display: none !important; }
.email-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1.5px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
}
.email-mount.is-primary .email-card {
  border-color: var(--accent);
  background: linear-gradient(165deg, color-mix(in oklab, var(--accent) 7%, var(--surface)) 0%, var(--surface) 55%);
}
.email-card-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--accent) 16%, transparent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.email-card-icon svg { width: 24px; height: 24px; }
.email-card-body { flex: 1; min-width: 0; }
.email-card-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.email-card-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.45; }
.email-form { display: flex; flex-direction: column; gap: 10px; }
.email-fields {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}
@media (max-width: 560px) {
  .email-card { flex-direction: column; }
  .email-fields { grid-template-columns: 1fr; }
}
.email-fields input {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.email-fields input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.email-submit {
  align-self: stretch;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.email-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.email-submit:disabled { opacity: 0.65; cursor: wait; transform: none; }
.email-status { font-size: 13px; margin-top: 10px; line-height: 1.45; }
.email-status.is-ok { color: #2f7d4a; }
.email-status.is-error { color: #b33a2b; }
.email-status a { color: var(--accent); font-weight: 600; }

/* Post-submit: spam-check guidance screen */
.email-mount.is-success { max-width: 560px; }
.email-success {
  background: var(--surface);
  border: 1.5px solid color-mix(in oklab, #2f7d4a 35%, var(--border));
  border-radius: var(--radius);
  padding: 28px 24px 26px;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: emailSuccessIn 0.35s var(--ease);
}
@keyframes emailSuccessIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.email-success-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: color-mix(in oklab, #2f7d4a 14%, transparent);
  color: #2f7d4a;
  display: flex; align-items: center; justify-content: center;
}
.email-success-icon svg { width: 28px; height: 28px; }
.email-success-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.email-success-to {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.email-success-to strong { color: var(--text); }
.email-success-box {
  text-align: left;
  background: color-mix(in oklab, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 28%, var(--border));
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.email-success-box-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.email-success-steps {
  margin: 0;
  padding-left: 1.2em;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
}
.email-success-steps li { margin-bottom: 6px; }
.email-success-steps li:last-child { margin-bottom: 0; }
.email-success-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  margin-bottom: 14px;
  transition: background 0.15s, transform 0.15s;
}
.email-success-dl:hover { background: var(--accent-hover); transform: translateY(-1px); }
.email-success-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 36em;
  margin: 0 auto;
}

/* Quiet direct download — intentionally de-emphasized */
.dl-quiet {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 860px;
  margin-top: 18px;
}
.dl-quiet button,
.dl-quiet a {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, var(--muted) 40%, transparent);
  transition: color 0.15s;
}
.dl-quiet button:hover,
.dl-quiet a:hover { color: var(--text); }
.dl-quiet button:disabled { opacity: 0.6; cursor: wait; }

.btn-download.quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: none;
  font-weight: 500;
  font-size: 13px;
  padding: 9px 14px;
}
.btn-download.quiet:hover {
  background: var(--bg-warm);
  color: var(--text);
  border-color: color-mix(in oklab, var(--muted) 35%, var(--border));
  transform: none;
  box-shadow: none;
}

/* Products */
.products {
  width: 100%;
  max-width: 860px;
  margin-top: 64px;
}
.products-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 16px;
  text-align: center;
}
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 560px) {
  .products-grid { grid-template-columns: 1fr; }
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-warm);
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}
.product-card:hover .product-img-wrap img { transform: scale(1.04); }
.product-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}
.product-info { flex: 1; }
.product-name { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.product-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }
.product-price {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.product-arrow {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.5;
  transition: opacity 0.15s, transform 0.2s var(--ease);
}
.product-card:hover .product-arrow { opacity: 1; transform: translateX(4px); }

@keyframes spin { to { transform: rotate(360deg); } }

footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
