/* ═══════════════════════════════════════════════════════════════
   public/css/askfox.css
   /ask-fox/ — the Letters desk. A dusk-sky hero with the Fox at his
   desk, then the letter itself on cream stationery, riding up over
   the hero's edge. Sits on members/css/profile_v2.css for the paper
   tokens (--pv-*), fields and checkboxes.
   ═══════════════════════════════════════════════════════════════ */

.af {
  --af-navy: #0B1020;
  --af-display: 'Playfair Display', Georgia, serif;
  --af-body: 'DM Sans', system-ui, sans-serif;
  background: var(--pv-paper);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.af-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 15px/1 var(--af-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.af-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.af-btn:hover { transform: translateY(-1px); }
.af-btn--gold { background: var(--pv-gold); color: var(--af-navy) !important; box-shadow: 0 6px 20px rgb(212 175 55 / 30%); }
.af-btn--gold:hover { background: #E2C255; }
.af-btn--ghost { border-color: rgb(255 255 255 / 35%); color: #FFFFFF !important; background: rgb(255 255 255 / 6%); }
.af-btn--ghost:hover { background: rgb(255 255 255 / 14%); }
.af-btn--ink { background: var(--pv-ink); color: #FFFFFF !important; box-shadow: 0 6px 18px rgb(17 21 31 / 22%); }
.af-btn--ink:hover { background: #232A3B; }
.af-btn--ink svg { color: var(--pv-gold); }
.af :focus-visible { outline: 2px solid var(--pv-gold); outline-offset: 3px; }

/* ── Hero ─────────────────────────────────────────────────────── */
.af-hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, rgb(11 16 32 / 96%) 0%, rgb(11 16 32 / 78%) 45%, rgb(11 16 32 / 12%) 100%),
    var(--af-sky) center 70% / cover no-repeat,
    var(--af-navy);
  color: #FFFFFF;
}
/* A soft gold glow behind the Fox. */
.af-hero::after {
  content: ''; position: absolute; right: 8%; bottom: -30%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgb(212 175 55 / 28%), transparent 65%);
  pointer-events: none;
}
.af-hero__inner {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto; padding: 56px 24px 120px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: end;
}
.af-hero__kicker {
  margin: 0 0 14px; font: 800 11px/1 var(--af-body); letter-spacing: .18em; text-transform: uppercase;
  color: var(--pv-gold);
}
.af-hero__title {
  margin: 0; font: italic 900 clamp(56px, 8vw, 96px)/.95 var(--af-display); letter-spacing: -.01em;
  color: #FFFFFF;
}
.af-hero__title em { color: var(--pv-gold); }
.af-hero__sub {
  margin: 18px 0 0; max-width: 520px;
  font: italic 400 20px/1.5 var(--af-display); color: rgb(255 255 255 / 82%);
}
.af-hero__promises {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.af-hero__promises li {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border-radius: 999px; background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 16%);
  font: 600 13px/1 var(--af-body); color: #FFFFFF;
}
.af-hero__promises svg { width: 16px; height: 16px; fill: none; stroke: var(--pv-gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.af-hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.af-hero__fox { margin: 0 0 -120px; align-self: end; }
.af-hero__fox img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 20px 40px rgb(0 0 0 / 45%));
}

/* ── Body: letter + side ─────────────────────────────────────── */
.af-body {
  position: relative; z-index: 2;
  max-width: 1120px; margin: -72px auto 0; padding: 0 24px 80px;
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: start;
}

/* The letter: cream stationery with an airmail edge. */
.af-letter {
  background: #FFFEFA; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--pv-gold-line);
  box-shadow: 0 2px 4px rgb(17 21 31 / 6%), 0 24px 60px rgb(17 21 31 / 16%);
  scroll-margin-top: 90px;
}
.af-letter__airmail {
  height: 8px;
  background: repeating-linear-gradient(-45deg,
    #C0392B 0 14px, #FFFEFA 14px 22px, #1F3A7A 22px 36px, #FFFEFA 36px 44px);
}
.af-letter__inner { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 20px; }
.af-letter__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding-bottom: 16px; border-bottom: 1px dashed var(--pv-rule-2);
}
.af-letter__to { margin: 0; font: 400 15px/1.4 var(--af-body); color: var(--pv-ink-2); }
.af-letter__to strong { font: italic 900 20px/1 var(--af-display); color: var(--pv-ink); }
.af-letter__from { margin: 4px 0 0; font: 800 10.5px/1 var(--af-body); letter-spacing: .14em; text-transform: uppercase; color: var(--pv-gold-ink); }
.af-letter__date { margin: 0; font: italic 400 15px/1.4 var(--af-display); color: var(--pv-ink-3); white-space: nowrap; }

.af-form { gap: 22px; }
.af-form .pv2-fieldset legend,
.af-form .pv2-field { font-family: var(--af-body); }
.af-form .pv2-field select,
.af-form .pv2-field input[type="email"] {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--pv-rule-2); border-radius: 10px; background: #FFFFFF;
  font: 500 16px var(--af-body); color: var(--pv-ink);
}
.af-form .pv2-field select:focus,
.af-form .pv2-field input[type="email"]:focus {
  outline: none; border-color: var(--pv-gold-ink); box-shadow: 0 0 0 3px rgb(212 175 55 / 22%);
}
.af-form [hidden] { display: none !important; }

/* "Dear Fox," … "Yours," */
.af-salute { font: italic 700 22px/1.2 var(--af-display); color: var(--pv-ink); }
.af-salute--sign { display: block; margin-bottom: 10px; }

/* The letter body is ruled paper. */
.af-field--letter textarea {
  min-height: 220px; padding: 6px 16px !important; border-radius: 12px !important;
  font: 400 17px/32px var(--af-body) !important;
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, #E9E4D4 31px 32px) 0 6px / 100% 32px local,
    #FFFFFF !important;
}

/* Honeypot: off-screen, not display:none, so naive bots still see it. */
.af-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── Topic chips (radio buttons) ──────────────────────────────── */
.af-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.af-topic { position: relative; display: inline-flex; cursor: pointer; }
.af-topic input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.af-topic span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 12px;
  border-radius: 999px; border: 1px solid var(--pv-rule-2); background: #FFFFFF;
  font: 600 14px/1 var(--af-body); color: var(--pv-ink-2);
  transition: background .15s, border-color .15s, color .15s;
}
.af-topic span::before {
  content: ''; width: 18px; height: 18px; flex: none;
  background: currentColor;
  -webkit-mask: var(--af-ico) center / contain no-repeat; mask: var(--af-ico) center / contain no-repeat;
}
.af-topic--question { --af-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .8-1 1.5V14'/%3E%3Ccircle cx='12' cy='17.5' r='.6' fill='black'/%3E%3C/svg%3E"); }
.af-topic--feedback { --af-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.af-topic--idea { --af-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.4 1 1.1 1 1.8V16h5v-.3c0-.7.4-1.4 1-1.8A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.af-topic--broken { --af-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z'/%3E%3C/svg%3E"); }
.af-topic--account { --af-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.af-topic:hover span { background: var(--pv-gold-wash); border-color: var(--pv-gold-line); color: var(--pv-ink); }
.af-topic input:checked + span { background: var(--pv-ink); border-color: var(--pv-ink); color: #FFFFFF; }
.af-topic input:checked + span::before { background: var(--pv-gold); }
.af-topic input:focus-visible + span { outline: 2px solid var(--pv-gold-ink); outline-offset: 2px; }

.af-send {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 18px; border-top: 1px dashed var(--pv-rule-2);
}

/* ── Side column ──────────────────────────────────────────────── */
.af-side { display: flex; flex-direction: column; gap: 18px; padding-top: 92px; }
.af-desk {
  display: flex; gap: 14px; align-items: center;
  padding: 18px; border-radius: 16px;
  background: var(--af-navy); color: #FFFFFF;
  box-shadow: 0 12px 30px rgb(11 16 32 / 18%);
}
.af-desk img { width: 72px; height: 72px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--pv-gold); }
.af-desk__kicker { margin: 0 0 6px; font: 800 10.5px/1 var(--af-body); letter-spacing: .14em; text-transform: uppercase; color: var(--pv-gold); }
.af-desk__quote { margin: 0; font: italic 400 16px/1.45 var(--af-display); color: rgb(255 255 255 / 90%); }

.af-panel {
  padding: 20px 22px; border-radius: 16px; background: var(--pv-card); border: 1px solid var(--pv-rule);
  display: flex; flex-direction: column; gap: 12px;
}
.af-panel--plain { background: transparent; border-color: transparent; padding: 4px 4px 0; }
.af-panel__title { margin: 0; font: italic 900 20px/1.2 var(--af-display); color: var(--pv-ink); }

.af-faq { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.af-faq li + li { border-top: 1px solid var(--pv-rule); }
.af-faq a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 44px; font: 600 14px/1.3 var(--af-body); color: var(--pv-ink) !important;
}
.af-faq a span:last-child { font-size: 20px; color: var(--pv-gold-ink); transition: transform .15s; }
.af-faq a:hover span:last-child { transform: translateX(3px); }

.af-steps { list-style: none; margin: 0; padding: 0; counter-reset: af; display: flex; flex-direction: column; gap: 14px; }
.af-steps li {
  counter-increment: af; position: relative; padding-left: 42px;
  font: 400 14px/1.45 var(--af-body); color: var(--pv-ink-2);
}
.af-steps li strong { display: block; color: var(--pv-ink); }
.af-steps li::before {
  content: counter(af); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pv-gold-wash); border: 1px solid var(--pv-gold-line);
  font: italic 900 15px/1 var(--af-display); color: var(--pv-gold-ink);
}
.af-steps li + li::after {
  content: ''; position: absolute; left: 13.5px; top: -14px; width: 1px; height: 14px; background: var(--pv-gold-line);
}
.af-else { margin: 0; font: 600 14px/1.5 var(--af-body); }
.af-care { margin: 6px 0 0; font: 400 12px/1.5 var(--af-body); color: var(--pv-ink-3); }

/* ── Sent page ────────────────────────────────────────────────── */
.af-btn--line { border-color: var(--pv-rule-2); background: #FFFFFF; color: var(--pv-ink) !important; }
.af-btn--line:hover { background: var(--pv-gold-wash); border-color: var(--pv-gold-line); }

.af-hero--sent .af-hero__inner { grid-template-columns: minmax(0, 1fr) 280px; padding-top: 48px; padding-bottom: 104px; }
.af-hero--sent .af-hero__fox { margin-bottom: -104px; }
.af-hero__title--sent { font-size: clamp(44px, 6vw, 72px); }
.af-body--sent { grid-template-columns: minmax(0, 760px); justify-content: start; }

.af-receipt__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--pv-rule-2); }
.af-receipt__lead { margin: 0; font: 400 17px/1.6 var(--af-body); color: var(--pv-ink-2); }
.af-receipt__lead strong { color: var(--pv-ink); }

/* The reference as a postmark: a ringed stamp, inked in red, a touch askew. */
.af-stamp {
  flex: none; width: 128px; height: 128px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 3px double #B03A2E; color: #B03A2E;
  transform: rotate(-9deg);
  background: radial-gradient(circle, rgb(176 58 46 / 6%), transparent 70%);
  box-shadow: inset 0 0 0 6px #FFFEFA, inset 0 0 0 7px rgb(176 58 46 / 55%);
}
.af-stamp__line { font: 800 9px/1 var(--af-body); letter-spacing: .16em; text-transform: uppercase; }
.af-stamp__ref { font: italic 900 22px/1 var(--af-display); letter-spacing: .02em; }

.af-steps--row { flex-direction: row; gap: 16px; }
.af-steps--row li { flex: 1 1 0; padding-left: 0; padding-top: 38px; }
.af-steps--row li::before { top: 0; }
.af-steps--row li + li::after { display: none; }
.af-steps li.is-done::before { content: '\2713'; background: var(--pv-gold); border-color: var(--pv-gold); color: var(--af-navy); font-style: normal; }

@media (max-width: 860px) {
  .af-hero--sent .af-hero__inner { grid-template-columns: minmax(0, 1fr) 120px; padding-bottom: 80px; }
  .af-hero--sent .af-hero__fox { margin-bottom: -80px; }
  .af-receipt__top { flex-direction: column-reverse; align-items: flex-start; }
  .af-stamp { width: 116px; height: 116px; align-self: flex-end; margin-top: -8px; }
  .af-stamp__line { font-size: 8px; letter-spacing: .08em; }
  .af-stamp__ref { font-size: 20px; }
  .af-steps--row { flex-direction: column; }
  .af-steps--row li { padding-top: 0; padding-left: 42px; }
}

/* ── Small screens ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .af-hero__inner { grid-template-columns: minmax(0, 1fr) 150px; padding: 32px 16px 96px; gap: 8px; }
  .af-hero__fox { margin-bottom: -96px; }
  .af-hero__sub { font-size: 17px; }
  .af-hero__ctas .af-btn--ghost { display: none; }
  .af-body { grid-template-columns: minmax(0, 1fr); margin-top: -56px; padding: 0 16px 56px; }
  .af-side { padding-top: 0; }
  .af-letter__inner { padding: 22px 18px 24px; }
  .af-letter__head { flex-direction: column; }
  .af-topic span { min-height: 44px; }
  .af-send .af-btn { width: 100%; }
}
@media (max-width: 480px) {
  .af-hero__inner { grid-template-columns: minmax(0, 1fr) 110px; }
  .af-hero__promises li { font-size: 12px; }
}
