/* Palbuilder site v1 — shared styles */
:root {
  --ink: #201D18;
  --paper: #FAF7F2;
  --white: #FFFFFF;
  --green: #1B5E3F;
  --green-dark: #14492F;
  --green-tint: #D7E5DC;
  --amber: #F2B843;
  --muted: #6B6459;
  --line: #E6DFD3;
  --display: 'Bricolage Grotesque', 'Segoe UI', 'Arial Narrow', sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
img, svg { max-width: 100%; }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }

/* ---- Nav ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.nav-logo {
  width: 36px; height: 36px; background: var(--green); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; transform: rotate(-4deg);
}
.nav-name { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
@media (max-width: 640px) { .nav-links .nav-plain { display: none; } }

/* ---- Buttons & stickers ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 28px; background: var(--green); color: var(--white);
  border-radius: 999px; font-weight: 700; font-size: 16px; border: none; cursor: pointer;
}
.btn:hover { background: var(--green-dark); color: var(--white); }
.btn.nav-signin { background: var(--white); color: var(--green); border: 2px solid var(--green); }
.btn.nav-signin:hover { background: var(--green-tint); color: var(--green-dark); }
.home-nav a:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
@media (max-width: 640px) {
  .home-nav { flex-wrap: wrap; gap: 16px; }
  .home-nav .nav-links { gap: 12px; }
  .home-nav .nav-links .btn { padding-inline: 18px; }
}
@media (max-width: 480px) {
  .home-nav .nav-links { width: 100%; }
  .home-nav .nav-links .btn { flex: 1; }
}
.btn-big { min-height: 60px; padding: 14px 40px; font-size: 19px; box-shadow: 5px 5px 0 var(--ink); }
.btn-big:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.sticker {
  display: inline-block; border-radius: 999px; padding: 11px 20px;
  font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--ink);
}
.sticker-dash { background: var(--white); border: 2.5px dashed var(--ink); }
.sticker-amber { background: var(--amber); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }

/* ---- Hero ---- */
.hero {
  position: relative; text-align: center;
  padding: clamp(64px, 10vw, 130px) 24px clamp(72px, 11vw, 150px);
}
.hero h1 {
  margin: 0 auto; max-width: 18ch;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(42px, 7.5vw, 96px); line-height: 1.0; letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--green); }
.hero .sub {
  margin: 24px auto 0; max-width: 34ch;
  font-size: clamp(17px, 2.2vw, 25px); line-height: 1.45; color: var(--muted); text-wrap: balance;
}
.hero .cta { margin-top: 32px; }
.hero .fine { margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-float { position: absolute; }
@media (max-width: 900px) { .hero-float { display: none; } }

/* ---- Ticker ---- */
.ticker { background: var(--ink); padding: 14px 0; overflow: hidden; transform: rotate(-1deg) scale(1.02); }
.ticker-track {
  display: flex; gap: 44px; width: max-content; white-space: nowrap;
  font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: 0.06em; color: var(--white);
  animation: pb-ticker 24s linear infinite;
}
.ticker-track .star { color: var(--amber); }
@keyframes pb-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Bands ---- */
.band { padding: clamp(64px, 9vw, 120px) 24px; }
.band-paper { background: var(--paper); }
.band-green { background: var(--green); color: var(--white); }
.band-ink { background: var(--ink); color: var(--white); }
.band-inner {
  width: min(1100px, 100%); margin-inline: auto;
  display: flex; align-items: center; gap: clamp(32px, 6vw, 80px);
}
.band-inner.reverse { flex-direction: row-reverse; }
@media (max-width: 800px) { .band-inner, .band-inner.reverse { flex-direction: column; text-align: center; } }
.band-copy { flex: 1 1 0; }
.band-art { flex: 0 0 auto; display: flex; justify-content: center; }
.band h2 {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(34px, 5.5vw, 66px); letter-spacing: -0.03em; line-height: 1.0;
}
.band .lead { margin: 16px 0 0; font-size: clamp(16px, 2vw, 23px); line-height: 1.5; color: var(--muted); max-width: 30ch; }
.band-inner.centered { flex-direction: column; text-align: center; }
.band-green .lead, .band-ink .lead { color: var(--green-tint); max-width: 34ch; margin-inline: auto; }
.band-ink .lead { color: #B8B0A4; }
.band-green h2, .band-ink h2 { color: var(--white); }
@media (max-width: 800px) { .band .lead { margin-inline: auto; } }

/* ---- Price pills ---- */
.pills { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.pill { border-radius: 14px; padding: 18px 26px; text-align: left; }
.pill .num { font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1; }
.pill .lbl { font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.pill-green { background: var(--green); border: 2.5px solid var(--paper); transform: rotate(-4deg); }
.pill-green .num { color: var(--white); } .pill-green .lbl { color: var(--green-tint); }
.pill-amber { background: var(--amber); border: 2.5px solid var(--ink); transform: rotate(3deg); box-shadow: 4px 4px 0 rgba(250,247,242,0.35); }
.pill-amber .num, .pill-amber .lbl { color: var(--ink); }
.pill-paper { background: var(--paper); border: 2.5px solid var(--ink); transform: rotate(-2deg); }
.pill-paper .num, .pill-paper .lbl { color: var(--ink); }

/* ---- Steps (contractors) ---- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: 22px; box-shadow: 4px 4px 0 var(--ink); }
.step .n { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--green); }
.step h3 { margin: 8px 0 6px; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }

/* ---- Example card ---- */
.example {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px; padding: 22px; min-width: 270px; text-align: left;
}
.example .cap { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #c2d9ca; margin-bottom: 10px; }
.example .row { display: flex; justify-content: space-between; gap: 24px; font-size: 14.5px; color: var(--green-tint); padding: 3px 0; }
.example .row.total { color: var(--white); font-weight: 700; border-top: 1px solid rgba(255,255,255,0.2); margin-top: 8px; padding-top: 10px; }

/* ---- Checklist ---- */
.checks { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; text-align: left; }
.checks .c { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; }
.checks .c svg { flex: 0 0 auto; margin-top: 3px; }

/* ---- Final CTA + crane ---- */
.finale { text-align: center; padding: clamp(72px, 10vw, 140px) 24px clamp(64px, 9vw, 120px); background: var(--paper); }
.finale h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(52px, 8vw, 92px); letter-spacing: -0.035em; }
.crane { position: relative; display: inline-flex; flex-direction: column; align-items: center; padding-top: 110px; margin-top: 4px; }
.crane-cable { position: absolute; top: 0; height: 108px; border-left: 3px dashed var(--ink); transform-origin: top center; }

/* ---- Footer ---- */
.footer {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 24px;
  padding: 26px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--white);
}
.footer .brand { font-family: var(--display); font-weight: 800; color: var(--ink); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* ---- Load-in animations ---- */
@keyframes pb-paint { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pb-roll { from { transform: translateX(-52px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pb-screw {
  0% { transform: translateY(-110px) rotate(-170deg); opacity: 0; }
  55% { opacity: 1; }
  80% { transform: translateY(8px) rotate(12deg); }
  100% { transform: none; }
}
@keyframes pb-pop-l { 0% { transform: rotate(6deg) scale(0); } 70% { transform: rotate(6deg) scale(1.18); } 100% { transform: rotate(6deg) scale(1); } }
@keyframes pb-pop-r { 0% { transform: rotate(-5deg) scale(0); } 70% { transform: rotate(-5deg) scale(1.18); } 100% { transform: rotate(-5deg) scale(1); } }
.a-paint { stroke-dasharray: 1; animation: pb-paint 1.3s 0.35s cubic-bezier(.5,0,.3,1) both; }
.a-roller { transform-box: fill-box; animation: pb-roll 1.3s 0.35s cubic-bezier(.5,0,.3,1) both; }
.a-shield { transform-box: fill-box; animation: pb-screw 1.15s 0.55s cubic-bezier(.34,1.3,.64,1) both; }
.a-sticker-l { animation: pb-pop-l 0.6s 1.35s cubic-bezier(.34,1.56,.64,1) both; }
.a-sticker-r { animation: pb-pop-r 0.6s 1.55s cubic-bezier(.34,1.56,.64,1) both; }

/* ---- Scroll-driven animations (progressive enhancement) ---- */
@supports (animation-timeline: view()) {
  @keyframes pb-snap {
    0% { transform: scale(0.5) translateY(80px) rotate(-14deg); opacity: 0; }
    70% { transform: scale(1.1) rotate(2deg); opacity: 1; }
    100% { transform: none; opacity: 1; }
  }
  .s-snap { transform-box: fill-box; transform-origin: center; animation: pb-snap linear both; animation-timeline: view(); animation-range: entry 15% entry 75%; }

  @keyframes pb-fan { 0% { transform: rotate(16deg) translate(30px, 42px); opacity: 0; } 100% { transform: none; opacity: 1; } }
  .s-fan1, .s-fan2, .s-fan3 { transform-box: fill-box; transform-origin: 25% 95%; animation: pb-fan linear both; animation-timeline: view(); }
  .s-fan1 { animation-range: entry 5% entry 45%; }
  .s-fan2 { animation-range: entry 20% entry 60%; }
  .s-fan3 { animation-range: entry 35% entry 80%; }

  @keyframes pb-dial { from { transform: rotate(0deg); } to { transform: rotate(540deg); } }
  .s-dial { transform-box: fill-box; transform-origin: center; animation: pb-dial linear both; animation-timeline: view(); animation-range: entry 0% exit 90%; }

  @keyframes pb-stamp {
    0% { transform: scale(2.3) rotate(-8deg); opacity: 0; }
    55% { transform: scale(0.94) rotate(1deg); opacity: 1; }
    75% { transform: scale(1.04); }
    100% { transform: none; opacity: 1; }
  }
  .s-stamp { transform-box: fill-box; transform-origin: center; animation: pb-stamp linear both; animation-timeline: view(); animation-range: entry 20% entry 70%; }

  @keyframes pb-hat {
    0% { transform: translateY(-170px); opacity: 0; }
    60% { transform: translateY(0) scaleY(1); opacity: 1; }
    75% { transform: translateY(0) scaleY(0.88); }
    100% { transform: none; opacity: 1; }
  }
  .s-hat { transform-box: fill-box; transform-origin: center bottom; animation: pb-hat linear both; animation-timeline: view(); animation-range: entry 10% entry 60%; }

  @keyframes pb-swing-a { 0% { transform: rotate(-46deg); opacity: 0; } 55% { transform: rotate(6deg); opacity: 1; } 80% { transform: rotate(-9deg); } 100% { transform: rotate(-4deg); } }
  @keyframes pb-swing-b { 0% { transform: rotate(-40deg); opacity: 0; } 55% { transform: rotate(12deg); opacity: 1; } 80% { transform: rotate(-1deg); } 100% { transform: rotate(3deg); } }
  @keyframes pb-swing-c { 0% { transform: rotate(-44deg); opacity: 0; } 55% { transform: rotate(8deg); opacity: 1; } 80% { transform: rotate(-7deg); } 100% { transform: rotate(-2deg); } }
  .s-swing-a, .s-swing-b, .s-swing-c { animation: linear both; animation-timeline: view(); transform-origin: top center; }
  .s-swing-a { animation-name: pb-swing-a; animation-range: entry 15% entry 60%; }
  .s-swing-b { animation-name: pb-swing-b; animation-range: entry 25% entry 70%; }
  .s-swing-c { animation-name: pb-swing-c; animation-range: entry 35% entry 80%; }

  @keyframes pb-cable { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes pb-lower { from { transform: translateY(-108px); } to { transform: none; } }
  .s-cable { animation: pb-cable linear both; animation-timeline: view(); animation-range: entry 25% entry 85%; }
  .s-lower { animation: pb-lower linear both; animation-timeline: view(); animation-range: entry 25% entry 85%; }

  @keyframes pb-rise { from { transform: translateY(46px); opacity: 0; } to { transform: none; opacity: 1; } }
  .s-rise { animation: pb-rise linear both; animation-timeline: view(); animation-range: entry 10% entry 55%; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .a-paint, .a-roller, .a-shield, .a-sticker-l, .a-sticker-r,
  .s-snap, .s-fan1, .s-fan2, .s-fan3, .s-dial, .s-stamp, .s-hat,
  .s-swing-a, .s-swing-b, .s-swing-c, .s-cable, .s-lower, .s-rise { animation: none; }
}

/* ---- Legal pages ---- */
.legal { width: min(760px, 100% - 48px); margin-inline: auto; padding: 48px 0 80px; }
.legal h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; }
.legal h2 { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; margin-top: 40px; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: #3d3a34; }
.legal .notice {
  background: #FFF4D6; border: 2px solid var(--amber); border-radius: 12px;
  padding: 18px 22px; font-size: 15px; line-height: 1.55; margin: 24px 0;
}
.legal .statutory {
  background: var(--paper); border-left: 4px solid var(--ink);
  padding: 16px 20px; font-weight: 600; font-size: 15px; line-height: 1.6;
}
.legal table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 14px; font-size: 15px; text-align: left; }
.legal th { background: var(--paper); font-weight: 700; }
