/* Cozy playful: after instalanding.ai's paper-sun-agent-page (MIT), moved from dusk to
   morning. Cream paper, night-navy ink, a dusk ramp of ember, flame, marigold and sky,
   sun-yellow fat pills with a darker bottom edge, torn-paper bands, Bricolage Grotesque.
   Suits cafés, bakeries, ice cream, pet groomers, kids' activities. */

:root[data-theme="cozy-playful"] {
  /* motion below the hero (see base.css) */
  --reveal-y: 20px; --reveal-scale: 0.94; --reveal-ease: cubic-bezier(0.34, 1.56, 0.64, 1); --hero-in: drop; --reveal-in: drop;
  --bg: #fbf3e4;
  --bg-soft: #f6e8cf;
  --surface: #fffaf1;
  --ink: #161a3a;
  --ink-2: #383c5c;
  --muted: #625e78;
  --line: #ebd8b6;
  --accent: #c43d14; /* 4.7:1 on the paper; #d9481f read better but failed small text */
  --primary: #ffd23f;
  --primary-ink: #161a3a;
  --primary-edge: #c98a12;
  --glass: rgb(255 250 241 / 0.85);
  --glass-border: var(--line);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --display-weight: 800;
  --display-tracking: -0.03em;
  --display-leading: 1;

  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 6px 0 var(--line);
  --card-border: 2px solid var(--line);

  --night: #161a3a;
  --tint: 22 26 58; /* the shadows' tint, as rgb channels */
  /* stickers (highlights) and notes (reviews) cycle these; each fill holds its ink at 4.5:1 or better */
  --sticker-1: #c43d14; --sticker-1-ink: #fff;
  --sticker-2: #ffd23f; --sticker-2-ink: var(--ink);
  --sticker-3: #a9dbe8; --sticker-3-ink: var(--ink);
  --sticker-4: #ff8a3c; --sticker-4-ink: var(--ink);
  --note-1: #ffd23f; --note-2: #a9dbe8; --note-3: #ffd2b8; --note-4: var(--surface);
  --slab-bg: var(--night);
  --slab-ink: #fbf3e4;
  --footer-bg: var(--night);
  --footer-ink: #fbf3e4;

  --ph-1: radial-gradient(90% 80% at 30% 30%, #fff1c9, #ffd27a 55%, #f29a1f);
  --ph-2: radial-gradient(90% 80% at 70% 30%, #e3f4f8, #a9dbe8 55%, #6db6cc);
  --ph-3: radial-gradient(90% 80% at 40% 70%, #ffe1d1, #ffab84 55%, #e2552b);
  --ph-4: radial-gradient(90% 80% at 60% 30%, #ece6fb, #c3b4ec 55%, #9c86d6);
  --ph-5: radial-gradient(90% 80% at 30% 40%, #fdf0dc, #f3cf9c 55%, #c98a4a);
  --ph-6: radial-gradient(90% 80% at 60% 60%, #fde3ec, #f6a9c3 55%, #e06c93);

  /* torn edges for the paper bands, tiled along the top and bottom */
  --torn-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V6l12 3 10-6 14 5 12-6 12 5 14-3 12 6 12-5 14 3 12-6 14 5 12-3 14 5 12-6 14 5 14-3 12 4 12-5 12 2v8z'/%3E%3C/svg%3E");
  --torn-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0v8l12-3 10 6 14-5 12 6 12-5 14 3 12-6 12 5 14-3 12 6 14-5 12 3 14-5 12 6 14-5 14 3 12-4 12 5 12-2V0z'/%3E%3C/svg%3E");

  & body {
    background:
      radial-gradient(50% 40% at 85% 0%, rgb(255 210 63 / 0.25), transparent 70%),
      radial-gradient(40% 40% at 0% 30%, rgb(143 198 216 / 0.18), transparent 70%),
      var(--bg);
  }
  & h1, & h2 { font-variation-settings: "opsz" 96; }

  /* fat pills with a darker bottom edge, so they read as pressable */
  & .btn { height: 52px; padding: 0 26px; font-weight: 700; font-size: 16px; }
  & .btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
  & .btn-primary { box-shadow: 0 4px 0 var(--primary-edge); }
  & .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--primary-edge); }
  & .btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-edge); }
  & .btn-ghost { background: var(--surface); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
  & .btn-ghost:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
  & .btn-ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
  & .btn-sm.btn-ghost { box-shadow: 0 3px 0 var(--ink); }

  & .eyebrow { color: var(--accent); font-weight: 600; }
  & .card { border-radius: var(--radius-lg); }
  & .pill { background: #fff3d6; border-color: #f1d59a; color: var(--ink); }

  /* nav: paper strip */
  & .nav { background: rgb(251 243 228 / 0.88); border-bottom: 2px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  & .nav-inner { height: 70px; }
  & .brand-mark { width: 38px; height: 38px; background: var(--primary); color: var(--ink); box-shadow: 0 3px 0 var(--primary-edge); font-size: 18px; font-weight: 800; }
  & .brand-name { font-weight: 800; font-size: 20px; }
  & .nav-menu summary { border: 2px solid var(--ink); background: var(--surface); }

  /* ---------- signature hero ---------- */
  & .cp-hero { padding-block: clamp(32px, 5vw, 72px) clamp(48px, 6vw, 88px); }
  & .cp-grid { display: grid; gap: 40px; align-items: center; }
  & .cp-copy h1 { font-size: clamp(42px, 6.2vw, 88px); max-width: 13ch; }
  & .cp-copy .lead { margin-top: 22px; }
  & .cp-kicker { display: inline-flex; align-items: center; gap: 10px; }
  & .cp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(217 72 31 / 0.18); }
  & .cp-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px; font-size: 15px; color: var(--ink-2); }
  & .cp-checks li { display: flex; align-items: center; gap: 8px; }
  & .cp-checks li::before {
    content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--ink); color: var(--primary); font-size: 12px; font-weight: 700;
  }

  & .cp-scene { position: relative; padding: 0 0 40px 0; }
  & .cp-window {
    position: relative; overflow: hidden;
    aspect-ratio: 5 / 4;
    border: 3px solid var(--ink); border-radius: 36px 36px 36px 120px;
    box-shadow: 10px 12px 0 var(--ink);
    background: #bfe6f2;
  }
  & .cp-window > img, & .cp-land { display: block; width: 100%; height: 100%; object-fit: cover; }
  & .cp-hill { stroke: rgb(255 255 255 / 0.55); stroke-width: 3; }
  & .cp-hill.h3 { filter: drop-shadow(0 -4px 8px rgb(255 154 60 / 0.5)); }

  & .cp-mug {
    position: absolute; right: -6px; bottom: 0; z-index: 2;
    width: clamp(110px, 13vw, 170px); height: auto;
    filter: drop-shadow(0 0 22px rgb(255 210 63 / 0.55));
  }
  & .cp-steam path { opacity: 0.85; }

  & .cp-sticker {
    position: absolute; z-index: 3;
    display: grid; place-content: center; gap: 2px;
    width: clamp(104px, 11vw, 132px); aspect-ratio: 1; padding: 12px;
    border-radius: 50%; border: 3px solid var(--ink);
    text-align: center; text-decoration: none; color: var(--ink);
    box-shadow: 0 5px 0 var(--ink);
    transition: rotate 0.25s ease, scale 0.25s ease;
  }
  & .cp-sticker:hover { scale: 1.06; rotate: 0deg; }
  & .cp-sticker-name { font: 800 15px/1.1 var(--font-display); letter-spacing: -0.01em; }
  & .cp-sticker-price { font-size: 13px; font-weight: 500; }
  & .cp-sticker.k1 { left: -14px; top: 8%; background: var(--primary); rotate: -10deg; }
  & .cp-sticker.k2 { right: 14%; top: -22px; background: #ffb4cb; rotate: 8deg; }
  & .cp-sticker.k3 { left: 20%; bottom: 6px; background: #a9dbe8; rotate: -4deg; }

  @media (min-width: 900px) {
    & .cp-grid { grid-template-columns: 1fr 1.05fr; gap: 56px; }
  }
  @media (max-width: 720px) {
    & .cp-scene { padding-bottom: 28px; margin-inline: 6px; }
    & .cp-window { box-shadow: 6px 8px 0 var(--ink); border-radius: 28px 28px 28px 80px; }
    & .cp-sticker { width: 92px; padding: 8px; }
    & .cp-sticker-name { font-size: 13px; }
    & .cp-sticker-price { font-size: 12px; }
    & .cp-sticker.k1 { left: -6px; }
    & .cp-sticker.k2 { right: 4px; top: -16px; }
    & .cp-sticker.k3 { display: none; }
  }

  /* ---------- sections ---------- */
  /* the highlights strip is a torn band of flame-orange paper */
  & .highlights {
    border: 0; padding-block: 30px;
    background: linear-gradient(90deg, #e2552b, #ff8a3c);
    -webkit-mask: var(--torn-top) top left / 240px 14px repeat-x, linear-gradient(#000 0 0) 0 13px / 100% calc(100% - 26px) no-repeat, var(--torn-bottom) bottom left / 240px 14px repeat-x;
    mask: var(--torn-top) top left / 240px 14px repeat-x, linear-gradient(#000 0 0) 0 13px / 100% calc(100% - 26px) no-repeat, var(--torn-bottom) bottom left / 240px 14px repeat-x;
  }
  & .marquee-track { color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; text-transform: none; }
  & .marquee-track li::after { content: "●"; color: var(--primary); font-size: 12px; }

  /* highlights "stickers": badges slapped on the flame band, each turned a little, edged in white */
  & .highlights-stickers { padding-block: clamp(44px, 5vw, 60px); }
  & .stickers li {
    --s: var(--sticker-1); --s-ink: var(--sticker-1-ink);
    background: var(--s); color: var(--s-ink);
    font: 800 clamp(17px, 1.9vw, 22px)/1.15 var(--font-display); letter-spacing: -0.01em;
    border: 4px solid #fff; border-radius: 24px;
    box-shadow: 0 8px 16px -6px rgb(var(--tint) / 0.45);
  }
  & .stickers li:nth-child(4n + 1) { rotate: -3deg; }
  & .stickers li:nth-child(4n + 2) { --s: var(--sticker-2); --s-ink: var(--sticker-2-ink); rotate: 2deg; }
  & .stickers li:nth-child(4n + 3) { --s: var(--sticker-3); --s-ink: var(--sticker-3-ink); rotate: -1.5deg; }
  & .stickers li:nth-child(4n) { --s: var(--sticker-4); --s-ink: var(--sticker-4-ink); rotate: 3deg; }

  /* services "board": the café's printed menu sheet, torn along the top */
  & .board {
    position: relative; margin-top: 14px;
    padding: clamp(32px, 4vw, 56px) clamp(22px, 4vw, 56px) clamp(8px, 1.5vw, 16px);
    background: var(--surface); border: 2px solid var(--line); border-top: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 8px 0 var(--line);
  }
  & .board::before {
    content: ""; position: absolute; left: -2px; right: -2px; top: -13px; height: 14px;
    background: var(--surface);
    -webkit-mask: var(--torn-top) 0 0 / 240px 14px repeat-x; mask: var(--torn-top) 0 0 / 240px 14px repeat-x;
  }
  & .board-group { margin-bottom: 32px; }
  & .board .group-title {
    margin: 0 0 10px; padding: 0; border: 0; color: var(--accent);
    font: 800 clamp(32px, 3.6vw, 46px)/1 var(--font-display); letter-spacing: var(--display-tracking);
  }
  & .board .row { color: var(--ink); }
  & .board .row-name { font: 700 clamp(19px, 1.8vw, 22px)/1.2 var(--font-display); letter-spacing: -0.01em; }
  & .board .row-price { font: 800 20px/1.2 var(--font-display); }
  & .board .row-desc { margin-top: 3px; font-size: 15px; color: var(--ink-2); }
  & .board .row:hover .row-name { text-decoration: underline wavy var(--primary-edge); text-underline-offset: 5px; }
  & .board .row[data-on] { background: #fff3d6; border-radius: 12px; margin-inline: -10px; padding-inline: 10px; }

  /* about "letter": one column, the first paragraph set large, the figures bigger still */
  & .about-letter .about-copy { max-width: 780px; }
  & .about-letter .about-copy h2 { max-width: 14ch; font-size: clamp(40px, 5.4vw, 72px); }
  & .about-letter .about-copy p:not(.eyebrow) { color: var(--ink); }
  & .about-letter .about-copy h2 + p {
    max-width: 30ch; font: 700 clamp(22px, 2.5vw, 32px)/1.25 var(--font-display); letter-spacing: -0.015em;
  }
  & .about-letter .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 40px; }
  & .about-letter .stat dd { font-size: clamp(40px, 4.6vw, 64px); color: var(--accent); }
  & .about-letter .about-media { aspect-ratio: 16 / 9; max-height: 440px; margin-top: 48px; }

  /* gallery "prints": photo prints with the caption written on the white border */
  & .prints > li { position: relative; }
  & .prints > li:nth-child(4n + 1) { rotate: -3deg; }
  & .prints > li:nth-child(4n + 2) { rotate: 2.5deg; }
  & .prints > li:nth-child(4n + 3) { rotate: -1.5deg; }
  & .prints > li:nth-child(4n) { rotate: 3deg; }
  & .print .gallery-item {
    border: 12px solid #fff; border-bottom-width: 64px; border-radius: 6px;
    box-shadow: 0 14px 24px -10px rgb(var(--tint) / 0.5), 0 0 0 1px var(--line);
  }
  & .print figcaption {
    height: 64px; padding-inline: 22px; overflow: hidden; color: var(--ink);
    font: 700 clamp(16px, 1.6vw, 18px)/1.15 var(--font-display); letter-spacing: -0.01em;
  }
  & .prints .ph-label { display: none; }
  & .prints > li:hover, & .prints > li:focus-within { rotate: 0deg; translate: 0 -10px; scale: 1.04; z-index: 2; }
  @media (min-width: 900px) {
    & .prints > li:nth-child(even) { margin-top: 28px; }
  }

  /* reviews "notes": paper notes pinned up */
  & .notes li {
    padding: 38px 26px 26px; border-radius: 6px 6px 20px 6px;
    background: var(--note); color: var(--ink);
    box-shadow: 0 12px 20px -10px rgb(var(--tint) / 0.45);
  }
  & .notes li:nth-child(4n + 1) { --note: var(--note-1); rotate: -1.5deg; }
  & .notes li:nth-child(4n + 2) { --note: var(--note-2); rotate: 1.2deg; }
  & .notes li:nth-child(4n + 3) { --note: var(--note-3); rotate: -0.8deg; }
  & .notes li:nth-child(4n) { --note: var(--note-4); rotate: 1.6deg; }
  & .notes li::before {
    content: ""; position: absolute; top: -10px; left: 50%; width: 22px; height: 22px; margin-left: -11px;
    border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8a6b, #c43d14 60%, #7d1f08);
    box-shadow: 0 3px 4px rgb(var(--tint) / 0.4);
  }
  & .notes .stars { margin: 0 0 10px; color: var(--ink); letter-spacing: 0.08em; }
  & .notes blockquote p { font: 700 clamp(21px, 2.1vw, 26px)/1.25 var(--font-display); letter-spacing: -0.015em; }
  & .notes .review-author { font: 700 16px/1.2 var(--font-display); }
  & .notes .review-source { font-size: 14px; color: var(--ink-2); }

  & .group-title { border-top: 2px dashed var(--line); font-size: 26px; }
  & .service { padding: 24px; }
  & .service-name { font-size: 24px; }
  & .service-foot { border-top: 2px dashed var(--line); }
  & .index { color: var(--accent); }
  & .price { font-weight: 700; }

  & .about-media, & .gallery-item { border: 3px solid var(--ink); box-shadow: 6px 7px 0 var(--ink); }
  & .about-media { border-radius: 28px 120px 28px 28px; }
  & .gallery-item { border-radius: 24px; }
  & .gallery-item:nth-child(3n + 2) { rotate: 1.5deg; }
  & .gallery-item:nth-child(3n) { rotate: -1.5deg; }
  & .ph-label { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
  & .stat { border-top: 2px dashed var(--line); }
  & .stat dd { font-family: var(--font-display); font-weight: 800; font-size: 34px; }

  & .stars { color: #f29a1f; }
  & .review blockquote { font-size: 18px; }

  /* the pricing slab is a night-blue torn band */
  & .pricing-slab {
    border-radius: 0; padding-block: clamp(56px, 7vw, 88px);
    -webkit-mask: var(--torn-top) top left / 240px 14px repeat-x, linear-gradient(#000 0 0) 0 13px / 100% calc(100% - 26px) no-repeat, var(--torn-bottom) bottom left / 240px 14px repeat-x;
    mask: var(--torn-top) top left / 240px 14px repeat-x, linear-gradient(#000 0 0) 0 13px / 100% calc(100% - 26px) no-repeat, var(--torn-bottom) bottom left / 240px 14px repeat-x;
  }
  & .pricing-slab .eyebrow { color: var(--primary); }
  & .plan { border-radius: 24px; background: rgb(255 255 255 / 0.05); border: 2px solid rgb(255 255 255 / 0.14); }
  & .plan.featured { background: var(--surface); outline: 3px solid var(--primary); outline-offset: 4px; }
  & .plan:not(.featured) .btn-ghost { background: transparent; border-color: #fbf3e4; color: #fbf3e4; box-shadow: 0 4px 0 rgb(255 255 255 / 0.3); }
  & .plan-features li::before { color: var(--primary); }
  & .plan.featured .plan-features li::before { color: var(--accent); }

  & .faq-item, & .faq-item:first-child { border-color: var(--line); border-width: 2px; }
  & .faq-item summary::after {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 3px 0 var(--primary-edge); font-size: 20px;
  }
  & .chips .pill { border-width: 2px; }

  & .visit-card, & .form { border-width: 2px; }
  & .map { border: 3px solid var(--ink); box-shadow: 6px 7px 0 var(--ink); }
  & .field input, & .field textarea { background: #fff; border: 2px solid var(--line); }

  /* footer: night card with a spectrum wordmark sitting on paper hills */
  & .footer-card { border-radius: 36px; padding-bottom: 0; }
  & .footer .btn-primary { margin-top: 8px; }
  & .wordmark {
    display: block; margin: 28px 0 -0.18em;
    font: 800 clamp(60px, 16vw, 220px)/0.9 var(--font-display);
    letter-spacing: -0.05em; white-space: nowrap;
    background: linear-gradient(90deg, #5cc8e0, #9c86d6 30%, #f06292 60%, #ff9a3c 85%, #ffd23f);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    user-select: none;
  }

  & .callbar { background: rgb(251 243 228 / 0.94); border-top: 2px solid var(--line); }

  /* ---------- motion ---------- */
  @media (prefers-reduced-motion: no-preference) {
    &:not([data-motion="none"]) {
      & .prints > li { transition: rotate 0.3s var(--reveal-ease), translate 0.3s var(--reveal-ease), scale 0.3s var(--reveal-ease); }
      & .cp-steam path { animation: cp-steam 3.6s ease-in-out infinite; }
      & .cp-steam .s2 { animation-delay: -1.2s; }
      & .cp-steam .s3 { animation-delay: -2.4s; }
      & .cp-sunrise { animation: cp-rise 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
      & .cp-clouds { animation: cp-drift 18s ease-in-out infinite alternate; }
      & .cp-sticker { animation: cp-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
      & .cp-sticker.k2 { animation-delay: 0.15s; }
      & .cp-sticker.k3 { animation-delay: 0.3s; }
    }
    &[data-motion="showpiece"] .cp-sticker { animation: cp-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both, cp-bob 6s 0.6s ease-in-out infinite; }
  }
}

@keyframes cp-steam {
  0% { opacity: 0; transform: translateY(8px); }
  30% { opacity: 0.85; }
  100% { opacity: 0; transform: translateY(-14px); }
}
@keyframes cp-rise { from { transform: translateY(90px); } to { transform: none; } }
@keyframes cp-drift { to { transform: translateX(24px); } }
@keyframes cp-pop { from { scale: 0.3; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes cp-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
