/* louieandlee.com — card look. Tokens first; every colour and radius below uses them.
   Hover effects live only inside @media (hover: hover); transitions only inside
   @media (prefers-reduced-motion: no-preference). See docs/design-system.md. */

@font-face {
  font-family: "Lilita One"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/LilitaOne-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: Nunito; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/Nunito-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: Nunito; font-weight: 800; font-style: normal; font-display: swap;
  src: url("/assets/fonts/Nunito-800-latin.woff2") format("woff2");
}
@font-face {
  font-family: Nunito; font-weight: 900; font-style: normal; font-display: swap;
  src: url("/assets/fonts/Nunito-900-latin.woff2") format("woff2");
}

:root {
  --sky: #A9DBFF; --ink: #17171C; --tomato: #FF5B3A; --butter: #FFE066;
  --pink: #FF9ACB; --cream: #FFF6E0; --white: #FFFFFF; --dot-sky: #D6EEFF;
  --pistachio: #E0F7CF;
  --r-card: 20px; --r-card-in: 14px; --r-block: 18px; --r-row: 12px;
  --r-photo: 10px; --r-pill: 999px; --r-round: 50%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--sky); color: var(--ink); color-scheme: only light;
  font-family: Nunito, system-ui, sans-serif; font-weight: 700;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 480px; margin: 0 auto; padding: 0 16px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

a { color: inherit; }
img, svg { display: block; flex: none; }

/* Lilita One: the title, headings, big buttons, stickers and offers. Everything else is Nunito. */
h1, h2, .sticker, .watch-label, .row-title, .offers li, .email-btn, .back-name, .bubble {
  font-family: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 400;
}

/* ---------- Page ---------- */
/* The decoration layer spans the whole page, paints behind every block and is the only thing
   that clips. Its inner column lines the clouds and sparkles up with the content column. */
body { position: relative; }
.decor { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.decor-col { position: relative; max-width: 480px; height: 100%; margin: 0 auto; }
.decor svg { position: absolute; stroke: var(--ink); stroke-linejoin: round; }
.cloud, .sparkle-white { fill: var(--white); }
.sparkle-butter { fill: var(--butter); }
.sparkle-pink { fill: var(--pink); }

.wrap { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; padding-top: 16px; padding-bottom: 24px; }

/* The dots: only the photo window uses them. */
.photo-window {
  background-color: var(--dot-sky);
  background-image: radial-gradient(var(--sky) 2px, transparent 2.2px);
  background-size: 12px 12px;
}

/* ---------- Standalone controls: ink border, hard ink shadow, press moves 2px ---------- */
.watch, .row, .logo, .home-pill, .post, .flip {
  --lift: 3px;
  border: 3px solid var(--ink); box-shadow: var(--lift) var(--lift) 0 var(--ink);
  color: var(--ink); text-decoration: none;
}
.watch:active, .row:active, .logo:active, .home-pill:active, .post:active, .flip:active {
  translate: 2px 2px; box-shadow: calc(var(--lift) - 2px) calc(var(--lift) - 2px) 0 var(--ink);
}
@media (hover: hover) {
  .watch:hover, .row:hover, .logo:hover, .home-pill:hover, .post:hover, .flip:hover {
    translate: 2px 2px; box-shadow: calc(var(--lift) - 2px) calc(var(--lift) - 2px) 0 var(--ink);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .watch, .row, .logo, .home-pill, .post, .flip { transition: translate 120ms ease-out, box-shadow 120ms ease-out; }
  .email-btn, .copy { transition: translate 120ms ease-out; }
}

/* ---------- Home: the card ---------- */
/* .card (tilted -2deg) > .card-tilt (the mouse tilt) > .card-inner (turns over) > front and back sides,
   stacked in one grid cell. The frame lives on each side, so the card is exactly as big as before. */
.card {
  align-self: center; width: min(322px, 100%); margin-bottom: 16px; /* 16 + the 16px gap = 32px to Watch */
  rotate: -2deg; perspective: 1400px; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.card.is-live { cursor: pointer; }
.card-tilt { position: relative; perspective: 1400px; }
.card-inner { display: grid; transform-style: preserve-3d; }
.card-side {
  grid-area: 1 / 1; position: relative; display: flex; flex-direction: column;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  padding: 7px; border: 3px solid var(--ink); border-radius: var(--r-card);
  background: linear-gradient(135deg, var(--pink) 0%, var(--butter) 30%, var(--white) 50%, var(--butter) 70%, var(--pink) 100%);
  box-shadow: 7px 7px 0 var(--ink);
}
.card-side > .card-face { flex: 1; }
.card-front { transform: rotateY(0deg); } /* keeps WebKit from showing the front's moving parts through the back */
.card-back { transform: rotateY(180deg); }
.card.is-flipped .card-inner { transform: rotateY(180deg); }
.card-face {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r-card-in);
}
.card h1 {
  /* 34px once the card is full width; below that it scales with the card so it stays one line */
  font-size: min(34px, (100vw - 82px) / 8); line-height: 1.05; text-align: center;
  text-shadow: 3px 3px 0 var(--pink);
}
.photo-window {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 180px; /* 174px inside the border: the fold trim from 190 (spec section 10) */
  border: 3px solid var(--ink); border-radius: var(--r-photo);
}
/* The photo, and while it loads (card.js) the same ring around plain cream */
.photo-window img, .photo-window.is-loading::before {
  box-sizing: content-box; width: 152px; height: 152px;
  border: 7px solid var(--white); border-radius: var(--r-round); box-shadow: 0 0 0 3px var(--ink);
}
.photo-window img { object-fit: cover; }
.photo-window.is-loading::before { content: ""; flex: none; background: var(--cream); }
.sticker {
  position: absolute; padding: 5px 12px 3px; line-height: 1.1;
  border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
/* Tucked in the window's lower-left corner, off the photo; below 354px it shrinks with the card (14px at 320) */
.sticker-mood {
  left: -38px; bottom: -6px; rotate: -4deg; font-size: min(16px, (100vw - 82px) / 17);
  background: var(--tomato); border-radius: var(--r-row);
}
.sticker-real { right: -22px; top: 10px; rotate: 10deg; font-size: 17px; background: var(--butter); border-radius: var(--r-pill); }
/* Taps on the stickers and the bubble land on what is under them. They are stuck on: the shine passes under them */
.sticker, .bubble { z-index: 1; pointer-events: none; }
/* The poke button covers the photo and its white ring; the window's centring places it. */
.poke {
  position: absolute; width: 166px; height: 166px; padding: 0;
  background: transparent; border: 0; border-radius: var(--r-round); cursor: pointer;
}
.bubble {
  position: absolute; left: 6px; top: 8px; padding: 5px 11px 3px; font-size: 16px; line-height: 1.1;
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--r-card-in);
  box-shadow: 3px 3px 0 var(--ink); transform-origin: 80% 100%;
}
.bubble::after { /* the tail, pointing down at Louie */
  content: ""; position: absolute; right: 12px; bottom: -8px; width: 12px; height: 12px;
  background: var(--white); border: solid var(--ink); border-width: 0 3px 3px 0; rotate: 45deg;
}
.tagline { text-align: center; font-weight: 800; font-size: 15px; line-height: 1.3; }
.facts {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 4px; font-size: 14px;
  border-top: 2px dashed var(--ink); padding-top: 9px;
}
.facts dt { font-weight: 900; }
.facts dd { text-align: right; font-weight: 700; }
.card-foot {
  display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 13px;
  border-top: 2px solid var(--ink); padding-top: 7px;
}

/* The back: the dotted window grows to fill the face, so both sides are the same height */
.back-window { height: auto; flex: 1; flex-direction: column; gap: 6px; padding: 10px; text-align: center; }
.back-window svg { stroke: var(--ink); stroke-linejoin: round; }
.back-name { font-size: min(30px, (100vw - 82px) / 9); line-height: 1.05; text-shadow: 3px 3px 0 var(--pink); }
.flip-count { font-weight: 800; font-size: 14px; }

/* The round flip button hangs off the card's lower-right corner, above both sides */
.flip {
  position: absolute; right: 2px; bottom: -24px; z-index: 1; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; background: var(--white); border-radius: var(--r-round); cursor: pointer;
}

/* The shine: a rainbow band that follows the mouse, and a white band that sweeps across on a flip.
   Each band lies over the text and mixes in at 33% at most, so ink on cream, the windows and their dots stays 4.5:1. */
.card-shine {
  position: absolute; inset: 0; border-radius: var(--r-card); pointer-events: none; overflow: hidden;
}
.card-shine::before, .card-shine::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -50%; width: 200%; opacity: 0;
}
.card-shine::before {
  background: linear-gradient(105deg, transparent 25%,
    color-mix(in srgb, var(--pink) 33%, transparent) 36%, color-mix(in srgb, var(--butter) 33%, transparent) 44%,
    color-mix(in srgb, var(--sky) 33%, transparent) 52%, color-mix(in srgb, var(--pistachio) 33%, transparent) 60%,
    transparent 72%);
  translate: calc((var(--shine-x, 50%) - 50%) / 2) 0;
}
.card.is-tilting .card-shine::before { opacity: 1; }
.card-shine::after {
  background: linear-gradient(105deg, transparent 42%, color-mix(in srgb, var(--white) 33%, transparent) 50%, transparent 58%);
}

@media (prefers-reduced-motion: no-preference) {
  .card-inner { transition: transform 0.6s cubic-bezier(.2, .7, .2, 1); }
  .card-tilt { transition: transform 0.4s ease-out; }
  .card.is-tilting .card-tilt {
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition-duration: 0.1s;
  }
  .card-shine::before { transition: opacity 0.3s ease-out; }
  .card.is-poked .photo-window img { animation: card-wiggle 0.5s ease-in-out; }
  .bubble.is-popping { animation: card-pop 0.25s ease-out; }
  .card.is-sweeping .card-shine::after { animation: card-sweep 0.9s ease-out; }
}
/* With reduced motion the card does not turn: the side that turns up fades in instead. Opacity only, on the side
   (opacity on .card-inner would flatten its 3D and show both sides); the flip re-adds is-sweeping, so it replays. */
@media (prefers-reduced-motion: reduce) {
  .card.is-sweeping.is-flipped .card-back,
  .card.is-sweeping:not(.is-flipped) .card-front { animation: card-fade 0.3s ease-out; }
}
@keyframes card-wiggle {
  0%, 100% { rotate: 0deg; } 20% { rotate: -8deg; } 40% { rotate: 7deg; } 60% { rotate: -5deg; } 80% { rotate: 3deg; }
}
@keyframes card-pop { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes card-sweep { from { translate: -50% 0; opacity: 1; } to { translate: 50% 0; opacity: 1; } }
@keyframes card-fade { from { opacity: .3; } to { opacity: 1; } }

/* ---------- Home: Watch, Follow, the brands row ---------- */
.watch {
  --lift: 5px; display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 16px 10px 18px;
  background: var(--butter); border-radius: var(--r-block);
}
.watch-label { flex: 1; font-size: 21px; line-height: 1.1; }
.play circle { fill: var(--white); stroke: var(--ink); }
.play path { fill: var(--ink); }

.follow {
  position: relative; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding: 12px 10px 16px;
  background: var(--pistachio); border: 3px solid var(--ink); border-radius: var(--r-block); box-shadow: 5px 5px 0 var(--ink);
}
.follow h2 { font-size: 20px; text-align: center; }
.logos {
  /* 58 = two 16px gutters + the box's 3px borders + its 10px paddings; 90 = 58 + four 8px gaps.
     46px circles with 8px gaps at 320px, the full 54/12 row from 376px. */
  --logo: clamp(44px, (100vw - 90px) / 5, 54px);
  display: flex; justify-content: center; gap: clamp(8px, (100vw - 58px - 5 * var(--logo)) / 4, 12px);
}
.logo {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: var(--logo); height: var(--logo); background: var(--white); border-radius: var(--r-round);
}
.logo:nth-child(1) { rotate: -6deg; }
.logo:nth-child(2) { rotate: 4deg; }
.logo:nth-child(3) { rotate: -3deg; }
.logo:nth-child(4) { rotate: 7deg; }
.logo:nth-child(5) { rotate: -5deg; }

nav.block { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.row {
  --lift: 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 8px 16px 8px 18px; background: var(--pink); border-radius: var(--r-block);
}
.row-text { display: flex; flex-direction: column; gap: 1px; }
.row-title { font-size: 19px; line-height: 1.1; }
.row-sub { font-size: 14px; }

/* ---------- /work: Home pill, header, intro ---------- */
.page-work .wrap { padding-top: 24px; }
.home-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 6px 18px 6px 12px; background: var(--white); border-radius: var(--r-pill);
  font-weight: 900; font-size: 15px;
}
.profile { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.profile img {
  grid-row: span 2; box-sizing: content-box; width: 70px; height: 70px; object-fit: cover;
  border: 5px solid var(--white); border-radius: var(--r-round);
  box-shadow: 0 0 0 3px var(--ink), 4px 4px 0 3px var(--ink); rotate: -4deg;
}
.profile h1 { align-self: end; font-size: 32px; line-height: 1.05; text-shadow: 3px 3px 0 var(--pink); }
.handle {
  align-self: start; justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; font-weight: 800; font-size: 15px; text-decoration: none;
}
.intro { font-weight: 800; font-size: 16px; line-height: 1.4; }

/* ---------- /work: the media kit, the offers, the email block ---------- */
.kit, .offers, .email { border: 3px solid var(--ink); border-radius: var(--r-block); box-shadow: 5px 5px 0 var(--ink); }
.kit { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; background: var(--cream); }
.kit-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.kit h2, .offers h2 { font-size: 24px; line-height: 1.1; }
.as-of { font-weight: 800; font-size: 13px; }
.stats {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 6px; font-size: 15px;
  border-top: 2px dashed var(--ink); padding-top: 10px;
}
.stats dt { font-weight: 800; }
.stats dd { font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.posts { display: flex; flex-direction: column; gap: 9px; border-top: 2px dashed var(--ink); padding-top: 12px; }
.post {
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px 8px 12px;
  background: var(--white); border-width: 2px; border-radius: var(--r-row);
}
.post-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.post-name { font-weight: 900; font-size: 15px; line-height: 1.2; }
.post-line { font-size: 13px; line-height: 1.3; }
.post-nums {
  display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 13px;
  line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.note { font-size: 13px; line-height: 1.45; }

.offers { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; background: var(--white); }
.offers ul { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 18px; line-height: 1.2; }
.offers li { display: flex; align-items: center; gap: 10px; }
.offers li svg { stroke: var(--ink); stroke-linejoin: round; }
.sparkle-tomato { fill: var(--tomato); }
.rates { margin-top: 2px; font-weight: 800; font-size: 14px; }
.terms {
  display: flex; flex-direction: column; gap: 7px; font-size: 13px; line-height: 1.45;
  border-top: 2px dashed var(--ink); padding-top: 10px;
}

/* The ink button and the Copy button press 1px down; they have no shadow to sink into. */
.email { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--butter); }
.email-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 6px 14px;
  background: var(--ink); color: var(--white); border-radius: var(--r-row); font-size: 21px; text-decoration: none;
}
/* 56px tall with or without the Copy button, so the page doesn't shift when copy.js shows it */
.email-field {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px;
  padding: 4px 4px 4px 12px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--r-row);
}
/* One tap selects the whole address. It breaks only at its <wbr>. */
.email-address { font-weight: 800; font-size: 14px; -webkit-user-select: all; user-select: all; }
.copy {
  flex: none; min-height: 44px; min-width: 64px; padding: 0 12px; background: var(--pink); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-photo); font: inherit; font-weight: 900; font-size: 15px;
  cursor: pointer;
}
.email-btn:active, .copy:active { translate: 0 1px; }
@media (hover: hover) {
  .email-btn:hover, .copy:hover { translate: 0 1px; }
}
/* copy.js's fallback textarea: off screen, and 16px so iOS doesn't zoom when it takes focus */
.copy-buffer { position: fixed; top: 0; left: -9999px; font-size: 16px; }

/* ---------- Footer, every page ---------- */
footer { margin-top: 8px; text-align: center; font-size: 13px; line-height: 1.5; }
footer a { display: inline-flex; align-items: center; min-height: 24px; padding: 0 4px; }

/* ---------- Decoration spots, per page ---------- */
.d-cloud-1 { left: -52px; top: 114px; } /* clear of the photo's poke button */
.d-cloud-2 { right: -8px; top: 316px; }
.d-spark-1 { right: 12px; top: 2px; }
.d-spark-2 { left: 8px; top: 222px; }
.d-spark-3 { right: 5px; top: 384px; }
.d-cloud-3 { right: -16px; top: 18px; }
.d-spark-4 { right: 10px; top: 150px; }
.d-cloud-4 { left: 326px; top: 6px; }   /* 404: past the heading's end; from the left, as the heading is */
.d-spark-5 { left: 14px; bottom: 20px; } /* 404: level with the footer link; bottom, as the page's height varies */
