/* Folio. Loaded AFTER stylesheet.css on every page (public pages, admin, project, brief).
   The colour tokens live in scripts/themes.js; the values below are only the first-paint defaults (Sage). */

:root {
  --d-bg: #efede8; --d-bg2: #dfdbd4; --d-ink: #00332b; --d-accent: #00594a; --d-tabB: #a8d5ae; /* the palette's Day colours, always (the brief uses these) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.2 0 0 0 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E");
  --f: "Instrument Sans", system-ui, sans-serif;

  --bg: #efede8; --bg2: #dfdbd4; --deep: #00332b; --text: #00332b;
  --muted: rgba(0, 51, 43, 0.8); --faint: rgba(0, 51, 43, 0.66);
  --accent-text: #00594a; --line: rgba(0, 51, 43, 0.16);
  --tabA: #ffffff; --tabB: #a8d5ae; --tab-text: #00332b;
  /* old names, so the admin / project / brief pages follow the palette too */
  --ink: #00332b; --dim: rgba(0, 51, 43, 0.66); --soft: #dfdbd4; --card: #dfdbd4;
  --scr: rgba(239, 237, 232, 0.8); --pill: #00332b; --pillInk: #efede8;
  --star: #00594a; --w0: #a8d5ae; --w1: #00594a; --w2: #004036; --w3: #00332b; --w4: #00332b;
}
[data-theme="night"] {
  --bg: #00332b; --bg2: #0a4a3e; --deep: #00332b; --text: #f2f6ef;
  --muted: rgba(242, 246, 239, 0.76); --faint: rgba(242, 246, 239, 0.56);
  --accent-text: #96c59e; --line: rgba(242, 246, 239, 0.16);
  --tabA: #d6d1cb; --tabB: #96c59e; --tab-text: #00332b;
  --ink: #f2f6ef; --dim: rgba(242, 246, 239, 0.56); --soft: #0a4a3e; --card: #0a4a3e;
  --scr: rgba(0, 51, 43, 0.8); --pill: #0f4a3f; --pillInk: #f2f6ef;
  --star: #96c59e; --w0: #c4dcc8; --w1: #96c59e; --w2: #4a7a5c; --w3: #00332b; --w4: #0a4a3e;
}

body { background: var(--bg); color: var(--text); font-family: var(--f); letter-spacing: 0; transition: background 0.4s, color 0.4s; }
a:hover { opacity: 0.8; }
::selection { background: var(--tabB); color: var(--tab-text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
em { font-style: italic; }
i.it { font-style: italic; }
.wrap { max-width: 1440px; margin: 0 auto; padding-inline: clamp(20px, 4vw, 56px); }
.label { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; color: var(--faint); }
.pbtn { /* the pill button used in the hero, contact panel and form */
  display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 30px; border-radius: 999px;
  background: var(--tabB); color: var(--tab-text); font-weight: 600; font-size: 17px; letter-spacing: 0.02em; white-space: nowrap;
}

/* ── Nav ───────────────────────────────────── */
.f-brand { display: flex; align-items: center; letter-spacing: 0.02em; text-transform: none; font-size: 22px; line-height: 1; }
.f-brand svg { width: 34px; height: 34px; margin-right: 1px; transform: translateY(-1px); fill: var(--accent-text); }
.f-tog {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); font: 600 13px var(--f); letter-spacing: 0.06em; text-transform: uppercase; transition: border-color 0.3s;
}
.f-tog:hover { border-color: var(--text); }
.f-tog svg { width: 16px; height: 16px; }
.f-tog .t-moon, [data-theme="night"] .f-tog .t-sun { display: none; }
[data-theme="night"] .f-tog .t-moon { display: block; }
.f-tog .t-sun { display: block; }
.f-tog small { font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }
/* hidden admin shortcut: hover the logo for a moment (scripts/common.js) */
.adm-pop { position: absolute; z-index: 20; }

/* ── Hero ──────────────────────────────────── */
.f-tabs { position: relative; height: 320px; margin-top: 24px; overflow: hidden; }
.f-tabs a { position: absolute; right: 0; display: flex; flex-direction: column; }
.f-tabs span { display: flex; align-items: center; justify-content: center; height: 50px; font-weight: 600; font-size: 15px; letter-spacing: 0.06em; color: var(--tab-text); white-space: nowrap; }
.f-tabs i { display: block; height: 90px; }
.f-tabs .t1 { top: 0; left: 54%; --c: var(--tabA); }
.f-tabs .t2 { top: 46px; left: 29%; --c: var(--tabB); }
.f-tabs .t3 { top: 92px; left: 0; --c: var(--tabA); }
.f-tabs .t4 { top: 172px; left: 36%; --c: var(--tabB); }
.f-tabs .t5 { top: 218px; left: 0; --c: var(--bg); color: var(--text); }
.f-tabs .t1 span { width: min(280px, 60%); }
.f-tabs .t2 span { width: min(260px, 100%); }
.f-tabs .t3 span { width: min(280px, 100%); }
.f-tabs .t4 span { width: min(280px, 100%); }
.f-tabs .t5 span { width: min(240px, 100%); color: var(--text); }
.f-tabs span, .f-tabs i { background: var(--c); }
.f-tabs span { border-radius: 20px 20px 0 0; }
.f-tabs .t3 span, .f-tabs .t5 span { border-radius: 0 20px 0 0; }
.f-tabs .t2 i, .f-tabs .t3 i, .f-tabs .t4 i { box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.12); }
.f-tabs .t5 i { box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.18); }
.f-tabs .t1 i { box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06) inset; }
.f-tabs a:hover { opacity: 1; }
.f-tabs a:hover span { filter: brightness(1.04); }

.f-herobody { padding-top: 40px; padding-bottom: 96px; }
.f-hrow { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.f-mark { width: 96px; height: 96px; fill: var(--accent-text); }
.f-tag { text-align: right; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: 0.04em; }
.f-h1 { margin-top: 64px; font-size: clamp(48px, 12vw, 210px); line-height: 0.9; letter-spacing: -0.04em; font-weight: 500; color: var(--accent-text); white-space: nowrap; min-height: 0.9em; }
.f-hfoot { display: flex; flex-wrap: wrap; gap: 28px 64px; justify-content: space-between; align-items: flex-end; margin-top: 48px; }
.f-intro { max-width: 620px; font-size: 22px; line-height: 1.45; color: var(--muted); }

/* ── Sections ──────────────────────────────── */
.f-sec { padding-block: 64px; }
.f-sh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; }
.f-sh h2, .f-h2 { font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.f-sh.rule { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.f-sh.gap { margin-bottom: 40px; }

/* services index */
.f-svc { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.4fr) 40px; gap: 24px; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--line); transition: padding 0.3s; }
.f-svc:hover { opacity: 1; padding-left: 12px; }
.f-svc > :first-child { font-weight: 600; color: var(--faint); }
.f-svc h3 { font-size: clamp(24px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.02em; }
.f-svc p { font-size: 17px; line-height: 1.5; color: var(--muted); }
.f-svc > :last-child { font-size: 22px; color: var(--accent-text); transition: transform 0.3s; }
.f-svc:hover > :last-child { transform: translate(3px, -3px); }

/* projects: text-only folders side by side (a tab on top, a body underneath) */
.f-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 40px 24px; }
.f-empty { color: var(--muted); }
.fcard { --c: var(--tabA); display: flex; flex-direction: column; min-width: 0; }
.fcard:nth-child(even) { --c: var(--tabB); }
.fc-tab { align-self: flex-start; display: flex; align-items: center; height: 44px; padding: 0 24px; max-width: 100%; border-radius: 18px 18px 0 0; background: var(--c); color: var(--tab-text); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-body { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 400px; padding: 32px; border-radius: 0 22px 22px 22px; background: var(--c); color: var(--tab-text); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fcard:hover .fc-body { transform: translateY(-4px); }
.fc-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.fc-text h3 { margin-bottom: 10px; font-size: clamp(36px, 3.6vw, 52px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; overflow-wrap: anywhere; }
.fc-text h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* the whole folder opens the project page */
.fc-text p { font-size: 17px; line-height: 1.5; }
.fc-acts { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; font-weight: 600; }
.fc-view b { display: inline-block; transition: transform 0.3s; }
.fcard:hover .fc-view b { transform: translateX(5px); }
.fc-live { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--deep); color: #f2f6ef; font-size: 15px; }
@media (max-width: 720px) { .fc-body { min-height: 300px; padding: 24px; } }
@media (hover: none) { .fcard:hover .fc-body { transform: none; } }

/* filter pills above the grid */

/* clients: small folders in a row */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.ccard { gap: 12px; padding: 20px 24px 24px; border-radius: 0 20px 20px 20px; background: var(--bg2); border: 0; position: relative; margin-top: 30px; }
.ccard::before { content: ""; position: absolute; left: 0; top: -30px; width: 96px; height: 30px; border-radius: 14px 14px 0 0; background: var(--bg2); }
.ccard .mark { background: var(--bg); border-color: transparent; color: var(--accent-text); border-radius: 14px; width: 56px; height: 56px; font-weight: 600; }
.ccard b { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; text-transform: none; }
.ccard p { color: var(--muted); }
a.ccard:hover { transform: translateY(-4px); border-color: transparent; opacity: 1; }

/* about */
.f-about { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 96px; padding-block: 96px; }
.f-big { font-size: clamp(28px, 3vw, 44px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.f-big i { font-style: italic; color: var(--accent-text); }
.f-sub { margin-top: 28px; max-width: 640px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.stack { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.chip { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; transition: color 0.25s, border-color 0.25s; }
.chip:hover, .chip:focus-visible { color: var(--text); border-color: var(--text); }
.chip .ico { width: 16px; height: 16px; background: var(--c, currentColor); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }

/* reviews: folder cards with a tab */
.rgrid { gap: 40px 20px; }
.rcard { position: relative; margin-top: 30px; padding: 28px; border-radius: 0 22px 22px 22px; background: var(--tabA); color: var(--tab-text); border: 0; }
.rcard::before { content: ""; position: absolute; left: 0; top: -30px; width: 110px; height: 30px; border-radius: 14px 14px 0 0; background: inherit; }
.rcard:nth-child(even) { background: var(--tabB); }
.rcard:hover { transform: translateY(-4px); border-color: transparent; }
.rstars { color: var(--tab-text); }
.rcard figcaption span { color: inherit; opacity: 0.7; }
.rbtn { border-color: var(--line); color: var(--text); }
.rbtn:hover { border-color: var(--text); }
.rbtn b { color: var(--accent-text); }
.rform { background: var(--bg2); border: 0; border-radius: 0 24px 24px 24px; }

/* contact panel + footer */
.f-contact { color: var(--tab-text); margin-top: 32px; }
.f-ctab { display: inline-flex; align-items: center; height: 44px; padding: 0 28px; border-radius: 18px 18px 0 0; background: var(--tabB); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; }
.f-cbody { margin-top: -1px; background: var(--tabB); border-radius: 36px 36px 0 0; }
.f-contact > .wrap { padding-bottom: 0; }
.f-cbody .wrap { padding-top: 56px; padding-bottom: 28px; }
.f-contact h2 { font-size: clamp(44px, 7vw, 112px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 500; }
.f-crow { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; margin-top: 32px; }
.f-mail { font-size: clamp(22px, 3vw, 40px); font-weight: 500; border-bottom: 2px solid currentColor; overflow-wrap: anywhere; }
.f-contact .pbtn { background: var(--deep); color: #f2f6ef; }
.f-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(0, 0, 0, 0.18); font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.f-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
/* the signature pill sits on the accent panel: give it the dark-on-light variables */
.f-contact { --ink: var(--tab-text); --dim: color-mix(in srgb, var(--tab-text) 66%, transparent); --line: rgba(0, 0, 0, 0.2); --bg: var(--tabB); --pill: rgba(0, 0, 0, 0.1); --pillInk: var(--tab-text); --w1: var(--tab-text); }
.f-contact .dev { text-transform: none; letter-spacing: 0; }

/* ── Contact page ──────────────────────────── */
.f-cpage { padding-block: 40px 96px; }
.f-cgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 6vw; align-items: start; }
.f-cpage h1 { margin-top: 20px; font-size: clamp(64px, 10vw, 170px); line-height: 0.92; letter-spacing: -0.045em; font-weight: 500; }
.f-cpage h1 i { font-style: italic; color: var(--accent-text); }
.f-lead { max-width: 34ch; margin-top: 34px; color: var(--muted); font-size: clamp(17px, 1.4vw, 21px); line-height: 1.5; }
.f-cpage .cinfo { color: var(--text); }
.f-cpage .cinfo svg { color: var(--accent-text); }
.f-cpage .cinfo a { border-color: var(--text); }
.f-cpage .cform { background: var(--tabA); color: var(--tab-text); border: 0; border-radius: 0 28px 28px 28px; margin-top: 44px; position: relative; }
.f-cpage .cform::before { content: "( MESSAGE )"; position: absolute; left: 0; top: -44px; height: 44px; padding: 0 24px; display: flex; align-items: center; border-radius: 18px 18px 0 0; background: var(--tabA); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; }
.cform { --ink: var(--tab-text); --dim: color-mix(in srgb, var(--tab-text) 66%, transparent); --line: rgba(0, 0, 0, 0.18); --pill: var(--tab-text); --pillInk: #fff; --bg: var(--tabA); --w1: #b3261e; }
.f-cpage .cform .submit, [data-theme="night"] .f-cpage .cform .submit { background: var(--deep); color: #f2f6ef; }
.rform.cform { --bg: var(--bg2); background: var(--bg2); color: var(--text); --ink: var(--text); --dim: var(--faint); --line: var(--line); --pill: var(--text); --pillInk: var(--bg); }
.rform.cform .submit, [data-theme="night"] .rform.cform .submit { background: var(--text); color: var(--bg); }
@media (max-width: 860px) { .f-cgrid { grid-template-columns: 1fr; } }

/* ── 404 ───────────────────────────────────── */
.f-404 { padding-block: 40px 120px; }
.f-404 .big404 { font-size: clamp(120px, 30vw, 460px); line-height: 0.85; letter-spacing: -0.06em; font-weight: 500; color: var(--accent-text); margin-top: 40px; }
.f-404 h1 { font-size: clamp(36px, 5vw, 72px); letter-spacing: -0.03em; font-weight: 500; line-height: 1.05; }
.f-404 p { margin: 20px 0 32px; max-width: 44ch; font-size: 20px; color: var(--muted); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 720px) {
  .f-tabs { height: 250px; }
  .f-tabs span { height: 40px; font-size: 12px; letter-spacing: 0.04em; }
  .f-tabs i { height: 70px; }
  .f-tabs .t1 { top: 0; left: 46%; } .f-tabs .t2 { top: 34px; left: 22%; } .f-tabs .t3 { top: 68px; left: 0; }
  .f-tabs .t4 { top: 124px; left: 28%; } .f-tabs .t5 { top: 158px; left: 0; }
  .f-tabs .t1 span, .f-tabs .t2 span, .f-tabs .t3 span, .f-tabs .t4 span, .f-tabs .t5 span { width: min(190px, 100%); border-radius: 16px 16px 0 0; }
  .f-tabs .t3 span, .f-tabs .t5 span { border-radius: 0 16px 0 0; }
  .f-herobody { padding-top: 28px; padding-bottom: 64px; }
  .f-mark { width: 72px; height: 72px; }
  .f-tag { font-size: 15px; }
  .f-h1 { margin-top: 40px; }
  .f-intro { font-size: 18px; }
  .pbtn { height: 54px; padding: 0 24px; font-size: 16px; }
  .f-sec { padding-block: 44px; }
  .f-svc { grid-template-columns: 36px minmax(0, 1fr) 24px; grid-template-areas: "n t a" ". d ."; gap: 8px 14px; padding: 24px 0; }
  .f-svc > :nth-child(1) { grid-area: n; }
  .f-svc > :nth-child(2) { grid-area: t; }
  .f-svc > :nth-child(3) { grid-area: d; font-size: 16px; }
  .f-svc > :nth-child(4) { grid-area: a; text-align: right; }
  .fc-body { min-height: 300px; padding: 24px; }
  .f-about { padding-block: 56px; gap: 24px; }
  .f-cbody { border-radius: 26px 26px 0 0; }
  .f-cbody .wrap { padding-top: 36px; }
  .f-foot { margin-top: 32px; }
  .f-foot nav { display: none; } /* on a phone the signature pill takes the place of the social links + back to top */
  .f-crow { margin-top: 24px; }
}
@media (hover: none) { .fcard:hover .fc-body { transform: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.cinfo li[hidden] { display: none; }

.fcard[hidden] { display: none; }
.fc-tab { margin-bottom: -1px; position: relative; z-index: 1; }

/* ══ Motion (everything below only runs when <html class="mo"> is set by theme.js: i.e. not for reduced motion) ══ */
@keyframes rise { from { opacity: 0; transform: translateY(46px); filter: blur(10px); } }
@keyframes tabin { from { transform: translateY(108%); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { transform: translateX(-50%); } }

/* scroll reveal (scripts/motion.js adds .rv, then .in as it enters the screen) */
.mo .rv { opacity: 0; transform: translateY(36px); transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0ms); }
.mo .rv.in { opacity: 1; transform: none; }

/* page load */
.mo .f-nav { animation: fadein 0.8s backwards; }
.mo .f-tabs a { animation: tabin 0.95s cubic-bezier(0.34, 1.3, 0.5, 1) backwards; animation-delay: calc(var(--k, 0) * 110ms + 100ms); transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.5, 1); }
.f-tabs .t1 { --k: 0; } .f-tabs .t2 { --k: 1; } .f-tabs .t3 { --k: 2; } .f-tabs .t4 { --k: 3; } .f-tabs .t5 { --k: 4; }
.mo .f-tabs a:not(.t1):hover { transform: translateY(-12px); }
.mo .f-hrow { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s backwards; }
.mo .f-h1 { animation: rise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s backwards; }
.mo .f-hfoot { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.85s backwards; }
.mo .f-cpage h1, .mo .f-404 .big404 { animation: none; }

/* hero logo: the faded copy keeps turning, the whole mark also turns as you scroll */
.mo .f-mark { transform: rotate(calc(var(--sy, 0) * 0.14deg)); transition: transform 0.2s linear; }
.mo .bloom { transform-box: view-box; transform-origin: 200px 200px; animation: spin 34s linear infinite; }
.f-brand svg { transition: transform 0.5s cubic-bezier(0.34, 1.6, 0.5, 1); }
.f-brand:hover svg { transform: translateY(-1px) rotate(-24deg) scale(1.12); }
/* every so often the logo does a quick spin with a pop (uses rotate/scale, so the hover tilt above still stacks on top) */
@keyframes logo-spin { 0%, 88%, 100% { rotate: 0deg; scale: 1; } 94% { rotate: 200deg; scale: 1.18; } 98% { rotate: 360deg; scale: 1; } }
.mo .f-brand svg { animation: logo-spin 9s ease-in-out 3s infinite; }

/* scroll progress line */
.f-prog { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 3px; background: var(--accent-text); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* services: a tinted band sweeps up behind the row, the arrow flies out */
.f-svc { position: relative; isolation: isolate; }
.f-svc::before { content: ""; position: absolute; z-index: -1; inset: 0 -14px; border-radius: 14px; background: var(--bg2); transform: scaleY(0); transform-origin: bottom; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.f-svc:hover::before { transform: scaleY(1); }
.f-svc > :last-child { transition: transform 0.35s cubic-bezier(0.34, 1.5, 0.5, 1); }
.f-svc:hover > :last-child { transform: translate(6px, -6px) rotate(8deg) scale(1.2); }

/* project folders: the tab lifts, the cursor leaves a soft light on the folder, the name slides */
.fc-tab { transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1); }
.fcard:hover .fc-tab { transform: translateY(-5px); }
.fc-body::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.5), transparent 60%); transition: opacity 0.35s; mix-blend-mode: soft-light; }
.fcard:hover .fc-body::after { opacity: 1; }
.fc-text h3 { transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fcard:hover .fc-text h3 { transform: translateX(6px); }

/* clients + reviews */
.ccard, .rcard { transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.5, 1); }
.rcard:hover, a.ccard:hover { transform: translateY(-6px) rotate(-0.6deg); }
.rstars { display: inline-block; transition: transform 0.4s cubic-bezier(0.34, 1.6, 0.5, 1); }
.rcard:hover .rstars { transform: scale(1.12); transform-origin: left; }

/* about paragraph: words light up as you scroll */
.mo .f-big .w { opacity: 0.22; transition: opacity 0.5s; }
.mo .f-big .w.on { opacity: 1; }

/* buttons and links */
.pbtn { transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1), filter 0.3s; }
.pbtn:hover { transform: scale(1.04); filter: brightness(1.06); opacity: 1; }
.pbtn svg { transition: transform 0.35s cubic-bezier(0.34, 1.6, 0.5, 1); }
.pbtn:hover svg { transform: translateX(6px); }
.f-foot nav a { background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat; transition: background-size 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); padding-bottom: 3px; }
.f-foot nav a:hover { background-size: 100% 1.5px; opacity: 1; }
.f-mail { border: 0; padding-bottom: 4px; background: linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat; transition: background-size 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.f-mail:hover { background-size: 0 2px; background-position: right bottom; opacity: 1; }
.f-contact h2 i { display: inline-block; transition: transform 0.5s cubic-bezier(0.34, 1.6, 0.5, 1); }
.f-contact h2:hover i { transform: rotate(-3deg) translateY(-4px); }
.rbtn b { display: inline-block; transition: transform 0.5s cubic-bezier(0.34, 1.6, 0.5, 1); }
.rbtn:hover b { transform: rotate(180deg) scale(1.2); }

@media (prefers-reduced-motion: reduce) {
  .bloom { animation: none !important; }
}

/* page-corner peel between the hero and Services: the corner lifts as it scrolls into view, a little more on hover */
.f-peel { --hv: 0px; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; height: clamp(150px, 16vw, 220px); margin: 8px clamp(20px, 4vw, 56px) 24px; padding: 22px clamp(20px, 3vw, 36px); background: var(--tabA); color: var(--tab-text); border-radius: 18px 18px 0 18px; overflow: visible; }
.f-peel:hover { --hv: 64px; opacity: 1; }
.f-peel .label { color: inherit; opacity: 0.7; }
.f-peel-big { font-size: clamp(44px, 7vw, 104px); font-weight: 500; letter-spacing: -0.045em; line-height: 0.9; }
.f-peel-big i { color: var(--deep); }
.f-peel::before, .f-peel::after { content: ""; position: absolute; right: 0; bottom: 0; width: calc(var(--cs, 56px) + var(--hv)); height: calc(var(--cs, 56px) + var(--hv)); transition: width 0.45s cubic-bezier(0.34, 1.3, 0.5, 1), height 0.45s cubic-bezier(0.34, 1.3, 0.5, 1); pointer-events: none; }
/* the bottom-right triangle is gone (the page behind shows), the top-left one is the folded-back underside */
.f-peel::before { background: linear-gradient(135deg, transparent 50%, var(--bg) 50.5%); }
.f-peel::after { background: linear-gradient(135deg, color-mix(in srgb, var(--tabB) 60%, #fff) 0, var(--tabB) 49.5%, transparent 50%); filter: drop-shadow(-3px -3px 5px rgba(0, 0, 0, 0.28)); }
@media (max-width: 720px) { .f-peel { height: 130px; } }

/* project folders: a faint embedded texture on the body (not the tab): fine film grain + a soft light/shadow wash,
   a different wash on each folder, like grainy gradient posters. Everything is low-alpha so the text stays readable. */
.fc-body {
  isolation: isolate; overflow: hidden;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.2 0 0 0 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E");
  --wash: linear-gradient(105deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 40%), linear-gradient(285deg, rgba(0, 0, 0, 0.07) 0%, transparent 46%);
  background: var(--grain), var(--wash), var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -22px 44px -26px rgba(0, 0, 0, 0.13);
}
.fcard:nth-child(3n + 2) .fc-body { --wash: radial-gradient(circle at 90% 6%, rgba(255, 255, 255, 0.36) 0, rgba(255, 255, 255, 0.12) 30%, transparent 56%), radial-gradient(circle at 0% 100%, rgba(0, 0, 0, 0.08), transparent 56%); }
.fcard:nth-child(3n) .fc-body { --wash: linear-gradient(160deg, rgba(255, 255, 255, 0.28), transparent 52%), radial-gradient(120% 90% at 100% 100%, rgba(0, 0, 0, 0.08), transparent 62%); }

/* ══ Skills: big names, and a folder card for whichever one you point at ═════════════════════════════════════ */
.f-sk { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 40px clamp(32px, 6vw, 96px); align-items: start; }
.sk-list { font-size: clamp(38px, 5.4vw, 80px); line-height: 1.12; letter-spacing: -0.04em; font-weight: 500; }
.sk { all: unset; cursor: pointer; color: color-mix(in srgb, var(--text) 36%, transparent); transition: color 0.25s; }
.sk.it { font-style: italic; }
.sk sup { margin-left: 0.15em; font-size: 0.2em; font-style: normal; font-weight: 600; letter-spacing: 0; vertical-align: top; opacity: 0.8; }
.sk:hover, .sk:focus-visible, .sk.on { color: var(--accent-text); }
.sk:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 6px; }
.sl { margin: 0 0.12em; font-weight: 400; color: color-mix(in srgb, var(--text) 22%, transparent); }
.sk-card { position: sticky; top: 24px; display: flex; flex-direction: column; }
.sk-tab { position: relative; z-index: 1; align-self: flex-start; display: flex; align-items: center; height: 40px; max-width: 100%; padding: 0 20px; margin-bottom: -1px; border-radius: 16px 16px 0 0; background: var(--tabB); color: var(--tab-text); font: 600 12px var(--f); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-body {
  --wash: linear-gradient(105deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 40%), linear-gradient(285deg, rgba(0, 0, 0, 0.07) 0%, transparent 46%);
  isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 0 22px 22px 22px; color: var(--tab-text);
  background: var(--grain), var(--wash), var(--tabB); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -22px 44px -26px rgba(0, 0, 0, 0.13);
}
.sk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sk-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--deep); }
.sk-ico .ico { display: block; width: 26px; height: 26px; background: var(--c); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.sk-no { padding: 5px 10px; border-radius: 999px; border: 1.5px solid rgba(0, 0, 0, 0.32); font: 600 11px var(--f); letter-spacing: 0.08em; }
.sk-body h3 { font-size: clamp(30px, 3vw, 44px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; }
.sk-body p { font-size: 15px; line-height: 1.45; }
.sk-stats { display: flex; margin-top: 4px; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, 0.2); }
.sk-stats > div + div { margin-left: 18px; padding-left: 18px; border-left: 1px solid rgba(0, 0, 0, 0.2); }
.sk-stats small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.sk-stats b { display: block; margin-top: 2px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.sk-bars { display: flex; gap: 4px; margin-top: 8px; }
.sk-bars i { width: 22px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, 0.18); }
.sk-bars i.on { background: var(--tab-text); }
.mo .sk-card.swap { animation: skswap 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes skswap { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 900px) {
  .f-sk { grid-template-columns: 1fr; }
  .sk-list { font-size: clamp(34px, 9vw, 54px); }
  .sk-card { position: static; }
}

/* ══ Signature pill + credit/version card: a small folder that opens above the pill ═════════════════════════ */
.devwrap { --dp-fg: var(--text); --dp-line: var(--line); --dp-fill: rgba(127, 127, 127, 0.1); position: relative; }
.f-contact .devwrap { --dp-fg: var(--tab-text); --dp-line: rgba(0, 0, 0, 0.22); --dp-fill: rgba(0, 0, 0, 0.08); }
.dev { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid var(--dp-line); background: var(--dp-fill); color: var(--dp-fg); font: 500 13px var(--f); letter-spacing: 0; text-transform: none; transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.4s cubic-bezier(0.34, 1.5, 0.5, 1); }
.dev-av { display: grid; place-items: center; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--deep); color: #f2f6ef; transition: transform 0.5s cubic-bezier(0.34, 1.6, 0.5, 1); }
.dev-av img, .dav-in img { width: 100%; height: 100%; object-fit: cover; }
.dev em { margin-left: 1px; font: italic 600 14px var(--f); }
.dev-chev { display: inline-block; opacity: 0.6; transition: transform 0.4s cubic-bezier(0.34, 1.6, 0.5, 1), opacity 0.3s; }
.devwrap.open .dev, .devwrap:hover .dev { background: var(--dp-fg); color: var(--bg); border-color: transparent; transform: translateY(-2px); }
.f-contact .devwrap.open .dev, .f-contact .devwrap:hover .dev { color: var(--tabB); }
.devwrap.open .dev-av, .devwrap:hover .dev-av { transform: rotate(-8deg) scale(1.08); }
.devwrap.open .dev-chev, .devwrap:hover .dev-chev { transform: rotate(45deg); opacity: 1; }

.devcard { position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 60; width: min(350px, calc(100vw - 40px)); display: flex; flex-direction: column; text-align: left; color: var(--tab-text); font-family: var(--f); letter-spacing: 0; text-transform: none; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.4)); opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.94); transform-origin: calc(100% - 40px) 100%; transition: opacity 0.25s 0.12s, transform 0.45s cubic-bezier(0.34, 1.35, 0.5, 1) 0.12s, visibility 0s 0.5s; }
/* an invisible bridge over the gap between pill and card, so moving the mouse up doesn't close it */
.devcard::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; }
.devwrap.open .devcard { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) { .devwrap:hover .devcard { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } }

/* the two tabs are real folder tabs: the active one is the same paper as the body */
.dtabs { position: relative; z-index: 1; align-self: flex-start; display: flex; gap: 3px; margin-bottom: -1px; }
.dtabs button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 18px; border-radius: 14px 14px 0 0; background: color-mix(in srgb, var(--tabA) 62%, var(--bg2)); color: color-mix(in srgb, var(--tab-text) 70%, transparent); font: 600 12px var(--f); letter-spacing: 0.04em; transition: background 0.25s, color 0.25s, height 0.25s; }
.dtabs button:hover { color: var(--tab-text); }
.dtabs button[aria-selected="true"] { height: 38px; margin-top: -4px; background: var(--tabA); color: var(--tab-text); }
.dtabs button:focus-visible { outline: 2px solid var(--tab-text); outline-offset: -3px; }
.live { width: 6px; height: 6px; border-radius: 50%; background: #1fae63; box-shadow: 0 0 6px #1fae63; animation: dLive 2s ease-in-out infinite; }
@keyframes dLive { 50% { opacity: 0.4; } }
.dbody { --wash: linear-gradient(105deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 40%), linear-gradient(285deg, rgba(0, 0, 0, 0.07) 0%, transparent 46%); padding: 18px; border-radius: 0 20px 20px 20px; background: var(--grain), var(--wash), var(--tabA); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.dpanel { animation: dfade 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dpanel[hidden] { display: none; }
@keyframes dfade { from { opacity: 0; transform: translateY(6px); } }

.dwho { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dwho small { display: block; font-size: 12px; font-weight: 500; opacity: 0.65; }
.dwho b { display: block; margin: 1px 0; font: italic 500 34px/1.05 var(--f); letter-spacing: -0.03em; color: var(--tab-text); }
.dwho .role { font-size: 12px; }
.dav { flex: none; display: grid; place-items: center; width: 56px; height: 56px; }
.dav-in { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: 18px; background: var(--deep); color: #f2f6ef; transform: rotate(-4deg); transition: transform 0.4s cubic-bezier(0.34, 1.6, 0.5, 1); }
.devcard:hover .dav-in { transform: rotate(0); }
.init { font-size: 1.2em; font-weight: 600; }

.drows { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, 0.16); font-size: 14px; }
.drows a, .drows > div, .dline { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; }
.drows a { font-weight: 500; transition: background 0.2s, transform 0.3s cubic-bezier(0.34, 1.5, 0.5, 1); }
.drows a:hover { background: rgba(0, 0, 0, 0.08); transform: translateX(4px); opacity: 1; }
.drows a:hover .di { transform: scale(1.18) rotate(-6deg); }
.di { flex: none; width: 17px; height: 17px; color: var(--tab-text); opacity: 0.8; transition: transform 0.3s cubic-bezier(0.34, 1.6, 0.5, 1); }
.devcard .ico { display: block; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.drows.plain > div { opacity: 0.8; }
.devwrap:hover .drows a, .devwrap.open .drows a { animation: dRow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.drows a:nth-child(2) { animation-delay: 0.05s !important; } .drows a:nth-child(3) { animation-delay: 0.1s !important; } .drows a:nth-child(4) { animation-delay: 0.15s !important; } .drows a:nth-child(5) { animation-delay: 0.2s !important; }
@keyframes dRow { from { opacity: 0; transform: translateY(6px); } }

.dver { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 10px 8px; }
.dv { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.dv b { font-weight: 600; }
.dv .hash { opacity: 0.6; font-variant-numeric: tabular-nums; }
.env { padding: 4px 12px; border-radius: 999px; background: var(--tab-text); color: var(--tabA); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.dline { font-size: 13px; opacity: 0.75; }
.dmsg { margin: 2px 10px 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(0, 0, 0, 0.16); font-size: 14px; font-weight: 500; line-height: 1.45; }
.dlink { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--tab-text); color: var(--tabA); font-size: 13px; font-weight: 600; transition: transform 0.3s cubic-bezier(0.34, 1.5, 0.5, 1), filter 0.2s; }
.dlink:hover { transform: translateY(-2px); filter: brightness(1.2); opacity: 1; }
.dlink .di { color: inherit; opacity: 1; }

/* footer text in sentence case */
.f-foot { text-transform: none; letter-spacing: 0.01em; font-size: 15px; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .devcard, .dpanel, .drows a, .live { animation: none !important; transition: none !important; } }
.dwho .init { display: block; margin: 0; color: #f2f6ef; font: 600 26px/1 var(--f); letter-spacing: 0; }

/* ══ The client brief: a document with ruled sections ═════════════════════════════════════════════════════════
   It follows the site's theme: your palette from the admin, in Day or Night (whichever the viewer has on), and the
   image / PDF exports use the same colours. Print always uses the Day colours, since it goes on paper.
   Each section is a row: number + heading on the left, the text on the right, with a thin rule between sections. */
.brief {
  --b-bg: var(--bg); --b-ink: var(--text); --b-accent: var(--accent-text); --b-glow: var(--tabB);
  --b-line: color-mix(in srgb, var(--b-ink) 16%, transparent); --b-dim: color-mix(in srgb, var(--b-ink) 62%, transparent);
  position: relative; width: min(820px, 100%); margin: 0 auto; padding: 52px 56px 36px; overflow: hidden; border-radius: 28px;
  background: var(--b-bg); color: var(--b-ink); font-family: var(--f); letter-spacing: 0; line-height: 1.5; text-align: left;
}
.brief.fixed { width: 820px; margin: 0; }
.brief.exporting { border-radius: 0; }
.b-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.b-brand { display: flex; align-items: center; font-size: 26px; line-height: 1; letter-spacing: 0.01em; color: var(--b-ink); }
.b-mark { width: 30px; height: 30px; margin-right: 1px; fill: var(--b-accent); transform: translateY(-1px); }
.b-tag { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--b-line); color: var(--b-dim); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.b-title { margin: 40px 0 30px; color: var(--b-accent); font-size: 64px; font-weight: 500; letter-spacing: -0.045em; line-height: 0.95; overflow-wrap: anywhere; }
.b-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 28px; margin: 0; padding: 20px 0; border-block: 1px solid var(--b-line); }
.b-meta dt { color: var(--b-dim); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.b-meta dd { margin: 2px 0 0; font-size: 18px; font-weight: 500; letter-spacing: -0.015em; }
.b-for { display: flex; align-items: center; gap: 12px; }
.b-clogo { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; border: 1px solid var(--b-line); background: #fff; padding: 4px; }
.b-intro { margin: 26px 0 0; color: color-mix(in srgb, var(--b-ink) 82%, transparent); font-size: 19px; line-height: 1.5; }
.b-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 0; border-bottom: 1px solid var(--b-line); }
.b-sum > div { padding: 22px 20px 22px 0; }
.b-sum > div + div { padding-left: 20px; border-left: 1px solid var(--b-line); }
.b-sum span { display: block; color: var(--b-dim); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.b-sum b { display: block; margin-top: 4px; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.b-sum small { display: block; color: var(--b-dim); font-size: 12px; font-weight: 500; }
.b-sum .b-total b { color: var(--b-accent); font-size: 38px; line-height: 1.1; }
.b-sec { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 30px 0; border-bottom: 1px solid var(--b-line); break-inside: avoid; }
.b-sec h2 { display: grid; align-content: start; gap: 6px; margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.b-sec h2 i { color: var(--b-accent); font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: 0.1em; }
.b-sbody > :last-child { margin-bottom: 0; }
.b-sec p { margin: 0 0 10px; color: color-mix(in srgb, var(--b-ink) 84%, transparent); font-size: 16px; line-height: 1.6; }
.b-sec h3 { margin: 18px 0 8px; color: var(--b-dim); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.b-list { display: grid; gap: 8px; margin: 0 0 12px; list-style: none; }
.b-list li { position: relative; padding-left: 24px; font-size: 16px; font-weight: 500; }
.b-list li::before { content: "✦"; position: absolute; left: 0; color: var(--b-accent); }
.b-rows { margin: 0 0 12px; }
.b-rows > div { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 16px; }
.b-rows span { font-weight: 500; }
.b-rows i { flex: 1; min-width: 20px; border-bottom: 2px dotted var(--b-line); transform: translateY(-4px); }
.b-rows b { font-weight: 600; color: var(--b-accent); white-space: nowrap; }
/* bank details: a tinted panel, each value with its own Copy button (hidden in the image, PDF and print) */
.b-bank { border: 1px solid var(--b-line); border-radius: 16px; background: color-mix(in srgb, var(--b-ink) 4%, transparent); overflow: hidden; }
.b-bank dl { margin: 0; padding: 8px 18px; }
.b-bank dl + dl { border-top: 1px dashed var(--b-line); }
.b-bank dl > div { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 0; }
.b-bank dt { color: var(--b-dim); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.b-bank dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; min-width: 0; }
.b-bank dd span { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; overflow-wrap: anywhere; user-select: all; }
.b-bank .ref dd span { color: var(--b-accent); }
.b-copy { flex: none; padding: 4px 11px; border: 1px solid var(--b-line); border-radius: 999px; background: var(--b-bg); color: var(--b-ink); font: 600 12px/1.4 var(--f); cursor: pointer; transition: background 0.15s, color 0.15s; }
.b-copy:hover, .b-copy:focus-visible { background: var(--b-accent); border-color: var(--b-accent); color: var(--b-bg); }
.b-copy.done { background: var(--b-accent); border-color: var(--b-accent); color: var(--b-bg); }
.b-bankfoot { display: flex; justify-content: flex-end; padding: 10px 18px; border-top: 1px solid var(--b-line); }
.brief.exporting .b-copy, .brief.exporting .b-bankfoot { display: none; }
@media print { .b-copy, .b-bankfoot { display: none !important; } }
@media (max-width: 520px) { .brief:not(.fixed) .b-bank dl > div { grid-template-columns: 1fr; gap: 2px; } }
.b-signed { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 16px 20px; border: 1.5px solid var(--b-accent); border-radius: 16px; }
.b-signed > span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--b-accent); color: var(--b-bg); font-weight: 700; }
.b-signed b { display: block; font-size: 17px; font-weight: 600; }
.b-signed small { color: var(--b-dim); font-size: 13px; font-weight: 500; }
.b-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; color: var(--b-dim); font-size: 13px; font-weight: 500; }
/* one A4 page of the PDF (brief.js lays the brief out into these): 820 × 1160 px, content never runs into the bottom margin */
.brief.b-page { height: 1160px; padding: 52px 56px 0; }
.brief.b-page + .b-page { padding-top: 56px; }
.b-pgbody { display: flow-root; }
.b-pgbody > .b-sec:last-child { border-bottom: 0; }
.b-sec.b-cont > h2 { visibility: hidden; } /* a long section's carry-over: no repeated heading */
/* PDFs are always light: the palette's Day colours, whatever theme the person downloading has on */
.brief.b-light { --b-bg: var(--d-bg, #efede8); --b-ink: var(--d-ink, #00332b); --b-accent: var(--d-accent, #00594a); --b-glow: var(--d-tabB, #a8d5ae); }
/* the PDF cover, like the landing page (.f-tabs): a stack of tabs across the top, the last one the page itself */
.brief { --b-tabA: var(--tabA); --b-tabink: var(--tab-text); }
.brief.b-light { --b-tabA: #fff; --b-tabink: var(--d-ink, #00332b); }
.brief.b-cover { padding: 0; }
.b-tabs { position: relative; height: 262px; overflow: hidden; }
.b-tabs > div { position: absolute; right: 0; display: flex; flex-direction: column; }
.b-tabs span { display: block; height: 44px; padding: 0 18px; border-radius: 18px 18px 0 0; background: var(--c); color: var(--b-tabink); font: 600 13px/44px var(--f); letter-spacing: 0.06em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-tabs i { display: block; height: 80px; background: var(--c); }
.b-tabs .t1 { top: 0; left: 54%; --c: var(--b-tabA); }
.b-tabs .t2 { top: 40px; left: 29%; --c: var(--b-glow); }
.b-tabs .t3 { top: 80px; left: 0; --c: var(--b-tabA); }
.b-tabs .t4 { top: 150px; left: 36%; --c: var(--b-glow); }
.b-tabs .t5 { top: 190px; left: 0; --c: var(--b-bg); }
.b-tabs .t1 span { width: 250px; }
.b-tabs .t2 span { width: 340px; }
.b-tabs .t3 span { width: 300px; border-radius: 0 18px 0 0; }
.b-tabs .t4 span { width: 270px; }
.b-tabs .t5 span { width: 200px; border-radius: 0 18px 0 0; color: var(--b-ink); }
.b-tabs .t2 i, .b-tabs .t3 i, .b-tabs .t4 i { box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.12); }
.b-tabs .t5 i { box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.18); }
.b-tabs .t1 i { box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06) inset; }
.b-cvbody { padding: 6px 56px 0; }
.b-cvrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.b-cvrow .b-mark { width: 72px; height: 72px; margin: 0; transform: none; }
.b-cvtag { margin: 0; text-align: right; white-space: pre-line; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: 0.04em; }
.b-cover .b-title { margin: 26px 0 24px; }
.b-cvbank { margin-top: 26px; }
.b-fhead { margin: 0 0 14px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
@media (max-width: 700px) {
  .brief:not(.fixed) { padding: 30px 20px 26px; border-radius: 22px; }
  .brief:not(.fixed) .b-title { font-size: 42px; margin: 30px 0 22px; }
  .brief:not(.fixed) .b-sec { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .brief:not(.fixed) .b-sum > div { padding: 16px 12px 16px 0; }
  .brief:not(.fixed) .b-sum > div + div { padding-left: 12px; }
  .brief:not(.fixed) .b-sum .b-total { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-bottom: 1px solid var(--b-line); }
  .brief:not(.fixed) .b-sum .b-total + div { border-left: 0; padding-left: 0; }
}

/* the public brief page (/brief?t=…) */
.bp { min-height: 100svh; padding: 0 clamp(16px, 4vw, 40px) 60px; background: var(--bg); color: var(--text); font-family: var(--f); }
.bp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: min(820px, 100%); margin: 0 auto; padding: 26px 0 22px; }
/* once the brief is open it fills the page: the site's colours, no card, ruled sections edge to edge */
.bp.doc { background: var(--bg); color: var(--text); }
.bp.doc .bp-bar, .bp.doc .bp-note, .bp-agree { width: min(1100px, 100%); }
.bp.doc .brief { width: min(1100px, 100%); padding: 8px 0 0; border-radius: 0; background: transparent; }
.bp.doc .b-head { display: none; } /* the page bar above already carries the logo */
.bp.doc .b-title { font-size: clamp(42px, 7vw, 96px); margin-top: 18px; }
.bp.doc .b-sec { grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); }

/* the sign-off: full name + the brief's password */
.bp-agree { margin: 44px auto 0; display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 32px; padding: 32px 0; border-block: 2px solid var(--text); }
.bp-agree h2 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.bp-agree h2 i { display: block; margin-bottom: 6px; color: var(--accent-text); font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: 0.1em; }
.bp-agree form { display: grid; gap: 16px; max-width: 560px; }
.bp-agree p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.bp-agree .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp-agree label { display: grid; gap: 6px; font: 600 11px var(--f); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.bp-agree input:not([type="checkbox"]) { height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--text) 5%, var(--bg)); color: var(--text); font: 500 16px var(--f); letter-spacing: 0; text-transform: none; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.bp-agree input:not([type="checkbox"]):focus { border-color: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 12%, transparent); }
.bp-agree .chk { display: flex; align-items: flex-start; gap: 10px; font: 500 15px var(--f); letter-spacing: 0; text-transform: none; color: var(--text); cursor: pointer; }
.bp-agree .chk input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent-text); }
.bp-agree .pbtn { justify-self: start; background: var(--text); color: var(--bg); border: 0; cursor: pointer; }
.bp-agree .pbtn:disabled { opacity: 0.5; pointer-events: none; }
.bp-agree .done { display: flex; align-items: center; gap: 14px; font-size: 17px; font-weight: 600; }
.bp-agree .done span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-text); color: var(--bg); }
.bp-agree .done small { display: block; color: var(--faint); font-size: 14px; font-weight: 500; }
@media (max-width: 700px) {
  .bp.doc .b-sec, .bp-agree { grid-template-columns: 1fr; gap: 12px; }
  .bp-agree .two { grid-template-columns: 1fr; }
}
.bp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bp-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font: 600 14px var(--f); cursor: pointer; transition: border-color 0.25s, transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1); }
.bp-btn:hover { border-color: var(--text); transform: translateY(-1px); }
.bp-btn.solid { background: var(--tabB); border-color: transparent; color: var(--tab-text); }
.bp-btn:disabled { opacity: 0.5; pointer-events: none; }
.bp-note { width: min(820px, 100%); margin: 18px auto 0; color: var(--faint); font-size: 13px; text-align: center; }
.bp-empty { width: min(560px, 100%); margin: 10vh auto 0; text-align: center; }
.bp-empty h1 { font-size: clamp(44px, 8vw, 80px); font-weight: 500; letter-spacing: -0.045em; line-height: 0.95; color: var(--accent-text); }
.bp-empty p { margin-top: 16px; color: var(--muted); font-size: 18px; }

/* the PIN gate: a little folder with a tab */
.bp-gate { width: min(440px, 100%); margin: 9vh auto 0; display: flex; flex-direction: column; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.3)); }
.bp-gtab { align-self: flex-start; display: flex; align-items: center; height: 38px; padding: 0 22px; margin-bottom: -1px; border-radius: 16px 16px 0 0; background: var(--tabA); color: var(--tab-text); font: 600 12px var(--f); letter-spacing: 0.1em; position: relative; z-index: 1; }
.bp-gbody { --wash: linear-gradient(105deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 40%), linear-gradient(285deg, rgba(0, 0, 0, 0.07) 0%, transparent 46%); display: grid; gap: 14px; padding: 30px 28px 28px; border-radius: 0 22px 22px 22px; background: var(--grain), var(--wash), var(--tabA); color: var(--tab-text); }
.bp-gbody h1 { font-size: clamp(34px, 6vw, 46px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.bp-gbody h1 i { font-style: italic; }
.bp-gbody p { font-size: 16px; line-height: 1.45; }
.bp-gbody label { font: 600 11px var(--f); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.65; }
.bp-gbody input { width: 100%; height: 60px; padding: 0 16px; border-radius: 16px; border: 1.5px solid rgba(0, 0, 0, 0.22); background: rgba(255, 255, 255, 0.55); color: var(--tab-text); font: 600 22px var(--f); letter-spacing: 0.08em; text-align: center; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.bp-gbody input:focus { border-color: var(--tab-text); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1); }
.bp-gbody input::placeholder { color: rgba(0, 0, 0, 0.22); letter-spacing: 0.08em; }
.bp-gbody .pbtn { justify-self: start; background: var(--tab-text); color: var(--tabA); border: 0; cursor: pointer; }
.bp-gbody .pbtn:disabled { opacity: 0.5; pointer-events: none; }
.bp-gerr { min-height: 1.4em; color: #a3261e; font-size: 14px; font-weight: 600; }
.bp-gate.shake, .bp-agree.shake { animation: bpShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes bpShake { 15%, 55% { transform: translateX(-10px); } 35%, 75% { transform: translateX(10px); } 95% { transform: translateX(0); } }
@media print {
  .bp-bar, .bp-note, .bp-agree { display: none !important; } /* a signed brief already shows "Agreed by" inside the document */
  html, body, .bp { background: #fff !important; padding: 0 !important; }
  .brief { --b-bg: var(--d-bg); --b-ink: var(--d-ink); --b-accent: var(--d-accent); width: 100%; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 12mm; }
}
@media (prefers-reduced-motion: reduce) { .bp-gate.shake, .bp-agree.shake { animation: none; } }

/* ── Design visualiser (scripts/viewer.js): an uploaded HTML design in a desktop / tablet / phone frame ── */
.vw { display: flex; justify-content: center; align-items: flex-start; overflow: hidden; }
.vw-dev { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 30px 60px -20px rgba(0, 51, 43, 0.35); transition: border-radius 0.3s; }
.vw-chrome { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; background: #f3f2ef; border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
.vw-chrome i { width: 10px; height: 10px; border-radius: 50%; background: #dcd8d1; }
.vw-chrome i:nth-child(1) { background: #f58f7c; }
.vw-chrome i:nth-child(2) { background: #f3c868; }
.vw-chrome i:nth-child(3) { background: #8fcf9a; }
.vw-url { flex: 1; max-width: 420px; margin: 0 auto; height: 24px; padding: 0 12px; border-radius: 8px; background: #fff; color: rgba(0, 0, 0, 0.5); font: 500 12px/24px var(--f); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translateX(-22px); }
.vw-screen { position: relative; overflow: hidden; background: #fff; transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.vw-screen iframe { position: absolute; top: 0; left: 0; display: block; border: 0; background: #fff; transform-origin: 0 0; }
.vw-dev.is-phone { border: 12px solid #0d1f1b; border-top-width: 34px; border-radius: 46px; position: relative; overflow: visible; }
.vw-dev.is-phone .vw-chrome { display: none; }
.vw-dev.is-phone::before { content: ""; position: absolute; z-index: 2; top: -25px; left: 50%; width: 72px; height: 16px; margin-left: -36px; border-radius: 999px; background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.vw-dev.is-phone .vw-screen { border-radius: 14px 14px 34px 34px; }
/* Desktop / Tablet / Phone switch */
.vw-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg2); }
.vw-seg button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; color: var(--text); font: 600 13px var(--f); letter-spacing: 0.02em; cursor: pointer; transition: background 0.25s, color 0.25s; }
.vw-seg button svg { width: 17px; height: 17px; }
.vw-seg button:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.vw-seg button[aria-pressed="true"] { background: var(--deep); color: #f2f6ef; }

/* the /design page */
body.dsn-on { overflow: hidden; padding: 0; }
body.dsn-on .bp { padding: 0; }
.dsn { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100svh; background: var(--grain), var(--bg); }
.dsn-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px 24px; padding: 18px clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line); }
.dsn-title { min-width: 0; padding-left: 22px; border-left: 1px solid var(--line); }
.dsn-title small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsn-title h1 { margin-top: 2px; font-size: clamp(20px, 2vw, 26px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsn-acts { display: flex; gap: 8px; }
.dsn-acts .bp-btn svg { width: 16px; height: 16px; }
.dsn-stage { padding: clamp(16px, 3vw, 36px) clamp(12px, 3vw, 36px) 12px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--tabB) 35%, transparent), transparent 70%); }
.dsn-stage:fullscreen { padding: 16px; background: var(--d-bg, #efede8); }
.dsn-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 12px clamp(16px, 3vw, 36px) 14px; color: var(--faint); font-size: 13px; }
.dsn-note { max-width: 70ch; color: var(--muted); }
body.dsn-max .dsn-title, body.dsn-max .dsn-foot { display: none; }
body.dsn-max .dsn-bar { grid-template-columns: auto 1fr auto auto; padding-block: 10px; }
@media (max-width: 1000px) {
  .dsn-bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dsn-bar #dsn-seg { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (max-width: 640px) {
  .dsn-bar { grid-template-columns: minmax(0, 1fr) auto; padding-block: 12px; }
  .dsn-title { grid-column: 1 / -1; grid-row: 2; padding-left: 0; border-left: 0; }
  .dsn-bar #dsn-seg { grid-row: 3; }
  .dsn-acts .bp-btn { padding: 0 14px; }
  .dsn-acts .bp-btn span { display: none; }
  .vw-seg button { padding: 0 12px; }
  .vw-seg button span { display: none; }
  .dsn-foot { font-size: 12px; }
  .dsn-note { display: none; }
}

/* ── Review form: field styling + the "thank you" fold-away ── */
.rform { padding: clamp(22px, 3vw, 32px); transform-origin: top left; transition: opacity 0.35s, transform 0.45s cubic-bezier(0.55, 0, 0.7, 0.2); }
.rform.out { opacity: 0; transform: scale(0.94) translateY(-10px); pointer-events: none; }
.rform:not([hidden]) { animation: rform-in 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes rform-in { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }
.rform .fld input[type="text"], .rform .fld input[type="email"], .rform .fld textarea { background: var(--bg); border: 1.5px solid var(--line); }
.rform .fld input:hover, .rform .fld textarea:hover { border-color: var(--faint); }
.rform .fld input:focus, .rform .fld textarea:focus { border-color: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 12%, transparent); }
.rform .fld input:user-invalid { border-color: #b3261e; }
.rform .stars label { color: color-mix(in srgb, var(--text) 22%, transparent); }
.rform .stars label:hover, .rform .stars label:hover ~ label, .rform .stars input:checked ~ label { color: var(--accent-text); }
.rthanks { width: min(640px, 100%); display: grid; justify-items: start; gap: 6px; padding: 28px; background: var(--bg2); border-radius: 0 24px 24px 24px; }
.rthanks[hidden] { display: none; }
.rthanks b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.rthanks span { color: var(--muted); }
.rthanks svg { width: 52px; height: 52px; margin-bottom: 8px; fill: none; stroke: var(--accent-text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rthanks circle { stroke-dasharray: 151; stroke-dashoffset: 151; }
.rthanks path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.rthanks.in { animation: rform-in 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.rthanks.in circle { animation: rdraw 0.6s 0.1s ease forwards; }
.rthanks.in path { animation: rdraw 0.4s 0.55s ease forwards; }
@keyframes rdraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .rform, .rform:not([hidden]), .rthanks.in, .rthanks.in circle, .rthanks.in path { animation: none; transition: none; } .rthanks circle, .rthanks path { stroke-dashoffset: 0; } }

/* ── Floating nav: full width at the top, a compact pill once you scroll (scripts/common.js toggles .scrolled / .open) ── */
body { padding-top: 104px; }
.f-nav {
  --pad: clamp(20px, 4vw, 56px); --ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed; z-index: 50; top: 16px; left: 0; right: 0; margin-inline: auto; width: calc(100% - 2 * var(--pad)); max-width: 1328px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 18px; border-radius: 999px;
  border: 1px solid transparent; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none;
  transition: max-width 0.7s var(--ease), padding 0.5s var(--ease), background 0.4s, border-color 0.4s, box-shadow 0.4s, border-radius 0.4s;
}
/* condensed: logo, links and button sit together in the middle. gap 15 + the links' own padding (5 + 18) = 38px, the same as between two links (2 + 18 + 18) */
.f-nav.scrolled { max-width: 660px; justify-content: center; gap: 15px; padding: 8px 14px; border-color: var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16); }
.f-nav.scrolled .f-right { gap: 0; }
/* the glass lives on its own layer (a pseudo-element): backdrop-filter directly on a fixed, rounded, resizing bar can render half-cut while scrolling */
.f-nav::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: color-mix(in srgb, var(--bg) 94%, transparent); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.f-nav.scrolled::before { opacity: 1; }
.f-brand span { display: inline-block; overflow: hidden; max-width: 60px; transition: max-width 0.5s var(--ease), opacity 0.3s; }
.f-nav.scrolled .f-brand span { max-width: 0; opacity: 0; }
.f-links { display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 5%, transparent); transition: border-color 0.4s, background 0.4s; }
.f-nav.scrolled .f-links { border-color: transparent; background: transparent; }
.f-links a { padding: 10px 18px; border-radius: 999px; white-space: nowrap; transition: background 0.25s, color 0.25s; }
.f-links a:hover, .f-links a[aria-current] { background: var(--tabB); color: var(--tab-text); opacity: 1; }
.f-links a[hidden] { display: none; }
.f-right { display: flex; align-items: center; gap: 10px; }
.f-tog { overflow: hidden; max-width: 140px; white-space: nowrap; transition: max-width 0.5s var(--ease), padding 0.5s var(--ease), opacity 0.3s, border-color 0.3s; }
.f-nav.scrolled .f-tog { max-width: 0; padding: 0; border-width: 0; opacity: 0; pointer-events: none; }
.f-cta { display: inline-flex; align-items: center; height: 44px; padding: 0 22px; border-radius: 999px; background: var(--tabB); color: var(--tab-text); font-weight: 600; white-space: nowrap; transition: height 0.5s var(--ease), padding 0.5s var(--ease), transform 0.3s; }
.f-nav.scrolled .f-cta { height: 38px; padding: 0 16px; font-size: 14px; }
.f-cta:hover { transform: scale(1.04); opacity: 1; }
.f-burger { display: none; }
@media (max-width: 720px) {
  body { padding-top: 88px; }
  .f-nav, .f-nav.scrolled { width: calc(100% - 32px); max-width: none; flex-wrap: wrap; justify-content: space-between; gap: 12px; top: 12px; padding: 8px 8px 8px 16px; border-color: var(--line); }
  .f-nav.scrolled .f-right { gap: 10px; }
  .f-nav::before { opacity: 1; }
  .f-nav .f-brand span, .f-nav.scrolled .f-brand span { max-width: 60px; opacity: 1; }
  .f-nav .f-links .f-tog { display: flex; max-width: none; opacity: 1; pointer-events: auto; margin: 14px 0 4px; align-self: flex-start; }
  .f-cta, .f-nav.scrolled .f-cta { height: 40px; padding: 0 18px; font-size: 14px; }
  .f-burger { display: grid; place-items: center; align-content: center; gap: 5px; width: 40px; height: 40px; border-radius: 999px; background: var(--bg2); color: var(--text); transition: background 0.3s, width 0.4s var(--ease); }
  .f-burger i { width: 16px; height: 2px; border-radius: 2px; background: currentColor; }
  .f-burger span { display: none; font-size: 14px; }
  .f-links { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 8px 8px; border: 0; background: transparent; counter-reset: n; }
  .f-links a { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-radius: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
  .f-links a::before { counter-increment: n; content: "0" counter(n); font-size: 11px; letter-spacing: 0.04em; opacity: 0.6; }
  .f-links a:nth-of-type(even) { font-style: italic; }
  .f-links a:hover, .f-links a[aria-current] { background: none; }
  .f-nav.open::before { background: var(--tabB); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .f-nav.open, .f-nav.open.scrolled { border-radius: 28px; color: var(--tab-text); border-color: transparent; align-items: flex-start; padding: 14px 14px 18px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
  .f-nav.open .f-links { display: flex; animation: fadein 0.35s; }
  .f-nav.open .f-brand { height: 40px; }
  .f-nav.open .f-brand svg { fill: var(--deep); } /* the green logo vanished against the green panel */
  body:has(.f-nav.open)::after { content: ""; position: fixed; inset: 0; z-index: 49; background: rgba(0, 20, 16, 0.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fadein 0.3s; }
  .f-nav.open .f-cta { display: none; }
  .f-nav.open .f-burger { width: 92px; grid-auto-flow: column; gap: 8px; background: var(--deep); color: #f2f6ef; }
  .f-nav.open .f-burger i { display: none; }
  .f-nav.open .f-burger span { display: block; }
  .f-nav.open .f-tog { border-color: color-mix(in srgb, currentColor 30%, transparent); color: var(--tab-text); }
}
html { scroll-padding-top: 100px; }

/* ── Skill card: typing code editor ── */
.sk-code { margin-top: 6px; border-radius: 14px; background: var(--deep); color: #f2f6ef; overflow: hidden; }
.sk-dots { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid rgba(242, 246, 239, 0.12); }
.sk-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(242, 246, 239, 0.25); }
.sk-dots span { margin-left: 6px; font: 500 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; opacity: 0.55; }
.sk-code pre { display: grid; margin: 0; padding: 12px 14px 14px; font: 500 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; }
.sk-code code { grid-area: 1 / 1; white-space: pre; font: inherit; }
.sk-code .ghost { visibility: hidden; }
.sk-code b { font-weight: inherit; }
.sk-code .k { color: #c9a7f5; } .sk-code .s { color: #a8d5ae; } .sk-code .n { color: #f2c879; } .sk-code .p { color: #8fd0e8; }
.sk-code .caret { display: inline-block; width: 0.55em; height: 1.1em; margin-left: 1px; vertical-align: -0.18em; background: #a8d5ae; animation: bdCaret 0.7s steps(1) infinite; }

/* contact page: keep room under the signature pill (it was only there before the page finished loading) */
.f-cfoot { padding-bottom: 56px; }
/* phone: the pill sits on the same line as "© 2026 Simba", smaller, and its card spans the footer so it can't be cut off */
@media (max-width: 720px) {
  .f-foot { position: relative; flex-wrap: nowrap; gap: 10px; font-size: 12px; }
  .f-foot > span { white-space: nowrap; }
  .f-foot .devwrap { position: static; }
  .f-foot .dev { gap: 7px; padding: 4px 11px 4px 4px; font-size: 12px; white-space: nowrap; }
  .f-foot .dev-av { width: 22px; height: 22px; }
  .f-foot .dev em { font-size: 12px; }
  .f-foot .dev-chev { display: none; }
  .f-foot .devcard { left: 0; right: 0; width: auto; translate: none; transform-origin: calc(100% - 40px) 100%; }
}

 /* the floating-nav spacer isn't needed on the project page (it has its own header) */

/* "(required)" was the light sage star colour: unreadable on the pale contact form in Night. Follow the form's own text colour instead */
.cform .req { color: color-mix(in srgb, var(--tab-text) 72%, transparent); }
.rform.cform .req { color: var(--accent-text); }

/* ── Hero title: typing code ── */
.f-h1 .par { color: color-mix(in srgb, var(--accent-text) 55%, transparent); font-weight: 400; }
.f-h1 .caret { display: inline-block; width: 0.06em; height: 0.78em; margin-left: 0.04em; vertical-align: -0.06em; background: var(--accent-text); animation: bdCaret 1s steps(1) infinite; }
.f-h1 .caret.busy { animation: none; }
.f-h1 .typo { text-decoration: underline wavy #e5484d; text-decoration-thickness: 0.035em; text-underline-offset: 0.1em; text-decoration-skip-ink: none; }


/* ══ Project page (/project): one project as a story ══════════════════════════════════════════════════════════
   Drawn by scripts/projectview.js (also the admin preview). Mobile-first; one accent (the theme's --accent-text);
   text columns capped at ~65 characters. */
.pp-page { --px: clamp(20px, 5vw, 48px); min-height: 100vh; padding: 0 var(--px) 72px; background: var(--bg); color: var(--text); overflow-x: clip; }
body:has(> .pp-page) { padding-top: 0; } /* no floating nav on this page */
.pp-page > * { max-width: 1040px; margin-inline: auto; }
.pp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 0; }
.pp-tools { display: flex; align-items: center; gap: 10px; }
.pp-back { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: border-color 0.3s; }
.pp-back:hover { border-color: var(--text); }
.pp-theme { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--text); transition: border-color 0.3s; }
.pp-theme:hover { border-color: var(--text); }
.pp-theme svg { width: 15px; height: 15px; }
.pp-empty { padding: 12vh 0; }
.pp-empty h1 { color: var(--accent-text); font-size: clamp(44px, 9vw, 96px); font-weight: 500; letter-spacing: -0.045em; line-height: 0.95; }
.pp-empty p { margin-top: 16px; color: var(--muted); font-size: 18px; }
.pp-empty a { text-decoration: underline; }

.pp { color: var(--text); font-family: var(--f); }
.pp-hero { padding: clamp(12px, 3vw, 40px) 0 clamp(40px, 6vw, 72px); }
.pp-kicker { color: var(--faint); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; }
.pp-hero h1 { margin-top: 10px; color: var(--accent-text); font-size: clamp(2.6rem, 9vw, 5.5rem); font-weight: 500; letter-spacing: -0.045em; line-height: 0.98; overflow-wrap: anywhere; }
.pp-lead { max-width: 65ch; margin-top: 20px; color: var(--muted); font-size: clamp(18px, 2vw, 21px); line-height: 1.55; }
.pp-meta { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 26px 0 0; }
.pp-meta:empty { display: none; }
.pp-meta dt { color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.pp-meta dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.pp-did { display: grid; gap: 8px; max-width: 65ch; margin: 22px 0 0; padding: 0; list-style: none; }
.pp-did li { position: relative; padding-left: 22px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.pp-did li::before { content: "✦"; position: absolute; left: 0; color: var(--accent-text); font-size: 13px; line-height: 1.9; }
.pp-stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; padding: 0; list-style: none; }
.pp-stack li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; line-height: 1.4; }
.pp-stack .ico { display: none; width: 13px; height: 13px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.pp-stack .has .ico { display: block; }
.pp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pp-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 15px; font-weight: 600; transition: border-color 0.25s, transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1); }
.pp-btn:hover { border-color: var(--text); transform: translateY(-1px); }
.pp-btn.solid { background: var(--accent-text); border-color: transparent; color: var(--bg); }
.pp-btn.off { opacity: 0.5; pointer-events: none; }
.pp-cover { margin: clamp(32px, 5vw, 56px) 0 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--bg2); }
.pp-cover img { display: block; width: 100%; height: auto; }

/* the story: each chapter is a ruled row, heading on top (side by side on wide screens) */
.pp-ch, .pp-gal { padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.pp-ch h2, .pp-gal h2 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.pp-ch h2 i { color: var(--accent-text); font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: 0.1em; }
.pp-txt { max-width: 65ch; }
.pp-txt p { margin: 0 0 1em; color: var(--muted); font-size: 17px; line-height: 1.7; }
.pp-txt p:last-child { margin-bottom: 0; }
@media (min-width: 860px) {
  .pp-ch { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
  .pp-ch h2 { flex-direction: column; gap: 6px; margin: 0; }
}

/* gallery: one column on phones, two from tablet up; captions under each picture */
.pp-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 760px) { .pp-grid { grid-template-columns: 1fr 1fr; } }
.pp-grid figure { margin: 0; min-width: 0; }
.pp-grid button { display: block; width: 100%; padding: 0; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); cursor: zoom-in; }
.pp-grid img { display: block; width: 100%; height: auto; }
.pp-grid figcaption { max-width: 65ch; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.pp-foot { display: flex; justify-content: space-between; gap: 16px; padding: 26px 0 0; border-top: 1px solid var(--line); }
.pp-foot a { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: opacity 0.25s; }
.pp-foot a:hover { opacity: 0.7; }
.pp-foot small { display: grid; min-width: 0; color: var(--faint); font-size: 11px; letter-spacing: 0.1em; }
.pp-foot small b { overflow: hidden; max-width: 36vw; color: var(--text); font-size: 15px; font-weight: 500; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.pp-foot .nx { text-align: right; }

.pp-lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 56px 16px; background: rgba(0, 0, 0, 0.86); }
.pp-lb figure { display: grid; justify-items: center; gap: 12px; max-width: 100%; max-height: 100%; margin: 0; }
.pp-lb img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 8px; }
.pp-lb p { max-width: 65ch; color: #f2f6ef; font-size: 15px; text-align: center; }
.pp-lb p:empty { display: none; }
.pp-lb button { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 22px; }
.pp-lb .x { top: 14px; right: 14px; } .pp-lb .prev { left: 14px; } .pp-lb .next { right: 14px; }

/* the mascot sits in the left margin: hide it where the margin is too narrow for it */
@media (max-width: 1359px) { body:has(> .pp-page) .buddy { display: none; } }
