/* 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; }

/* ---------- 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%; }

.before { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 24px; padding: 28px 32px; border: 1px solid var(--line); border-radius: 24px; }
.before > div { flex: 1 1 280px; min-width: 0; }
.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; }
.group { padding-bottom: 96px; }
.group:last-of-type { padding-bottom: 120px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { min-height: 44px; padding: 20px 0; font-weight: 600; cursor: pointer; }
.faq-list p { margin: 0 0 20px; color: var(--muted); }

/* ---------- 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.wide { width: min(640px, calc(100% - 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; }
.terms-part { padding-top: 18px; border-top: 1px solid var(--line); }
.terms-part h3 { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.terms-part ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; color: var(--muted); }

.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) {
  .packages, .cards { 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, .story-more { 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 .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-items > .more-tile { display: 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 + .story-more { display: flex; justify-content: center; margin-top: 24px; }

.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; }
.story.is-on .project-body p { 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; }
