/* Piggy website. Palette and type mirror PiggyKit/Design (PiggyColors, PiggyFonts). */

@font-face { font-family: "Bagel Fat One"; src: url("fonts/BagelFatOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Signika"; src: url("fonts/Signika-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Signika"; src: url("fonts/Signika-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Signika"; src: url("fonts/Signika-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --cream: #FAF3E4;
  --paper: #FBF7EE;
  --white: #FFFFFF;
  --pink: #F49FB1;
  --pink-soft: #FBD9E2;
  --pink-dark: #E37C94;
  --pink-ink: #C4607A;
  --gold: #F4C64F;
  --gold-dark: #D99E26;
  --grass: #70B464;
  --grass-dark: #5A9A50;
  --sky-top: #75C8F1;
  --sky-bottom: #A6DDF7;
  --ink: #111111;
  --ink-2: #4A4740;
  --ink-3: #7A766D;
  --line: #EEE4D2;
  --card-lip: rgba(0, 0, 0, 0.10);
  --radius: 28px;
  --wrap: 1120px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Signika", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.pink { color: var(--pink-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 0 var(--card-lip); }
.wordmark { font-family: "Bagel Fat One", "Signika", sans-serif; font-size: 30px; line-height: 1; color: var(--white); letter-spacing: 0.01em; text-shadow: 0 2px 0 rgba(0,0,0,0.08); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 17px; color: var(--ink); opacity: 0.85; }
.nav-links a:hover { opacity: 1; }
.nav-links a.appstore { color: #fff; opacity: 1; }
.nav--light .wordmark { color: var(--pink); text-shadow: none; }
.nav--light { position: relative; }

/* ---------- Buttons ---------- */
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 10px 20px 10px 16px; border-radius: 14px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.appstore:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,0.25); }
.appstore:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.25); }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore span { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore small { font-size: 12px; font-weight: 400; opacity: 0.9; }
.appstore b { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.appstore--sm { padding: 7px 14px 7px 12px; border-radius: 11px; }
.appstore--sm svg { width: 18px; height: 18px; }
.appstore--sm b { font-size: 15px; }
.appstore--sm small { display: none; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pink); color: #fff; text-decoration: none; font-family: inherit; font-weight: 700; font-size: 18px;
  padding: 14px 28px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 5px 0 var(--pink-dark);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--pink-dark); }
.pill:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pink-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 70%);
  padding-top: 132px;
  overflow: hidden;
  text-align: center;
}
.hero h1 {
  font-size: clamp(44px, 7.4vw, 88px);
  max-width: 900px; margin: 0 auto;
  color: var(--ink);
}
.hero h1 .outline {
  white-space: nowrap;
  color: var(--white);
  -webkit-text-stroke: 0;
  text-shadow: 0 4px 0 var(--pink-dark), 3px 0 0 var(--pink-dark), -3px 0 0 var(--pink-dark), 0 -3px 0 var(--pink-dark), 3px 3px 0 var(--pink-dark), -3px 3px 0 var(--pink-dark), 3px -3px 0 var(--pink-dark), -3px -3px 0 var(--pink-dark);
}
.hero > .wrap { position: relative; z-index: 2; }
.hero .lede { max-width: 560px; margin: 22px auto 0; font-size: 20px; color: #1E3A4A; }
.hero-cta { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rating { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: #1E3A4A; }
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars img { width: 18px; height: 18px; object-fit: contain; }

.cloud { position: absolute; z-index: 1; pointer-events: none; }
.cloud--a { width: 220px; top: 120px; left: -30px; }
.cloud--b { width: 260px; top: 300px; right: -40px; }
.cloud--c { width: 150px; top: 70px; right: 18%; opacity: 0.9; }

/* Grows with the farm art (width 112vw, aspect 0.3615) so the whole hill always fits. */
.stage { --pw: clamp(300px, 21vw, 420px); position: relative; margin-top: 48px; height: max(560px, calc(40.5vw + 40px)); z-index: 2; overflow: hidden; }
.stage .farm {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: max(1400px, 112vw); max-width: none; z-index: 1;
}
.stage .grass-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: var(--grass); z-index: 0; }
.phone {
  position: absolute; left: 50%; bottom: calc(var(--pw) * -0.37); transform: translateX(-50%);
  width: var(--pw); z-index: 3;
  filter: drop-shadow(0 30px 40px rgba(20, 60, 30, 0.28));
}
/* Pig and coins are placed in multiples of the phone width so they track it. */
.hero-pig { position: absolute; z-index: 4; width: calc(var(--pw) * 0.63); left: calc(50% + var(--pw) * 0.63); bottom: 40px; }
.hero-coin { position: absolute; z-index: 4; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.12)); }
.hero-coin--1 { width: calc(var(--pw) * 0.33); left: calc(50% - var(--pw) * 1.07); bottom: calc(var(--pw) * 1.33); transform: rotate(-16deg); }
.hero-coin--2 { width: calc(var(--pw) * 0.21); left: calc(50% - var(--pw) * 0.77); bottom: calc(var(--pw) * 0.95); transform: rotate(14deg); }
.hero-coin--3 { width: calc(var(--pw) * 0.25); left: calc(50% + var(--pw) * 0.73); bottom: calc(var(--pw) * 1.48); transform: rotate(20deg); }

/* ---------- Grass band (flat colour under the hero, Brainrot style) ---------- */
.band { background: var(--grass); color: #fff; padding: 40px 0 88px; position: relative; z-index: 3; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  background: rgba(255, 255, 255, 0.20);
  border-radius: 26px; padding: 26px 20px 24px; text-align: center;
}
.tile img { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 12px; }
.tile h3 { font-size: 22px; letter-spacing: -0.01em; }
.tile p { margin-top: 6px; font-size: 16px; opacity: 0.92; line-height: 1.4; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 110px 0; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-ink); background: var(--pink-soft); padding: 6px 12px; border-radius: 999px; }
.section-title { font-size: clamp(36px, 5vw, 60px); margin-top: 16px; }
.section-sub { margin-top: 14px; font-size: 20px; color: var(--ink-2); max-width: 620px; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* How it works: alternating rows, each a step from the App Store set */
.steps { margin-top: 64px; display: flex; flex-direction: column; gap: 40px; }
.step {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px;
  background: var(--white); border-radius: 36px; padding: 56px 64px 0;
  box-shadow: 0 5px 0 var(--card-lip);
  overflow: hidden;
}
.step:nth-child(even) .step-copy { order: 2; }
.step-copy { padding-bottom: 56px; }
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--pink-soft); color: var(--pink-ink); font-weight: 700; font-size: 20px;
}
.step h3 { font-size: clamp(34px, 4vw, 52px); margin-top: 18px; }
.step p { margin-top: 14px; font-size: 19px; color: var(--ink-2); max-width: 420px; }
.step-shot { position: relative; display: flex; justify-content: center; align-self: end; }
.step-shot img.shot { width: 300px; margin-bottom: -150px; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.12)); }
.step--pink { background: #FDEDF1; }
.step--yellow { background: #FBF6D6; }
.step--mint { background: #DFF5F3; }
.step--blue { background: #E4F3FC; }

/* Research */
.research { background: var(--paper); }
.quotes { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: var(--white); border-radius: var(--radius); padding: 30px 28px; box-shadow: 0 5px 0 var(--card-lip); display: flex; flex-direction: column; }
.quote-logo { height: 44px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; margin-bottom: 22px; }
.quote h3 { font-size: 20px; letter-spacing: -0.01em; }
.quote blockquote { margin: 14px 0 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.quote cite { display: block; margin-top: 18px; font-style: normal; font-weight: 600; font-size: 14px; color: var(--ink-3); }

/* Reviews */
.reviews { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.review { background: var(--white); border-radius: var(--radius); padding: 26px 24px; box-shadow: 0 5px 0 var(--card-lip); }
.review h3 { font-size: 19px; margin-top: 10px; letter-spacing: -0.01em; }
.review p { margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.review .who { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--ink-3); }

/* FAQ */
.faq { max-width: 780px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--white); border-radius: 22px; box-shadow: 0 4px 0 var(--card-lip); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 64px 22px 26px; font-weight: 700; font-size: 19px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--paper); display: grid; place-items: center;
  font-size: 22px; font-weight: 600; color: var(--ink-2); transition: transform .2s ease;
}
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 26px 24px; color: var(--ink-2); font-size: 17px; }
.faq .answer a { color: var(--pink-ink); }

/* ---------- Footer scene ---------- */
.finale-wrap { background: var(--paper); }
.finale {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
  border-radius: 48px 48px 0 0;
  padding-top: 110px;
}
.finale h2 { font-size: clamp(40px, 6vw, 72px); max-width: 820px; margin: 0 auto; }
.finale .section-sub { color: #1E3A4A; margin-left: auto; margin-right: auto; }
.finale .hero-cta { margin-top: 28px; }
.finale-scene { position: relative; height: 460px; margin-top: 32px; overflow: hidden; }
/* Cover the box and crop the sides, never the top, so the barn always shows. */
.finale-scene .farm { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center top; }
.finale-scene .pig { position: absolute; left: 50%; top: calc(max(460px, 45.5vw) * 0.23 - 40px); transform: translateX(-50%); width: 170px; z-index: 2; }

.footer { background: var(--grass); color: #fff; position: relative; overflow: hidden; padding: 8px 0 32px; }
.footer-cols { display: flex; justify-content: center; gap: 96px; text-align: center; }
.footer-cols h4 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-cols a { text-decoration: none; font-size: 16px; opacity: 0.92; }
.footer-cols a:hover { opacity: 1; text-decoration: underline; }
.copyright { margin-top: 40px; text-align: center; font-size: 14px; opacity: 0.9; }

/* ---------- Doc pages (legal, support) ---------- */
.doc-page { background: var(--cream); }
.doc-head { padding: 40px 0 24px; text-align: center; }
.doc-head h1 { font-size: clamp(38px, 6vw, 60px); }
.doc-head p { margin-top: 10px; color: var(--ink-3); font-size: 16px; }
.doc {
  max-width: 780px; margin: 0 auto 96px; background: var(--white); border-radius: 32px;
  padding: 48px 56px; box-shadow: 0 5px 0 var(--card-lip);
  font-size: 17px; line-height: 1.7; color: #2A2824;
}
.doc h2 { font-size: 24px; margin: 2em 0 0.5em; letter-spacing: -0.01em; color: var(--ink); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 18px; margin: 1.4em 0 0.3em; color: var(--ink); }
.doc p { margin: 0 0 1em; }
.doc ul { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin: 0.35em 0; }
.doc a { color: var(--pink-ink); }
.doc strong { font-weight: 700; color: var(--ink); }
.doc hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.doc .caps { text-transform: none; }
.toc { background: var(--paper); border-radius: 20px; padding: 18px 24px; margin-bottom: 32px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; font-size: 16px; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--pink-ink); }

.footer--doc { padding-top: 48px; }

/* Support */
.contact-card {
  max-width: 780px; margin: 0 auto 20px; background: var(--pink-soft); border-radius: 32px; padding: 36px 40px;
  display: flex; align-items: center; gap: 28px; box-shadow: 0 5px 0 rgba(227, 124, 148, 0.35);
}
.contact-card img { width: 110px; flex: none; }
.contact-card h2 { font-size: 30px; }
.contact-card p { margin-top: 8px; color: var(--ink-2); }
.contact-card .pill { margin-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: 1fr; gap: 32px; padding: 44px 32px 0; text-align: center; }
  .step:nth-child(even) .step-copy { order: 0; }
  .step-copy { padding-bottom: 0; }
  .step p { margin-left: auto; margin-right: auto; }
  .step-shot img.shot { width: 260px; margin-bottom: -120px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .nav .wrap { height: 68px; }
  .nav-links a:not(.appstore) { display: none; }
  .wordmark { font-size: 26px; }
  .brand img { width: 34px; height: 34px; }
  .hero { padding-top: 104px; }
  .hero > .wrap { position: relative; z-index: 2; }
.hero .lede { font-size: 18px; }
  .stage { height: 440px; margin-top: 36px; }
  .stage .farm { width: 1100px; }
  .stage { --pw: 236px; }
  .hero-pig { width: 110px; left: auto; right: 2px; bottom: 20px; }
  .hero-coin--1 { width: 64px; left: 6px; bottom: 336px; }
  .hero-coin--2 { width: 44px; left: 28px; bottom: 206px; }
  .hero-coin--3 { width: 50px; left: auto; right: 14px; bottom: 370px; }
  .cloud--a { width: 120px; top: 64px; left: -40px; opacity: 0.85; }
  .cloud--b { width: 130px; top: 380px; right: -50px; opacity: 0.85; }
  .cloud--c { display: none; }
  .band { padding-bottom: 64px; }
  .tiles { gap: 12px; }
  .tile { padding: 20px 14px; }
  .tile img { width: 56px; height: 56px; }
  .tile h3 { font-size: 19px; }
  .tile p { font-size: 14px; }
  .section { padding: 80px 0; }
  .step { border-radius: 28px; padding: 36px 22px 0; }
  .step-shot img.shot { width: 220px; margin-bottom: -100px; }
  .reviews { grid-template-columns: 1fr; }
  .finale { padding-top: 88px; }
  .finale { border-radius: 32px 32px 0 0; }
  .finale-scene { height: 320px; }
  .finale-scene .pig { width: 110px; top: 50px; }
  .footer-cols { gap: 36px; }
  .doc { padding: 30px 22px; border-radius: 24px; font-size: 16px; }
  .toc ol { columns: 1; }
  .contact-card { flex-direction: column; text-align: center; padding: 30px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Android waitlist ---------- */
.store-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
button.appstore { border: 0; font: inherit; cursor: pointer; }
.appstore--android { background: var(--white); color: var(--ink); box-shadow: 0 4px 0 rgba(0,0,0,0.14); }
.appstore--android:hover { box-shadow: 0 6px 0 rgba(0,0,0,0.14); }
.appstore--android:active { box-shadow: 0 2px 0 rgba(0,0,0,0.14); }
.appstore--android svg { color: #3DDC84; }

.waitlist {
  width: min(440px, calc(100vw - 32px)); padding: 112px 28px 30px; border: 0; border-radius: 32px;
  background: var(--cream); color: var(--ink); text-align: center; overflow: visible;
  box-shadow: 0 6px 0 var(--card-lip), 0 30px 60px rgba(0,0,0,0.25);
}
.waitlist::backdrop { background: rgba(30, 58, 74, 0.45); }
.waitlist-pig { position: absolute; left: 50%; top: -60px; transform: translateX(-50%); width: 120px; }
.waitlist-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--white); color: var(--ink-2); font-size: 24px; line-height: 1; cursor: pointer;
}
.waitlist h2 { font-size: 30px; }
.waitlist p { margin-top: 10px; color: var(--ink-2); font-size: 17px; }
.waitlist-form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.waitlist-form input[type=email] {
  font: inherit; font-size: 18px; padding: 14px 18px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--white); color: var(--ink); outline: none; width: 100%;
}
.waitlist-form input[type=email]:focus { border-color: var(--pink); }
.waitlist-form .pill:disabled { opacity: 0.7; cursor: default; }
.waitlist-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist .waitlist-error { margin: 0; color: #C0392B; font-size: 15px; font-weight: 600; }
.waitlist .waitlist-fine { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.waitlist-fine a { color: var(--pink-ink); }
.waitlist-done .pill { margin-top: 22px; }
