/* Portfolio sites ("kind": "portfolio"). Loaded after site.css and theme.css, so it reuses the
   theme tokens (--bg, --surface, --fg, --muted, --accent, --accent-soft, --line, --ok, --closed).
   Layout: an editorial page of big serif headlines with italic accents; the hero shows the
   sample sites on a phone, with chips to switch between them.
   Elements marked .js-only are hidden until portfolio.js adds .js to <html>. */

:root { --pf-tint: color-mix(in srgb, var(--accent) 5%, var(--bg)); --pf-shadow: 0 30px 60px -36px color-mix(in srgb, var(--fg) 55%, transparent); }
html:not(.js) .js-only { display: none !important; }

body.pf { padding-bottom: 0; }
.pf h1, .pf h2, .pf h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; }
.pf h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.04; }
.pf h3 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; }
.pf em { font-style: normal; color: var(--accent); }
.pf .eyebrow { color: var(--accent); }
.pf .btn { border-radius: 999px; white-space: nowrap; }
.pf .btn-primary { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.pf .btn-primary:hover { filter: none; background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pf .btn-ghost { color: var(--fg); border-color: var(--line); background: var(--surface); }
.pf .btn-ghost:hover { border-color: var(--fg); background: var(--surface); }
.pf .btn[disabled]:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }

/* Header */
.pf .top .wrap { padding-block: 20px; }
.pf .wordmark { font-size: 1.3rem; }
.pf .nav a { font-size: 0.97rem; }

/* Hero */
.pf-hero { overflow-x: clip; }
.pf-hero .wrap { display: grid; gap: 40px; padding-block: 24px 56px; align-items: center; }
@media (min-width: 900px) { .pf-hero .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; padding-block: 48px 88px; } }
.pf-hero-copy { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.pf-hero h1 { font-size: clamp(2.6rem, 6.8vw, 5.2rem); line-height: 1.02; letter-spacing: -0.015em; max-width: 14ch; }
.pf-hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

.pf-phone-wrap { display: grid; justify-items: center; gap: 18px; position: relative; }
.pf-phone-wrap::before { content: ""; position: absolute; inset: 8% -6% 16%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); }
.pf-phone { margin: 0; width: min(300px, 78vw); max-width: 100%; aspect-ratio: 390 / 780; padding: 10px; border-radius: 46px; background: var(--fg);
  box-shadow: var(--pf-shadow), inset 0 0 0 2px color-mix(in srgb, var(--bg) 18%, var(--fg)); }
.pf-phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--surface); }
.pf-screen[hidden] { display: none; }
.pf-screen { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.js .pf-screen { animation: pf-in 0.35s ease both; }
@keyframes pf-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pf-chip { font: 600 0.85rem var(--font-body); color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; min-height: 40px; padding: 0 14px; cursor: pointer; }
.pf-chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* At-a-glance facts */
.pf-facts { border-block: 1px solid var(--line); }
.pf-facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .pf-facts ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-facts li { display: grid; gap: 6px; align-content: start; padding: 24px 16px 24px 0; }
@media (min-width: 900px) { .pf-facts li + li { border-left: 1px solid var(--line); padding-left: 24px; } }
.pf-facts strong { font: 400 clamp(1.5rem, 3vw, 2rem)/1.1 var(--font-display); letter-spacing: -0.02em; }
.pf-facts span { color: var(--muted); font-size: 0.92rem; }

/* Section shell */
.pf-block .wrap { padding-block: 72px; display: grid; gap: 36px; }
@media (min-width: 900px) { .pf-block .wrap { padding-block: 104px; } }
.pf-tint { background: var(--pf-tint); }
.pf-head { display: grid; gap: 14px; max-width: 760px; }
.pf-head > p { color: var(--muted); font-size: 1.1rem; max-width: 58ch; }
@media (min-width: 900px) { .pf-split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; gap: 64px; } }

/* Services */
.pf-services { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 48px; }
@media (min-width: 760px) { .pf-services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pf-services li { display: grid; gap: 8px; align-content: start; padding-block: 22px; border-top: 1px solid var(--line); }
.pf-services p { color: var(--muted); max-width: 56ch; }

/* Work: alternating rows with a browser frame and a phone */
.pf-work { display: grid; gap: 72px; }
.pf-row { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .pf-row { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 56px; }
  .pf-row:nth-child(even) { grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr); }
  .pf-row:nth-child(even) .pf-visual { order: 2; }
}
.pf-visual { position: relative; display: block; padding: 0 0 28px; max-width: 100%; }
.pf-browser { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--pf-shadow); transition: transform 0.3s ease; }
.pf-visual:hover .pf-browser { transform: translateY(-4px); }
.pf-dots { display: block; height: 26px; border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 16px 50%, var(--line) 4px, transparent 5px), radial-gradient(circle at 32px 50%, var(--line) 4px, transparent 5px), radial-gradient(circle at 48px 50%, var(--line) 4px, transparent 5px); }
.pf-browser img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.pf-mini { position: absolute; right: 4%; bottom: 0; width: 22%; max-width: 150px; height: auto; aspect-ratio: 390 / 780; object-fit: cover; object-position: top;
  border: 5px solid var(--fg); border-radius: 18px; background: var(--surface); box-shadow: var(--pf-shadow); }
.pf-row-copy { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.pf-row-copy h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.pf-row-copy h3 a { color: var(--fg); text-decoration: none; }
.pf-row-copy h3 a:hover { color: var(--accent); }
.pf-row-copy > p:not(.pf-label) { color: var(--muted); }
.pf-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pf-tags li { padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 0.82rem; font-weight: 600; }
.pf-cta { margin-top: 8px; }

/* Process */
.pf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 760px) { .pf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pf-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; } }
.pf-steps li { display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2px solid var(--fg); }
@media (min-width: 1000px) { .pf-steps li { padding-right: 28px; } }
.pf-steps p { color: var(--muted); font-size: 0.97rem; }
.pf-n { font: 400 1.1rem var(--font-display); color: var(--accent); }

/* Pricing (optional): compact "starting at" rows next to the heading, just above contact */
.pf-prices { list-style: none; margin: 0; padding: 0; display: grid; }
.pf-prices > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 24px; row-gap: 6px; padding-block: 22px; border-top: 1px solid var(--line); }
.pf-prices > li:last-child { border-bottom: 1px solid var(--line); }
.pf-prices > li > div { display: contents; }
.pf-prices h3 { grid-column: 1; grid-row: 1; }
.pf-prices > li > div > p { grid-column: 1 / -1; grid-row: 2; color: var(--muted); max-width: 44ch; }
.pf-price { grid-column: 2; grid-row: 1; font: 400 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; margin: 0; }
.pf-prices-wrap { display: grid; gap: 14px; }
.pf-includes { grid-column: 1 / -1; grid-row: 3; margin: 4px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 0.95rem; display: grid; gap: 4px; list-style: disc; }

/* About (optional) */
.pf-about-text { display: grid; gap: 14px; }
.pf-about-text p { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.pf-about-photo { margin: 0; max-width: 420px; }
.pf-about-photo img { display: block; width: 100%; height: auto; border-radius: 18px; }

/* FAQ */
.pf-faq { display: grid; gap: 12px; }
.pf-faq details { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 0 22px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease, opacity 0.7s ease; }
.pf-faq details:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); transform: translateY(-2px); }
.pf-faq details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--pf-shadow); }
.pf-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding-block: 20px; font-weight: 600; font-size: 1.08rem; }
.pf-faq summary::-webkit-details-marker { display: none; }
.pf-q { flex: 1; min-width: 0; }
.pf-q-icon { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); transition: background 0.25s ease, transform 0.3s ease; }
.pf-q-icon::before, .pf-q-icon::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--accent); transition: background 0.25s ease; }
.pf-q-icon::after { transform: rotate(90deg); }
.pf-faq details[open] .pf-q-icon { background: var(--accent); transform: rotate(45deg); }
.pf-faq details[open] .pf-q-icon::before, .pf-faq details[open] .pf-q-icon::after { background: var(--accent-fg); }
.pf-faq details p { padding: 0 0 22px; color: var(--muted); max-width: 64ch; }
.pf-faq details[open] p { animation: pf-rise 0.35s ease both; }
.pf-ask { display: grid; gap: 12px; justify-items: start; margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.pf-ask p { font-weight: 600; color: var(--fg); }
@media (min-width: 900px) { .pf-faq-head { position: sticky; top: 32px; } }

/* Closing contact band: inverted colors */
.pf-close { background: var(--fg); color: var(--bg); --muted: color-mix(in srgb, var(--bg) 78%, var(--fg)); }
.pf-close .wrap { padding-block: 80px; display: grid; gap: 40px; }
@media (min-width: 900px) { .pf-close .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: 112px; align-items: start; } }
.pf-close h2 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); line-height: 1; }
.pf-close em { color: var(--accent-soft); }
.pf-close .head { display: grid; gap: 14px; }
.pf-close .head > p, .pf-close .form-note, .pf-close .req { color: var(--muted); }
.pf-close .ph-tag { color: inherit; }
.pf-close a { color: var(--bg); }
.pf-close .contact-form { max-width: none; padding: clamp(20px, 3vw, 32px); border-radius: 22px; background: var(--bg); color: var(--fg); --muted: color-mix(in srgb, var(--fg) 70%, var(--bg)); }
.pf-close .contact-form .form-note, .pf-close .contact-form .req { color: var(--muted); }
.pf-close .contact-form .btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pf-email { font-size: 1.05rem; }

.pf footer .wrap { padding-block: 32px; }

/* Motion. Load-in for the hero, scroll reveals (classes added by
   portfolio.js, so nothing is hidden without JS), and small hover lifts. All of it is off
   with prefers-reduced-motion. */
@keyframes pf-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.pf-hero-copy > * { animation: pf-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.pf-hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.pf-hero-copy > :nth-child(3) { animation-delay: 0.18s; }
.pf-hero-copy > :nth-child(4) { animation-delay: 0.28s; }
.pf-phone-wrap { animation: pf-rise 1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.pf-hero h1 em { font-style: normal; }
.pf-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--pf-delay, 0ms); }
.pf-reveal.pf-shown { opacity: 1; transform: none; }
.pf-mini { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pf-visual:hover .pf-mini { transform: translateY(-12px) rotate(-3deg); }
.pf .btn span[aria-hidden] { display: inline-block; transition: transform 0.2s ease; }
.pf .btn:hover span[aria-hidden] { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .js .pf-screen, .pf-hero-copy > *, .pf-phone-wrap { animation: none; }
  .pf-reveal { opacity: 1; transform: none; transition: none; }
  .pf-browser, .pf-mini, .pf .btn span[aria-hidden], .pf-faq details, .pf-q-icon { transition: none; }
  .pf-faq details[open] p { animation: none; }
}
@media print { .pf-chips { display: none; } .pf-reveal { opacity: 1 !important; transform: none !important; } .pf-close { background: none; color: inherit; } }

@media (max-width: 560px) {
  .pf .wordmark small { display: none; }
}
