/* Portfolio, v5: same paper, ink and pink as the homepage (tokens come from styles.css) */
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
.pf section { padding-left: var(--gutter); padding-right: var(--gutter); }

/* reveal: only hidden once the script is known to run */
.js .rise { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .rise { opacity: 1; transform: none; transition: none; } }

/* buttons */
.pf-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 700; text-decoration: none; transition: transform .3s var(--ease), background .3s; }
.pf-btn:hover { transform: translateY(-2px); background: var(--pink); color: #fff; }
.pf-btn-quiet { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.pf-btn-quiet:hover { background: var(--fg); color: var(--bg); }

/* ---------- hero ---------- */
.pf-hero { min-height: 100svh; display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(24px, 4vw, 72px); align-items: end; padding-top: 120px; padding-bottom: 8vh; }
.pf-hero h1 { font-size: clamp(64px, 12.5vw, 220px); line-height: .86; letter-spacing: -.05em; }
.pf-hero h1 .line { display: block; overflow: hidden; padding-bottom: .04em; }
.pf-hero h1 em { font-style: normal; color: var(--pink); }
.js .pf-hero h1 .line { transform: translateY(100%); transition: transform 1.1s var(--ease); }
.js .pf-hero h1 .line + .line { transition-delay: .12s; }
.js .pf-hero.in h1 .line { transform: none; }
.pf-lede { margin-top: clamp(24px, 3vw, 40px); max-width: 34ch; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.4; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.pf-photo { aspect-ratio: 3 / 4; border-radius: 22px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 15px;
  background: repeating-linear-gradient(135deg, rgba(18, 18, 20, .05) 0 2px, transparent 2px 12px), var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- about ---------- */
.pf-about { padding-top: 14vh; padding-bottom: 14vh; border-top: 1px solid var(--line); }
.pf-about p { max-width: 26ch; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4.2vw, 64px); line-height: 1.08; letter-spacing: -.03em; }

/* ---------- work ---------- */
.pf-work { padding-top: 12vh; padding-bottom: 14vh; background: var(--fg); color: var(--bg); }
.pf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 72px); }
.pf-head h2 { font-size: clamp(48px, 8vw, 132px); line-height: .9; letter-spacing: -.045em; }
.pf-head p { max-width: 36ch; color: var(--muted); font-size: 18px; }
.pf-work .pf-head p { color: #A9A7AF; }
.pf-project { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 28px); align-items: start; }
.pf-browser { grid-column: 1 / 10; grid-row: 1; margin: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .7); }
.pf-browser-bar { display: flex; gap: 6px; padding: 12px 14px; background: #E9E6DF; }
.pf-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #C9C5BD; }
.pf-browser img, .pf-phone img { display: block; width: 100%; height: auto; }
.pf-phone { grid-column: 9 / 13; grid-row: 1; margin-top: 18%; aspect-ratio: 9 / 19; overflow-y: auto; border-radius: 34px; border: 10px solid #1d1d22; background: #fff; box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .8); scrollbar-width: none; overscroll-behavior: contain; }
.pf-phone::-webkit-scrollbar { display: none; }
.pf-phone:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
.pf-project-text { grid-column: 1 / 8; grid-row: 2; margin-top: clamp(8px, 2vw, 24px); }
.pf-kind { font-size: 15px; color: #A9A7AF; margin-bottom: 10px; }
.pf-project-text h3 { font-size: clamp(36px, 4.6vw, 72px); letter-spacing: -.04em; margin-bottom: 16px; }
.pf-project-text p { max-width: 46ch; font-size: 18px; }
.pf-project-text .pf-hint { margin-top: 14px; font-size: 15px; color: #A9A7AF; }
.pf-client { margin-top: 14vh; padding-top: 32px; border-top: 1px solid rgba(242, 239, 232, .16); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.pf-client .pf-kind { margin: 0; }
.pf-client-name { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 6vw, 96px); letter-spacing: -.045em; line-height: 1; }

/* ---------- services ---------- */
.pf-services { padding-top: 16vh; padding-bottom: 12vh; }
.pf-services > h2 { font-size: clamp(48px, 8vw, 132px); line-height: .9; letter-spacing: -.045em; margin-bottom: 6vh; }
.pf-list { list-style: none; }
.pf-list li { display: grid; grid-template-columns: 70px 1fr minmax(0, 32ch); gap: 20px; align-items: baseline; padding: clamp(22px, 3vw, 40px) 0; border-top: 1px solid var(--line); transition: color .4s; }
.pf-list li:last-child { border-bottom: 1px solid var(--line); }
.pf-list .n { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pf-list h3 { font-size: clamp(32px, 5vw, 80px); letter-spacing: -.04em; color: var(--dim); transition: color .5s, transform .6s var(--ease); }
.pf-list p { color: var(--muted); }
.pf-list li.active h3, .pf-list li:hover h3 { color: var(--fg); }
.pf-list li.active .n { color: var(--pink); }

/* ---------- chatbots ---------- */
.pf-chat { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; padding-top: 12vh; padding-bottom: 16vh; }
.pf-demo { margin: 0; }
.pf-demo-slot { position: relative; aspect-ratio: 1; border-radius: 28px; background: var(--pink); overflow: hidden; display: grid; place-items: end start; padding: 28px; color: #fff; font-weight: 700; }
.bubble { position: absolute; height: 54px; border-radius: 27px; background: rgba(255, 255, 255, .92); }
.bubble.b1 { left: 10%; top: 14%; width: 52%; border-bottom-left-radius: 6px; }
.bubble.b2 { right: 10%; top: 31%; width: 40%; background: #121214; border-bottom-right-radius: 6px; }
.bubble.b3 { left: 10%; top: 48%; width: 62%; border-bottom-left-radius: 6px; }
.js .pf-demo .bubble { opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .pf-demo.in .bubble { opacity: 1; transform: none; }
.js .pf-demo.in .b2 { transition-delay: .5s; } .js .pf-demo.in .b3 { transition-delay: 1s; }
.pf-chat-text h2 { font-size: clamp(44px, 6.4vw, 104px); line-height: .92; letter-spacing: -.045em; margin-bottom: 24px; }
.pf-chat-text p { font-size: clamp(18px, 1.5vw, 21px); max-width: 38ch; }
.pf-chat-text p + p { margin-top: 10px; }
.pf-chat-text .pf-btn { margin-top: 32px; }

/* ---------- how it works ---------- */
.pf-how { padding-top: 14vh; padding-bottom: 16vh; border-top: 1px solid var(--line); }
.pf-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.pf-steps li { padding: clamp(24px, 3vw, 40px); border-radius: 22px; background: #fff; box-shadow: 0 30px 60px -45px rgba(30, 20, 10, .45); }
.pf-steps b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(72px, 9vw, 140px); line-height: .8; letter-spacing: -.06em; color: var(--pink); margin-bottom: 28px; }
.pf-steps h3 { font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.03em; margin-bottom: 10px; }
.pf-steps p { color: var(--muted); }
.js .pf-steps li:nth-child(2) { transition-delay: .12s; } .js .pf-steps li:nth-child(3) { transition-delay: .24s; }

/* ---------- contact ---------- */
.pf-contact { position: relative; isolation: isolate; overflow: hidden; padding-top: 18vh; padding-bottom: 18vh; border-top: 1px solid var(--line); }
.pf-pixels { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.pf-contact h2 { font-size: clamp(52px, 9vw, 150px); line-height: .92; letter-spacing: -.045em; max-width: 12ch; }
.pf-contact h2 span { color: var(--pink); }
.pf-email { display: inline-block; margin-top: 6vh; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4.4vw, 72px); letter-spacing: -.03em; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat; transition: background-size .6s var(--ease); }
.pf-email:hover, .pf-email:focus-visible { background-size: 100% 3px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .pf-hero { grid-template-columns: 1fr; align-items: start; padding-top: 110px; }
  .pf-photo { max-width: 320px; aspect-ratio: 4 / 3; }
  .pf-browser { grid-column: 1 / 13; }
  .pf-phone { grid-column: 4 / 11; grid-row: 2; margin-top: -18%; }
  .pf-project-text { grid-column: 1 / 13; grid-row: 3; }
  .pf-list li { grid-template-columns: 44px 1fr; }
  .pf-list p { grid-column: 2; }
  .pf-chat { grid-template-columns: 1fr; }
  .pf-steps { grid-template-columns: 1fr; }
}

/* fixes: keep the title inside its column, show the hero at once, fit phones */
.pf-hero > * { min-width: 0; }
.pf-hero h1 { font-size: clamp(52px, 9.2vw, 170px); }
.js .pf-hero.in .rise { opacity: 1; transform: none; }
.js .pf-hero .rise { transition-delay: .35s; }
@media (max-width: 900px) { .pf-hero h1 { font-size: clamp(48px, 15.5vw, 140px); } }
@media (max-width: 520px) { .pf .topbar nav a[href="#how"] { display: none; } }
.pf-hero h1 { font-size: clamp(44px, 7.8vw, 150px); }
@media (max-width: 900px) { .pf-hero h1 { font-size: clamp(40px, 13vw, 120px); } }

/* ---------- the demo chatbot ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pf-demo { border-radius: 28px; background: var(--pink); padding: clamp(14px, 2.4vw, 28px); }
.bot { display: flex; flex-direction: column; height: clamp(460px, 62vh, 600px); border-radius: 20px; background: #fff; box-shadow: 0 30px 60px -30px rgba(80, 0, 30, .55); overflow: hidden; }
.bot-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bot-head b { display: block; font-size: 15px; }
.bot-head small { color: var(--muted); font-size: 13px; }
.bot-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); font-family: var(--display); font-weight: 800; }
.bot-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-line; }
.from-bot { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 6px; }
.from-you { align-self: flex-end; background: var(--fg); color: var(--bg); border-bottom-right-radius: 6px; }
.msg.handover { align-self: center; max-width: 100%; background: transparent; color: var(--pink); font-size: 13px; font-weight: 700; padding: 2px 0; }
.msg.typing { color: var(--muted); }
.bot-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.bot-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; cursor: pointer; transition: border-color .2s, background .2s; }
.bot-chips button:hover, .bot-chips button:focus-visible { border-color: var(--fg); background: var(--bg); }
.bot-form { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.bot-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font-size: 16px; background: var(--bg); }
.bot-form input:focus { outline: none; border-color: var(--fg); }
.bot-form button { border: 0; border-radius: 999px; padding: 0 18px; background: var(--fg); color: var(--bg); font-weight: 700; cursor: pointer; }
.bot-form button:hover { background: var(--pink); color: #fff; }
.pf-note { color: var(--muted); font-size: 16px !important; margin-top: 18px !important; }
