/* ============================================================
   WagonWorksAI Components · objects, not boxes
   Claim tickets, patches, field cards, letterpress blocks,
   assay stamps, the deed, the night-sky footer.
   ============================================================ */

/* ---------- Letterpress buttons ---------- */
.press {
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  padding: 14px 30px; border-radius: 6px; cursor: pointer;
  border: var(--border); text-decoration: none; display: inline-block;
  transition: transform .06s ease, box-shadow .06s ease;
}
.press.primary { background: var(--sunrise); color: #fff; box-shadow: var(--press); }
.press.paper   { background: var(--parch);  color: var(--ink); box-shadow: var(--press); }
.press.night   { background: var(--ink); color: var(--ember); box-shadow: 0 4px 0 #0c1420; }
.press:active  { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }

/* ---------- Claim ticket (the CTA) ---------- */
.stub { display: flex; filter: drop-shadow(3px 4px 0 rgba(29,42,58,.18)); transform: rotate(-1.2deg); }
.stub .main {
  background: var(--parch); border: var(--border); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius); padding: 26px 34px; position: relative;
}
.stub .main .top { font-family: var(--sans); font-size: 9.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--saddle); }
.stub .main h3 { font-size: 34px; margin: 6px 0 2px; }
.stub .main .fine { font-family: var(--sans); font-size: 10.5px; color: var(--saddle); margin-top: 10px; letter-spacing: .06em; }
.stub .tear { width: 0; border-left: 2.5px dashed var(--ink); position: relative; background: var(--parch); }
.stub .end {
  background: var(--sunrise); border: var(--border); border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0; padding: 26px 20px; display: flex; align-items: center; cursor: pointer;
}
.stub .end .vert { writing-mode: vertical-rl; font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .3em; color: #fff; text-transform: uppercase; }
.stub .punch { width: 16px; height: 16px; border-radius: 50%; background: var(--panel); border: var(--border); position: absolute; left: -9px; }
.stub .punch.t { top: -9px; } .stub .punch.b { bottom: -9px; }
.stub.torn .end { animation: tear-off .5s ease forwards; }
@keyframes tear-off { to { transform: translateX(28px) rotate(6deg); opacity: 0; } }

/* ---------- Tier patches ---------- */
.patches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.patch { background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 30px 24px; text-align: center; }
.patch svg { display: block; margin: 0 auto 16px; }
.patch b { font-weight: 900; font-size: 20px; display: block; }
.patch .who { font-style: italic; font-size: 13.5px; color: var(--sky); display: block; margin: 4px 0 10px; }
.patch ul { list-style: none; text-align: left; font-family: var(--sans); font-size: 13.5px; }
.patch li { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.patch li::before { content: "→ "; color: var(--sunrise); }

/* ---------- Field card (the five questions) ---------- */
.fieldcard {
  max-width: 560px; background: var(--parch); border: var(--border); border-radius: var(--radius);
  padding: 30px 34px; position: relative; transform: rotate(.6deg);
  box-shadow: 4px 5px 0 rgba(29,42,58,.15); margin: 0 auto;
}
.fieldcard::before { content: ""; position: absolute; top: 18px; right: 20px; width: 15px; height: 15px; border-radius: 50%; background: var(--cream); border: var(--border); }
.fieldcard .fc-top { font-family: var(--sans); font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--rust); border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.fieldcard h3 { font-size: 24px; margin-bottom: 14px; }
.fieldcard li { list-style: none; font-family: var(--sans); font-size: 14.5px; padding: 9px 0; border-bottom: 1px dotted var(--line); display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.fieldcard li .box { width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 3px; flex-shrink: 0; margin-top: 2px; }
.fieldcard .fc-fine { font-style: italic; font-size: 13px; color: var(--saddle); margin-top: 14px; }

/* ---------- Assay stamp (measured numbers only) ---------- */
.assay { display: flex; gap: 52px; align-items: center; flex-wrap: wrap; }
.assay .stamp { width: 210px; height: 210px; transform: rotate(-7deg); flex-shrink: 0; }

/* ---------- The Deed (always / never) ---------- */
.deed { background: var(--parch); border: var(--border); border-radius: 6px; padding: 14px; }
.deed .inner { border: 1px solid var(--saddle); outline: 4px double var(--saddle); outline-offset: -9px; padding: 44px 48px 38px; }
.deed .head { text-align: center; margin-bottom: 28px; }
.deed .head .small { font-family: var(--sans); font-size: 10px; letter-spacing: .44em; text-transform: uppercase; color: var(--saddle); }
.deed .head h3 { font-size: 38px; margin: 6px 0 2px; }
.deed .head .flourish { color: var(--sunrise); font-size: 18px; letter-spacing: .4em; }
.deed .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.deed h4 { font-family: var(--sans); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.deed .always h4 { color: var(--green); } .deed .never h4 { color: var(--rust); }
.deed li { list-style: none; font-size: 15.5px; padding: 8px 0; border-bottom: 1px dotted var(--line); line-height: 1.5; }
.deed .always li::before { content: "§  "; color: var(--green); font-weight: 700; }
.deed .never  li::before { content: "§  "; color: var(--rust);  font-weight: 700; }
.deed .sealrow { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 34px; }
.deed .sig { font-style: italic; font-size: 20px; }
.deed .sig small { display: block; font-family: var(--sans); font-style: normal; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--saddle); margin-top: 4px; }

/* ---------- Trail navigation ---------- */
.trail { position: relative; display: flex; justify-content: space-between; padding: 26px 10px 4px; }
.trail::before { content: ""; position: absolute; top: 36px; left: 36px; right: 36px; border-top: 2.5px dashed var(--saddle); }
.wp { position: relative; text-align: center; font-family: var(--sans); width: 120px; }
.wp .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--cream); border: var(--border); margin: 0 auto 10px; position: relative; z-index: 1; }
.wp.active .dot { background: var(--sunrise); border-color: var(--sunrise); box-shadow: 0 0 0 5px rgba(217,108,44,.2); }
.wp .t { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.wp .d { font-size: 10px; color: var(--saddle); margin-top: 2px; }

/* ---------- Campfire sparks ---------- */
.sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sp { position: absolute; bottom: -6px; width: 3px; height: 3px; border-radius: 50%; background: var(--ember); opacity: 0; animation: rise 7s linear infinite; }
@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: .9; } 60% { opacity: .5; }
  100% { transform: translateY(-420px) translateX(26px); opacity: 0; }
}

/* ---------- Draw-in illustrations (added by motion.js) ---------- */
.draws path.rut { stroke-dasharray: 300; stroke-dashoffset: 300; }
.draws.drawn path.rut { animation: draw 2.6s ease forwards; }
.draws.drawn path.rut:nth-of-type(2) { animation-delay: .35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Calculator (Rent Calculator) ---------- */
.calc { background: var(--ink); color: #f4efe6; border-radius: 12px; border: var(--border); padding: 44px 40px; }
.calc h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ember); margin-bottom: 22px; }
.calc .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.field { margin-bottom: 20px; }
.field label { font-family: var(--sans); display: block; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: #c9bea8; margin-bottom: 8px; }
.field input[type=range] { width: 100%; accent-color: var(--sunrise); }
.field .val { font-size: 26px; font-weight: 700; font-family: var(--display); }
.results .lbl { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #c9bea8; margin-bottom: 4px; }
.results .big { font-size: 54px; font-weight: 900; color: var(--ember); line-height: 1.05; }
.bars { margin-top: 16px; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-family: var(--sans); font-size: 13px; }
.bar .name { width: 120px; color: #c9bea8; }
.bar .track { flex: 1; background: #31425a; border-radius: 4px; height: 26px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 10px; font-weight: 600; font-size: 12.5px; white-space: nowrap; min-width: fit-content; transition: width .4s ease; }
.bar.cloud .fill { background: var(--rust); color: #ffd9c9; }
.bar.ww .fill { background: var(--green); color: #d8f3e3; }
.breakeven { font-size: 14px; color: #c9bea8; font-style: italic; margin-top: 12px; }
.disclaimer { font-size: 11.5px; color: #8fa0b5; margin-top: 18px; font-family: var(--sans); }

/* ---------- Night-sky footer ---------- */
.nightfooter { background: linear-gradient(180deg, var(--night2) 0%, #10161f 100%); position: relative; overflow: hidden; }
.nightfooter .cap { padding: 26px 0 42px; }
.nightfooter .cap .line { font-style: italic; font-size: 21px; color: #e8e2d2; max-width: 40ch; }
.nightfooter .cap .line b { color: var(--ember); font-style: normal; }
.nightfooter .cap .foot { font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #8fa0b5; margin-top: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

@media (max-width: 860px) {
  .patches, .deed .cols, .calc .grid { grid-template-columns: 1fr; }
  .trail { min-width: 620px; }
  .trailscroll { overflow-x: auto; }
}

/* ============================================================
   Polish pass — sliders, bars, featured tier, tickets, footer
   ============================================================ */

/* ---------- Custom range slider (orange thumb, white ring) ---------- */
.calc .field input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.calc .field input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 4px; background: #31425a; }
.calc .field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--sunrise); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.calc .field input[type=range]::-moz-range-track { height: 6px; border-radius: 4px; background: #31425a; }
.calc .field input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--sunrise); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.calc .field input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(217,108,44,.3); }
.calc .field input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(217,108,44,.3); }

/* ---------- Comparison bars: warm burnt vs. sage, tuned on navy ---------- */
.bar.cloud .fill { background: #b0572f; color: #ffe4d3; }
.bar.ww .fill { background: #5f8158; color: #e6f0de; }

/* ---------- Savings, the hero metric, a touch larger ---------- */
.results .big { font-size: clamp(54px, 7vw, 68px); }

/* ---------- Featured & premium tiers ---------- */
.patches { padding-top: 14px; }
.patch { position: relative; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.patch:hover { border-color: var(--sunrise); }
.patch.featured { border-color: var(--sunrise); border-width: 2.5px; box-shadow: 0 8px 0 var(--sunrise), 0 14px 24px rgba(29,42,58,.14); transform: translateY(-8px); }
.patch .ribbon { position: absolute; top: -15px; left: 50%; transform: translateX(-50%) rotate(-1.5deg); background: var(--sunrise); color: #fff; font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 6px 16px; border: 2px solid var(--ink); border-radius: 20px; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); }
.patch.premium li::before { content: "\2192  "; color: #c2922f; font-weight: 800; }
@media (max-width: 860px) { .patch.featured { transform: none; } }

/* ---------- Ticket: a touch more paper feel ---------- */
.stub .main { box-shadow: inset 0 0 44px rgba(138,111,77,.07); }

/* ---------- Footer closer + link hover ---------- */
.nightfooter .cap .line b { font-size: 1.1em; }
.nightfooter .foot a { transition: color .15s ease; }
.nightfooter .foot a:hover { color: var(--ember) !important; }

/* ---------- Claim ticket fits small screens ---------- */
@media (max-width: 480px) {
  .stub { max-width: 100%; transform: rotate(-1deg); }
  .stub .main { min-width: 0; padding: 22px 18px; }
  .stub .end { padding: 22px 12px; }
}

/* ---------- Sewn-patch stitch line on the tier badges (P1) ---------- */
.patch::after { content: ""; position: absolute; inset: 9px; border: 1.5px dashed rgba(138,111,77,.45); border-radius: 8px; pointer-events: none; }
.patch.featured::after { border-color: rgba(217,108,44,.5); }

/* ---------- Cookie notice (a pinned field note) ---------- */
.ww-consent { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 9998; display: flex; justify-content: center; pointer-events: none; opacity: 0; transform: translateY(14px); transition: opacity .38s ease, transform .38s cubic-bezier(.2,.7,.2,1); }
.ww-consent.shown { opacity: 1; transform: none; }
.ww-consent .wc-card { pointer-events: auto; max-width: 700px; width: 100%; background: var(--parch); border: var(--border); border-radius: 12px; box-shadow: 4px 6px 0 rgba(29,42,58,.18); padding: 16px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ww-consent .wc-body { font-family: var(--sans); font-size: 13.5px; line-height: 1.55; color: #3a3428; flex: 1; min-width: 240px; }
.ww-consent .wc-body b { color: var(--ink); }
.ww-consent .wc-body a { color: var(--sky); }
.ww-consent .wc-acts { display: flex; gap: 10px; }
.ww-consent .press { font-size: 13px; padding: 10px 18px; }
@media (max-width: 560px) { .ww-consent .wc-acts { width: 100%; } .ww-consent .wc-acts .press { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .ww-consent { transition: none; } }

/* ---------- Night-sky life: twinkling stars + a pulsing North Star ---------- */
@keyframes ww-twinkle { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes ww-pulse { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }
.nightfooter circle.tw { animation: ww-twinkle 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.nightfooter circle.northstar-halo { animation: ww-pulse 4.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .nightfooter circle.tw, .nightfooter circle.northstar-halo { animation: none; } }

/* ---------- Campfire cursor sparks ---------- */
.ww-spark { position: fixed; width: 4px; height: 4px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 6px rgba(255,178,125,.8); pointer-events: none; z-index: 9997; opacity: 0; }
@keyframes ww-drift { 0% { opacity: .95; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx,6px), -42px) scale(.4); } }
