/* Styles for the services pages, on top of site.css. */

:root, [data-theme="dark"] { --warm: #ffd66b; }
[data-theme="light"] { --warm: #7a5600; }

section[id] { scroll-margin-top: 16px; }
.center-title { text-align: center; margin-bottom: 40px; }
.section-title.left { margin-bottom: 32px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section-head .btn { padding: 10px 20px; min-height: 44px; box-sizing: border-box; }

/* ---------- Hero ---------- */
.hero-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

/* ---------- Packages ---------- */
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.package { min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.package > svg { color: var(--accent); }
.package h3 { font-size: 24px; font-weight: 600; }
.package h3 + p { margin: 4px 0 0; color: var(--muted); }
.package .price { margin: 0; font: 600 56px/1 "Space Grotesk", sans-serif; letter-spacing: -0.03em; }
.package .includes { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 20px 0 0 20px; border-top: 1px solid var(--line); }
.package .facts { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.package .facts p { display: flex; align-items: center; gap: 10px; margin: 0; }
.package .facts svg { flex: none; color: var(--accent); }
.package .btn { width: 100%; }

.app-offer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: center; margin-top: 24px; padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.app-offer svg { color: var(--accent); }
.app-offer h3 { margin-top: 12px; font-size: 24px; font-weight: 600; }
.app-offer p { margin: 0; color: var(--muted); }
.app-offer h3 + p { margin-top: 4px; }
.app-offer ul { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding-left: 20px; }
.app-offer-action { display: flex; flex-direction: column; gap: 16px; }
.app-offer .btn { width: 100%; }

.before { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; padding: 28px 32px; border: 1px solid var(--line); border-radius: 24px; }
.before > div { min-width: 0; }
.before .btn { box-sizing: border-box; width: 100%; min-height: 48px; text-align: center; }
.before h3 { margin-bottom: 10px; font-size: 20px; font-weight: 600; }
.before ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; color: var(--muted); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.step { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.step img { display: block; width: 100%; height: auto; aspect-ratio: 1; padding: 16px; box-sizing: border-box; object-fit: contain; background: #fff; border-radius: 12px; }
.step-no { margin: 4px 0 0; font: 500 13px "JetBrains Mono", monospace; color: var(--accent); }
.step-no span { display: none; }
.step h3 { font-size: 20px; font-weight: 600; }
.step p:last-child { margin: 0; color: var(--muted); }

/* ---------- Portfolio cards ---------- */
.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.project-media .shot { display: block; height: auto; aspect-ratio: 16 / 10; }
.project-badge { padding: 2px 10px; border: 1px solid var(--accent); border-radius: 999px; font-size: 13px; }
.project-badge.is-wip { border-color: var(--warm); color: var(--warm); }
.more-tile { min-width: 0; min-height: 200px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--btn-border); border-radius: 16px; }

/* "Want a website like these?" panel: always navy, in both themes */
.cta-panel { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 24px; text-align: center; color: #edeff3; background: #0c1535; border: 1px solid #222f5e; border-radius: 16px; }
.cta-panel img { display: block; width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); }
.cta-panel h3 { font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.cta-panel p { max-width: 380px; margin: 0; color: #b8c3ee; }
.btn-warm { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; color: #0e1014; background: #ffd66b; }

.page-title { padding: 48px 0 56px; font-size: clamp(40px, 4vw, 54px); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
main section.group { padding-bottom: 72px; }
main section.group:last-of-type { padding-bottom: 96px; }

/* ---------- FAQ ---------- */
/* Heading and help card on the left, questions on the right. On narrow screens the card comes after the questions. */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); grid-template-areas: "head list" "help list"; grid-template-rows: auto 1fr; gap: 22px 40px; align-items: start; max-width: 1080px; margin-inline: auto; }
.faq-head { grid-area: head; }
.faq-head h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.faq-list { grid-area: list; display: flex; flex-direction: column; gap: 12px; }
.qa { background: var(--card); border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.25s ease; }
.qa[open] { border-color: var(--accent); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 20px 24px; font-size: 15.5px; font-weight: 600; list-style: none; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
/* The plus sign is two drawn lines, so it sits exactly in the middle and turns into a cross. */
.qa summary::after { content: ""; flex: none; width: 24px; height: 24px; border: 1px solid var(--btn-border); border-radius: 50%; background: linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat; transition: transform 0.25s ease, background-color 0.25s ease; }
.qa[open] summary::after { color: var(--on-accent); background-color: var(--accent); border-color: var(--accent); transform: rotate(45deg); }
.qa :is(p, ul) { margin: 0; padding: 0 24px 22px; font-size: 14.5px; color: var(--muted); }
.qa ul { padding-left: 44px; }
/* Always navy, in both themes. */
.faq-help { grid-area: help; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 24px 24px; text-align: center; color: #edeff3; background: #0c1535; border: 1px solid #222f5e; border-radius: 18px; }
.faq-help img { display: block; width: 100%; max-width: 150px; height: auto; }
.faq-help h3 { font-size: 19px; font-weight: 600; }
.faq-help p { margin: 0; font-size: 14.5px; color: #b8c3ee; }
.faq-help .btn { align-self: stretch; margin-top: 6px; min-height: 44px; padding-block: 11px; font-size: 15px; text-align: center; color: #0e1014; background: #7aa7ff; }

/* ---------- Space between sections ---------- */
main section { padding-bottom: clamp(64px, 7vw, 96px); }
/* The contact band runs straight into the footer. */
main section#contact { padding-bottom: 0; }
footer { margin-top: 0; padding-top: 32px; }

/* ---------- Contact ---------- */
/* Smaller than the shared styles, to match the rest of these pages. */
.contact-info h2 { font-size: clamp(30px, 3.6vw, 44px); }
.contact-info p, .contact-info .email { font-size: 16px; }
.contact-box { gap: 22px; padding-block: clamp(32px, 5vw, 64px); }
.contact-actions { margin-top: 22px; }

/* ---------- Floating button ---------- */
.float-btn { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: #1fa855; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); transition: background-color 0.25s ease, transform 0.2s ease, translate 0.35s ease; }
.float-btn:hover { color: #fff; transform: translateY(-3px); }
.float-btn.is-top { color: #0e1014; background: #7aa7ff; }
.float-btn .float-up, .float-btn.is-top .float-chat { display: none; }
.float-btn.is-top .float-up { display: block; }
/* At the bottom of the page the round button moves up, clear of the name (main.js sets --lift). */
.float-btn.is-top { translate: 0 calc(-1 * var(--lift, 0px)); }

/* ---------- Studio name along the bottom edge, with stickers on it ---------- */
main + footer, footer { padding-bottom: 0; }
.footer-end { --sticker: clamp(62px, 10cqw, 124px); position: relative; width: 100%; container-type: inline-size; padding-top: max(48px, calc(var(--sticker) * 0.55)); }
/* A little more room on phones, so the round button does not sit on the footer links. */
@media (max-width: 760px) { .footer-end { padding-top: 62px; } }
.footer-name { display: block; width: 100%; height: auto; overflow: visible; fill: var(--text); font: 600 112px "Chillax", "Space Grotesk", sans-serif; }
/* Each box ends at the top of the small letters, so a sticker comes up from behind the name. */
.sticker { --size: var(--sticker); position: absolute; left: calc(var(--at) - var(--size) / 2); bottom: 5.8cqw; z-index: 1; width: var(--size); overflow: hidden; line-height: 0; rotate: var(--tilt, 0deg); }
.sticker-tometo { --at: 30.9%; }
.sticker-coffee { --at: 53%; --size: calc(var(--sticker) * 0.94); --tilt: -8deg; --pop: 0.3s; }
.sticker-star { --at: 76%; --size: var(--sticker); --tilt: 9deg; --pop: 0.45s; }
/* The shadow keeps the white edge visible on the light theme. */
.sticker img { display: block; width: 100%; height: auto; padding: 6px; box-sizing: border-box; filter: drop-shadow(0 2px 5px rgb(0 0 0 / 0.28)); }

/* Peeling (lib/stickers.js). --peel is how much of a sticker is lifted, from the side given by --angle. */
@property --peel { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.footer-end .sticker.is-peel { --peel: -20%; --angle: 32deg; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: --peel 0.35s ease, scale 0.25s ease, rotate 0.2s ease; }
.footer-end .sticker-coffee.is-peel { --angle: -32deg; }
/* The star lifts from the left, away from its two little marks. */
.footer-end .sticker-star.is-peel { --angle: -48deg; }
/* Stickers lie flat (a negative --peel). Hover (mouse only, so it does not stay lifted after a tap) lifts a corner.
   Just after pasting it lies flat again, until the mouse leaves. */
@media (hover: hover) {
  .footer-end .sticker.is-peel:hover { --peel: 28%; scale: 1.08; }
  .footer-end .sticker.is-peel.is-stuck:hover { --peel: -20%; scale: 1; }
}
.footer-end .sticker.is-peel.is-held { --peel: 40%; scale: 1.15; cursor: grabbing; }
.footer-end .sticker.is-loose { overflow: visible; }
.sticker :is(.peel, .peel-turn, .peel-front, .peel-lift, .peel-back) { display: block; }
.sticker .peel-turn { position: relative; transform: rotate(var(--angle)); }
.sticker .peel-front { clip-path: polygon(-50% var(--peel), 150% var(--peel), 150% 150%, -50% 150%); }
.sticker .peel-lift { position: absolute; inset: 0; filter: drop-shadow(0 3px 3px rgb(0 0 0 / 0.32)); pointer-events: none; }
.sticker .peel-back { height: 100%; clip-path: polygon(-50% -50%, 150% -50%, 150% var(--peel), -50% var(--peel)); transform-origin: 50% var(--peel); transform: scaleY(-1); }
.sticker.is-peel img { transform: rotate(calc(-1 * var(--angle))); }
.sticker .peel-back img { filter: brightness(0) invert(0.88); }
/* Stickers pop up one after another when the bottom comes into view (main.js), until someone picks one up. */
.footer-end.is-ready .peel { translate: 0 105%; }
.footer-end.is-ready.is-up .peel { translate: 0 0; transition: translate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) var(--pop, 0.15s); }
.footer-end.is-ready .sticker.is-loose .peel { translate: 0 0; }
/* Pressed down after pasting. */
.sticker.is-stuck .peel-turn { animation: sticker-press 0.35s ease; }
@keyframes sticker-press { 45% { scale: 0.92; } }
@media (prefers-reduced-motion: reduce) {
  .footer-end .sticker.is-peel { transition: none; }
  .sticker.is-stuck .peel-turn { animation: none; }
}

/* ---------- Footer contact links, on the right ---------- */
footer .links { margin-left: auto; gap: 8px 24px; }
footer .links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 600; }
footer .links a[hidden] { display: none; }
footer .links a:hover { color: var(--accent); }

/* ---------- Pop-ups ---------- */
.pop { width: min(560px, calc(100% - 24px)); max-height: calc(100% - 32px); padding: 0; overflow-y: auto; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.pop::backdrop { background: rgba(5, 6, 9, 0.84); }
body:has(.pop[open]) { overflow: hidden; }
.pop-body { display: flex; flex-direction: column; gap: 20px; padding: clamp(20px, 5vw, 28px); }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pop-head h2 { font-size: 26px; font-weight: 600; }
.pop-close { flex: 0 0 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text); background: transparent; border: 1px solid var(--btn-border); border-radius: 8px; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.field :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-height: 52px; padding: 12px 16px; font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--btn-border); border-radius: 12px; }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: #e5786f; }
.field-error { margin: -12px 0 0; font-size: 15px; color: #e5786f; }
[data-theme="light"] .field-error { color: #a8261c; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; border: 0; }
.checks legend { margin-bottom: 4px; padding: 0; font-weight: 600; }
.checks label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.checks input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.send-row { display: flex; flex-wrap: wrap; gap: 12px; }
.send-row .btn { flex: 1 1 200px; align-self: stretch; }
.note { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .faq { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "list" "help"; grid-template-rows: none; }
  .packages, .cards, .app-offer { grid-template-columns: minmax(0, 1fr); }
  .cta-panel { padding-block: 32px; }
}
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Phone scroll sections (switched on by main.js) ---------- */
.story-bars, .story-arrow { display: none; }

.story.is-on { height: calc((var(--count) * 70svh) + 100svh); }
.story.is-on .story-stage { position: sticky; top: 0; box-sizing: border-box; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 12px 0; }
.story.is-on .section-title { margin: 0; font-size: 26px; }
.story.is-on .section-head { margin: 0; }
.story.is-on .story-box { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.story.is-on .story-bars { display: flex; gap: 6px; }
.story-bars span { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.story-bars span.on { background: var(--accent); }
.story.is-on .story-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; }
.story.is-on .story-items > * { grid-area: 1 / 1; opacity: 0; pointer-events: none; transform: translateY(24px); transition: opacity 0.35s ease, transform 0.35s ease; }
.story.is-on .story-items > .is-past { transform: translateY(-24px); }
.story.is-on .story-items > .is-current { opacity: 1; pointer-events: auto; transform: none; }
.story.is-on .story-arrow { display: block; align-self: center; color: var(--accent); }
.story.is-on.is-last .story-arrow { visibility: hidden; }

.story.is-on .step { padding: 0; background: transparent; border: 0; }
.story.is-on .step img { aspect-ratio: auto; height: 34svh; }
.story.is-on .step-no span { display: inline; }

.story.is-on .project { background: transparent; border: 0; border-radius: 0; }
.story.is-on .project-media .shot { border-radius: 12px; }
.story.is-on .project-body { padding: 14px 0 0; }
.story.is-on .project-meta { margin-bottom: 8px; }
.story.is-on .project-body h3 { margin-bottom: 8px; font-size: 22px; }
/* Long descriptions are shortened so every project fits on one phone screen. */
.story.is-on .project-body p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; font-size: 15px; }
.story.is-on .tags { margin-bottom: 8px; }
.story.is-on .project-links { padding-top: 12px; }

/* ---------- Page not found ---------- */
.not-found { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 18vh 0 24vh; text-align: center; }
.not-found h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 600; letter-spacing: -0.03em; }
