/* My 3D Pet: grape sheets, navy outlines and self-hosted Lilita One lettering.
   Home-page brand colours come from the generated brands.css. */

@font-face { font-family: "Lilita One"; src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #12226e;
  --ink-soft: #3d4b8c;
  --grape: #6b4cf6;
  --sun: #ffd23f;
  --mint: #3ddc97;
  --cream: #fff8ea;
  --card: #fffdf7;
  /* The brands' own */
  --bmp-canvas: #193bb5; --bmp-yellow: #ffce55;
  --pp-sky: #52c4ff; --pp-green: #5fca2c;
  --font: ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Lilita One", var(--font);
  --page: 1180px;
  --gutter: max(16px, calc((100% - var(--page)) / 2));
  --line: 3px solid var(--ink);
  --lift: 0 6px 0 var(--ink);
  --bounce: cubic-bezier(.3, 1.5, .5, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; background: var(--grape); }
body { margin: 0; background: var(--grape); color: var(--ink); font: 600 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; text-wrap: pretty; }
h1, h2, p, ul { margin: 0; padding: 0; border: 0; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }

/* Lettering: white, fat, navy outline and a hard shadow, like a game's title. */
.shout { font-family: var(--display); font-weight: 400; color: #fff; line-height: 1.02; letter-spacing: .005em; text-wrap: balance;
  -webkit-text-stroke: .11em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink); padding-bottom: .08em; }
h1.shout { font-size: clamp(40px, 10vw, 76px); }
h2.shout { font-size: clamp(34px, 8vw, 58px); }
.lead { font-size: 18px; max-width: 34em; }
section { position: relative; padding: 56px var(--gutter) 64px; }
/* Sections are big rounded sheets stacked on each other. */
main > section + section { border-radius: 40px 40px 0 0; margin-top: -36px; }
main > section:first-of-type { border-radius: 40px 40px 0 0; }

/* The logotype: the family paw, then the name in game lettering, "3D" deeper and in sunshine. */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter); min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 48px; }
.logo-paw { width: 56px; height: auto; rotate: -8deg; transition: rotate .3s var(--bounce); }
.logo:hover .logo-paw { rotate: 6deg; }
.logo-word { font: 400 36px/1 var(--display); color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); letter-spacing: .01em; white-space: nowrap; }
.logo-word b { font-weight: 400; color: var(--sun); font-size: 1.12em; margin: 0 .03em;
  text-shadow: 1px 1px 0 var(--ink), 2px 2px 0 var(--ink), 3px 3px 0 var(--ink), 4px 4px 0 var(--ink), 5px 6px 0 var(--ink); }
/* logo-3d.mjs draws the "3D" in three.js over its own letters; they hide once it has drawn. */
.logo-word b { position: relative; display: inline-block; }
.logo-3d { position: absolute; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; }
.logo-word b[data-logo3d="ready"] { color: transparent; -webkit-text-stroke-color: transparent; text-shadow: none; }
.logo-small .logo-word { font-size: 26px; }
.logo-small .logo-paw { width: 42px; }
.bar-links { display: flex; gap: 6px; }
.bar-links a { color: #fff; text-decoration: none; font: 400 18px/1 var(--display); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--ink);
  padding: 10px 10px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
@media (max-width: 599px) {
  .bar { flex-wrap: wrap; justify-content: center; gap: 0; padding-top: 8px; padding-bottom: 8px; }
  .bar-links { justify-content: center; width: 100%; }
  .bar-links a { font-size: 17px; }
  .logo-word { font-size: 28px; }
  .logo-paw { width: 44px; }
}

/* Home: a receipt ribbon, then two free-standing brands in their own lettering. */
body.home .bar { min-height: 80px; }
.statement-banner { padding: 10px var(--gutter); border-bottom: var(--line); background: var(--sun); color: var(--ink); box-shadow: inset 0 2px 0 rgb(255 255 255 / .5), 0 4px 0 rgb(18 34 110 / .16);
  position: relative; z-index: 1; text-align: center; font-size: 16px; font-weight: 700; line-height: 1.5; }
.statement-copy { white-space: nowrap; }
.statement-icon { display: inline-block; width: 26px; height: 26px; margin-right: 6px; vertical-align: -7px; }
.statement-answer { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.statement-banner a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; line-height: 1.5; text-decoration: none; }
.statement-banner a:hover { background: #24378b; }
.statement-banner a:focus-visible { outline-color: var(--ink); }
.home main > section { margin-top: 0; border-radius: 0; }
.brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; padding-top: 64px; padding-bottom: 88px; }
.brand { min-width: 0; display: grid; justify-items: center; align-content: start; text-align: center; text-decoration: none; color: #fff; }
.brand-art { position: relative; isolation: isolate; display: block; width: 320px; max-width: 100%; aspect-ratio: 850 / 621; }
.brand-art::before { content: ""; position: absolute; z-index: -1; inset: -32% -24%; pointer-events: none;
  background: radial-gradient(ellipse, rgb(255 255 255 / .22), rgb(255 255 255 / .08) 38%, transparent 70%); }
.brand-art::after { content: ""; position: absolute; z-index: -1; left: 15%; bottom: -6%; width: 70%; height: 14%; pointer-events: none;
  background: radial-gradient(ellipse, rgb(18 34 110 / .45), transparent 70%); }
.brand-mark { display: block; width: 100%; height: auto; aspect-ratio: 850 / 621; overflow: visible; }
.brand-name { margin-top: 12px; color: #fff; font-size: 56px; line-height: 1.1; white-space: nowrap; }
.brand p { max-width: 30em; min-height: 2lh; margin-top: 8px; font-size: 18px; font-weight: 600; line-height: 1.45; color: #fff; text-wrap: balance; }
/* BuildMyPet's brick geometry and stud mask; the registry supplies its colour. */
.brick-button { --brick-lip: color-mix(in srgb, var(--brand-primary) 70%, #000); --brick-shine: rgb(255 255 255 / .45);
  --stud-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 58 15' preserveAspectRatio='none'%3E%3Cpath d='M7 15V5a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v10z'/%3E%3C/svg%3E");
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; max-width: 100%; margin-top: 20px; padding: 0 26px;
  border: 0; border-radius: 16px; background: var(--brand-primary); color: var(--ink); box-shadow: inset 0 2px 0 var(--brick-shine), 0 5px 0 var(--brick-lip);
  font: 800 18px/1.25 var(--font); letter-spacing: -.01em; transition: background-color .12s, box-shadow .14s, transform .18s var(--bounce); }
.brick-button::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: calc(100% - 1px); height: 7px; pointer-events: none;
  background: linear-gradient(var(--brick-shine) 0 2px, transparent 2px), var(--brand-primary);
  -webkit-mask: var(--stud-shape) 0 0 / 24px 100% space no-repeat; mask: var(--stud-shape) 0 0 / 24px 100% space no-repeat;
  transform-origin: 50% 100%; transition: transform .28s var(--bounce); }
@media (hover: hover) {
  a.brand:hover .brick-button { transform: translateY(-1px); box-shadow: inset 0 2px 0 var(--brick-shine), 0 6px 0 var(--brick-lip); }
  a.brand:hover .brick-button::after { transform: scaleY(1.34); }
}
a.brand:active .brick-button { transform: translateY(3px); box-shadow: inset 0 2px 0 var(--brick-shine), 0 2px 0 var(--brick-lip); transition-duration: .05s; }
a.brand:active .brick-button::after { transform: scaleY(.8); transition-duration: .05s; }
a.brand:focus-visible { outline: none; }
a.brand:focus-visible .brick-button { outline: 3px solid #fff; outline-offset: 7px; }
.brand-soon { display: inline-flex; align-items: center; min-height: 52px; margin-top: 20px; padding: 0 24px; border-radius: 16px; background: rgb(255 255 255 / .16); box-shadow: inset 0 2px 0 rgb(255 255 255 / .22), 0 5px 0 rgb(18 34 110 / .28); color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
@media (max-width: 759px) {
  .brands { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 56px; gap: 40px; }
  .brand-art { width: 220px; }
  .brand-name { font-size: 40px; }
  .brand p { min-height: 0; font-size: 16px; }
}
@media (max-width: 599px) {
  body.home .bar { min-height: 64px; flex-wrap: nowrap; justify-content: space-between; }
  body.home .bar-links { width: auto; }
  body.home .bar-links a { padding-inline: 4px; }
  .statement-banner { padding: 10px 16px; font-size: 15px; }
  .statement-answer { margin-left: 0; }
}
@media (max-width: 359px) {
  body.home .bar { padding-inline: 12px; }
  body.home .bar-links a { font-size: 15px; }
  .statement-copy { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-paw, .brick-button, .brick-button::after { transition: none; }
  a.brand:is(:hover, :active) .brick-button, a.brand:is(:hover, :active) .brick-button::after { transform: none; }
}

/* Loose illustrated explanations on one cream sheet, with no individual cards. */
.home main > .explanations { border-radius: 40px 40px 0 0; }
.explanations { display: grid; gap: 44px; background: var(--cream); padding-top: 48px; padding-bottom: 44px; }
.explanation { display: grid; gap: 10px; align-content: start; justify-items: start; }
.explanation h2 { font: 400 26px/1.1 var(--display); letter-spacing: .01em; }
.explanation p { font-size: 16px; color: var(--ink-soft); max-width: 30em; }
.explanation a { font-weight: 800; text-underline-offset: 4px; }
.explanation .support-address { font-size: clamp(22px, 2vw, 27px); overflow-wrap: anywhere; }
.toy { display: block; width: 84px; height: 84px; overflow: visible; margin-bottom: 6px; }
.family-toy { object-fit: contain; transform: rotate(-8deg); }
@media (min-width: 760px) { .explanations { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }

/* Quiet statement help at the very end of the main content. */
.statement-help { display: grid; justify-items: center; gap: 10px; padding-top: 24px; padding-bottom: 44px; background: var(--cream); text-align: center; }
.statement-help h2 { font-size: 20px; font-weight: 800; }
.statement-help p { max-width: 49em; font-size: 15px; color: var(--ink-soft); }
.statement-help a { font-weight: 800; color: var(--ink); }

/* Only transforms move; all artwork is still when reduced motion is requested. */
@media (prefers-reduced-motion: no-preference) {
  .brand { --paw-offset: 1s; }
  .brand:nth-child(2) { --paw-offset: 3.2s; }
  .brand .toe { animation: toe-tap 4.8s cubic-bezier(.3, 1.5, .5, 1) infinite; animation-delay: calc(var(--paw-offset) + var(--n) * .11s); }
  .brand:is(:hover, :focus-visible, :focus-within, :active) .toe { animation-name: toe-drum; animation-duration: .8s; animation-delay: calc(var(--n) * .11s); }
  .brand:is(:hover, :focus-visible, :focus-within, :active) .brand-mark { animation: mark-bounce .45s ease-out; }
  .explanation:is(:hover, :focus-within, :active) .toy { animation: toy-wiggle .6s ease-in-out; }
  @keyframes toe-tap {
    0%, 9%, 100% { translate: 0 0; }
    3% { translate: var(--tx) var(--ty); }
    6% { translate: calc(var(--tx) * -.2) calc(var(--ty) * -.2); }
  }
  @keyframes toe-drum {
    0%, 60%, 100% { translate: 0 0; }
    20% { translate: var(--tx) var(--ty); }
    40% { translate: calc(var(--tx) * -.2) calc(var(--ty) * -.2); }
  }
  @keyframes mark-bounce { 0%, 100% { translate: 0 0; } 45% { translate: 0 -5px; } }
  @keyframes toy-wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -9deg; } 60% { rotate: 7deg; } }
}

.button { display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; margin-top: 18px; border: var(--line); border-radius: 16px; background: #fff; color: var(--ink);
  font: 400 19px/1 var(--display); letter-spacing: .01em; text-decoration: none; box-shadow: 0 5px 0 var(--ink); }
/* Who we are: small and friendly */
.who { background: var(--cream); display: flex; gap: 16px; align-items: center; padding-top: 48px; padding-bottom: 56px; }
.who-paw { width: 72px; flex: none; rotate: -10deg; }
.who h2 { font: 400 26px/1.1 var(--display); letter-spacing: .01em; margin-bottom: 6px; }
.who p { font-size: 16px; max-width: 46em; color: var(--ink-soft); }
.who a { color: var(--ink); font-weight: 800; }

/* Footer */
.foot { background: var(--ink); color: #e3e7ff; padding: 36px var(--gutter) 44px; display: grid; gap: 16px; }
.foot-top { display: grid; gap: 8px; }
.foot .logo-word { -webkit-text-stroke-color: #000a3a; }
.foot-network { font-weight: 700; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { font-weight: 700; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; color: #fff; }
.foot-small { font-size: 13px; color: #b9c1ef; }

/* Inner pages */
.page-top { display: grid; gap: 14px; padding-top: 16px; color: #fff; }
.page-top .lead { text-shadow: 0 1px 0 rgb(18 34 110 / .35); }
.facts { background: var(--sun); display: grid; gap: 16px; }
.fact { background: var(--card); border: var(--line); border-radius: 26px; padding: 22px; display: grid; gap: 12px; align-content: start; box-shadow: var(--lift); }
.fact h2 { font: 400 26px/1.1 var(--display); letter-spacing: .01em; }
.ticks { display: grid; gap: 10px; }
.ticks li { padding-left: 32px; position: relative; color: var(--ink-soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 50%; background: var(--mint); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: .48em; width: 9px; height: 5px; border: solid var(--ink); border-width: 0 0 3px 3px; rotate: -45deg; }
@media (min-width: 960px) { .facts { grid-template-columns: repeat(3, 1fr); padding-top: 72px; } .page-top { padding-top: 40px; padding-bottom: 72px; } }
.lost { padding: 64px var(--gutter); display: grid; gap: 16px; justify-items: start; color: #fff; }

/* The shared sign-in screen: the family's frame, the calling site's colours. */
.signin-page { --tint: var(--grape); --tint-ink: #fff; --go: var(--sun); --go-ink: var(--ink); --go-lip: var(--ink); background: var(--grape); }
:root:not([data-from="buildmypet"]) .for-bmp, :root[data-from] .for-own, :root:not([data-from]) .for-brand { display: none !important; }
.signin { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px 16px 40px; }
.signin-card { width: min(100%, 420px); background: var(--card); border: var(--line); border-radius: 30px; overflow: hidden; box-shadow: 0 8px 0 var(--ink); }
.signin-top { background: var(--tint); color: var(--tint-ink); padding: 26px 24px 22px; display: grid; justify-items: center; gap: 10px; text-align: center; border-bottom: var(--line); }
.signin-top > img { width: 80px; height: auto; }
.signin-top h1.shout { font-size: 34px; }
.signin-with { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 15px; }
.signin-with img { width: 26px; height: auto; }
.signin-with b { font: 400 17px/1 var(--display); }
.signin-body { display: grid; gap: 12px; padding: 22px; }
.signin-main { min-height: 54px; border-radius: 16px; border: var(--line); background: var(--go); color: var(--go-ink); font: 400 20px/1 var(--display); letter-spacing: .01em; box-shadow: 0 5px 0 var(--ink); margin-bottom: 5px; cursor: pointer; }
.signin-quiet { min-height: 52px; border-radius: 16px; border: var(--line); background: #fff; color: var(--ink); font: 700 16px var(--font); box-shadow: 0 3px 0 var(--ink); cursor: pointer; }
.signin-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 14px; }
.signin-or::before, .signin-or::after { content: ""; height: 2px; background: #e4dccb; }
.signin-field { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.signin-field input { min-height: 52px; border-radius: 16px; border: var(--line); padding: 0 14px; font: 600 17px var(--font); color: var(--ink); background: #fff; }
.signin-family { padding: 0 24px 22px; font-size: 15px; color: var(--ink-soft); text-align: center; }
.signin-where { font-size: 15px; text-align: center; max-width: 30em; color: #fff; text-shadow: 0 1px 0 rgb(18 34 110 / .4); }
.signin-back a { font-weight: 800; display: inline-block; padding: 11px 4px; color: #fff; }

/* Real account forms use the same family sheet, buttons and lettering. */
[hidden] { display: none !important; }
.signin-page .signin { min-height: 68svh; width: 100%; grid-template-columns: minmax(0, 420px); }
.signin-page .signin-card { padding: 0; margin: 0; border-radius: 30px; }
.signin-page .signin-top { grid-template-columns: 64px minmax(0, 1fr); align-items: center; min-height: 150px; }
.signin-top[data-brand] { --tint: var(--brand-canvas); }
.signin-top > img { width: 64px; height: 54px; object-fit: contain; }
.signin-top h1.shout { min-block-size: 3lh; display: grid; align-content: center; overflow-wrap: anywhere; }
.signin-body > *, .auth-options > *, .auth-email > * { min-width: 0; }
.auth-options, .auth-email, #connect-enter, #connect-ask { display: grid; gap: 14px; }
.signin-input { width: 100%; min-height: 52px; border: var(--line); border-radius: 16px; padding: 10px 14px; font: 600 17px var(--font); color: var(--ink); background: #fff; }
.signin-main, .signin-quiet { display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 12px 16px; text-decoration: none; }
.signin-main:disabled, .signin-quiet:disabled { opacity: .65; cursor: wait; }
.quiet-link { display: inline-block; padding: 10px 0; color: var(--ink); font: inherit; font-weight: 800; background: none; border: 0; cursor: pointer; text-decoration: underline; }
.signin-notice, #auth-status { padding: 12px; border: var(--line); border-radius: 16px; background: var(--cream); overflow-wrap: anywhere; }
.signin-notice { border-style: dashed; }
.auth-info, .connect-note { font-size: 15px; }
.connect-code { min-height: 64px; font-size: 30px; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.connect-facts, #account-brands { display: grid; gap: 12px; }
#account-brands { min-height: 116px; }
#account-brands li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#account-brands img { width: 48px; height: 36px; object-fit: contain; }
.foot label { display: grid; gap: 6px; width: min(100%, 240px); }
.foot select { min-height: 44px; font: inherit; border-radius: 12px; padding: 8px; }

.account-shell { min-height: max(68svh, 660px); display: grid; }
.account-shell > .signin-notice { align-self: center; justify-self: center; width: min(calc(100% - 32px), 420px); }

/* A sole listed brand fills the row without an empty partner cell. */
.brands:has(> .brand:only-child) { grid-template-columns: minmax(0, 1fr); }
.brands > .brand:only-child { width: min(100%, 640px); justify-self: center; }
