/* Web Projects: homepage grid, /web-projects/ and individual project pages.
   Built on the site's existing tokens (see index-*.css :root). */

/* ---------- Icons (site-wide line icons; replace text arrows) ---------- */
.icon{display:inline-block;flex:none;width:1em;height:1em;vertical-align:-.125em;overflow:visible}
.wp-view span{display:inline-flex}

/* ---------- Homepage section ---------- */
.web-projects{padding-inline:var(--page);padding-top:var(--section-space)}
.wp-more{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 32px;margin-top:clamp(40px,5vw,64px);padding-top:28px;border-top:1px solid var(--line)}
.wp-more p{color:var(--muted);font-size:15px}

/* ---------- Card grid ---------- */
.wp-grid{list-style:none;margin:clamp(48px,6vw,88px) 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(44px,5vw,64px) clamp(20px,2.4vw,36px)}
.wp-card a{display:flex;flex-direction:column;gap:18px;color:inherit;text-decoration:none;height:100%}
.wp-thumb{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;background:var(--soft);border:1px solid var(--line)}
.wp-thumb img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center;transition:transform .6s var(--ease)}
.wp-card a:hover .wp-thumb img{transform:scale(1.03)}
.wp-thumb-empty{display:grid;place-items:center;width:100%;height:100%;color:var(--muted);font-size:clamp(48px,6vw,84px);font-weight:500;letter-spacing:-.04em;line-height:1}
.wp-card-body{display:flex;flex-direction:column;gap:6px}
.wp-number{color:var(--muted);font-size:12px;font-weight:560;letter-spacing:.1em}
.wp-title{font-size:clamp(20px,1.7vw,24px);font-weight:520;letter-spacing:-.025em;line-height:1.2}
.wp-summary{color:var(--muted);font-size:15px;line-height:1.5}
.wp-view{display:inline-flex;align-items:center;gap:8px;width:fit-content;margin-top:8px;padding-bottom:3px;border-bottom:1px solid;font-size:15px;font-weight:540}
.wp-view span{transition:transform .22s var(--ease)}
.wp-card a:hover .wp-view span{transform:translateX(3px)}
.wp-card a:focus-visible{outline:2px solid var(--ink);outline-offset:6px}

/* ---------- /web-projects/ page ---------- */
.wp-heading h1,.wp-article-header h1{letter-spacing:-.05em;text-wrap:balance;max-width:880px;font-size:clamp(44px,5.6vw,86px);font-weight:500;line-height:1}
.wp-page{padding:calc(var(--nav-height) + clamp(40px,6vh,90px)) var(--page) var(--section-space)}
.wp-heading h1{margin-top:20px}
.wp-intro{max-width:620px;margin-top:24px;color:var(--muted);font-size:clamp(17px,1.35vw,20px);line-height:1.55}
.wp-empty{margin-top:48px;color:var(--muted);font-size:17px}
.wp-actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px 28px;margin-top:32px}

/* ---------- Individual project page ---------- */
.wp-article{padding:calc(var(--nav-height) + clamp(32px,5vh,64px)) var(--page) 0}
.wp-draft-note{margin-bottom:28px;padding:12px 16px;border:1px solid #e3cf8a;background:#fbf3d9;font-size:14px}
.wp-breadcrumb{display:flex;flex-wrap:wrap;gap:10px;color:var(--muted);font-size:14px}
.wp-breadcrumb a{color:var(--ink);border-bottom:1px solid var(--line)}
.wp-breadcrumb a:hover{border-bottom-color:currentColor}
.wp-article-header{margin-top:clamp(40px,6vw,80px)}
.wp-article-header h1{margin-top:20px}
.wp-lead{max-width:680px;margin-top:24px;color:var(--muted);font-size:clamp(18px,1.5vw,22px);line-height:1.5}
.wp-article-image{margin-top:clamp(40px,5vw,72px);background:var(--soft);border:1px solid var(--line)}
.wp-article-image img{display:block;width:100%;height:auto}
.wp-article-image .wp-thumb-empty{aspect-ratio:16/9;height:auto;font-size:clamp(72px,12vw,160px)}
.wp-article-body{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);gap:8vw;margin-top:clamp(48px,6vw,96px)}
.wp-article-text{max-width:720px}
.wp-article-text p{font-size:clamp(17px,1.35vw,20px);line-height:1.65}
.wp-article-text p+p{margin-top:1.1em}
.wp-facts{display:grid;align-content:start;gap:24px;margin:0;padding-top:24px;border-top:1px solid var(--line)}
.wp-facts:only-child{grid-column:1/-1;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.wp-facts div{display:flex;flex-direction:column;gap:6px}
.wp-facts dt{color:var(--muted);font-size:12px;font-weight:560;letter-spacing:.1em;text-transform:uppercase;line-height:1.5}
.wp-facts dd{margin:0;font-size:17px;font-weight:520;letter-spacing:-.01em;overflow-wrap:anywhere}
.wp-facts .text-link{font-size:inherit}
.wp-pager{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:24px;margin-top:var(--section-space);padding:28px 0 clamp(56px,8vw,96px);border-top:1px solid var(--line)}
.wp-pager-prev,.wp-pager-next{display:flex;flex-direction:column;gap:8px}
.wp-pager-next{text-align:right;align-items:flex-end}
.wp-pager strong{font-size:clamp(18px,1.6vw,22px);font-weight:520;letter-spacing:-.02em}
.wp-pager-prev:hover strong,.wp-pager-next:hover strong{text-decoration:underline;text-underline-offset:4px}

/* ---------- Responsive ---------- */
@media (width<=1050px){
  .wp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (width<=767px){
  .wp-heading h1,.wp-article-header h1{letter-spacing:-.045em;font-size:clamp(38px,11vw,54px);line-height:1.02}
  .wp-grid{grid-template-columns:1fr;gap:44px}
  .wp-article-body{grid-template-columns:1fr;gap:40px}
  .wp-pager{grid-template-columns:1fr 1fr}
  .wp-pager-all{grid-column:1/-1;grid-row:2;justify-self:start}
}
@media (prefers-reduced-motion:reduce){
  .wp-thumb img,.wp-view span{transition:none}
}

/* ---------- Services, industries & London pages (sv-*) ---------- */
.sv-page{padding-bottom:0}
.sv-intro{margin-top:clamp(48px,6vw,96px)}
.sv-prose{max-width:760px}
.sv-section{margin-top:var(--section-space);padding-top:28px;border-top:1px solid var(--line)}
.sv-section-head{display:flex;flex-direction:column;gap:16px;max-width:820px}
.sv-section-head h2{font-size:clamp(30px,3.4vw,52px);font-weight:500;letter-spacing:-.04em;line-height:1.05;text-wrap:balance}
.sv-features{list-style:none;margin:clamp(36px,4vw,56px) 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(32px,4vw,48px) clamp(20px,2.4vw,36px)}
.sv-features li{display:flex;flex-direction:column;gap:10px;padding-top:20px;border-top:1px solid var(--line)}
.sv-features h3{font-size:clamp(18px,1.5vw,21px);font-weight:540;letter-spacing:-.02em;line-height:1.25}
.sv-features p{color:var(--muted);font-size:16px;line-height:1.55}
.sv-numbered{grid-template-columns:repeat(4,minmax(0,1fr))}
.sv-links{list-style:none;margin:clamp(36px,4vw,56px) 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 clamp(20px,2.4vw,36px)}
.sv-links a{display:flex;flex-direction:column;gap:8px;height:100%;padding:22px 0 26px;border-top:1px solid var(--line);color:inherit;text-decoration:none}
.sv-links strong{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:clamp(18px,1.5vw,21px);font-weight:540;letter-spacing:-.02em}
.sv-links strong .icon{transition:transform .22s var(--ease)}
.sv-links a:hover strong .icon{transform:translateX(4px)}
.sv-links a:hover strong{text-decoration:underline;text-underline-offset:4px}
.sv-links span{color:var(--muted);font-size:15px;line-height:1.5}
.sv-chips{list-style:none;margin:32px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:10px}
.sv-chips a{display:inline-flex;padding:9px 16px;border:1px solid var(--line);border-radius:999px;color:inherit;font-size:15px;font-weight:520;text-decoration:none;transition:border-color .2s,background .2s}
.sv-chips a:hover{border-color:var(--ink);background:var(--soft)}
.sv-grid{margin-top:clamp(36px,4vw,56px)}
.sv-more{margin-top:40px}
.sv-faq{margin-top:clamp(32px,4vw,48px);max-width:900px}
.sv-faq details{border-top:1px solid var(--line)}
.sv-faq details:last-child{border-bottom:1px solid var(--line)}
.sv-faq summary{display:flex;justify-content:space-between;gap:24px;padding:22px 0;cursor:pointer;list-style:none;font-size:clamp(17px,1.4vw,20px);font-weight:520;letter-spacing:-.015em}
.sv-faq summary::-webkit-details-marker{display:none}
.sv-faq summary::after{content:"+";flex:none;font-weight:400;font-size:1.3em;line-height:1}
.sv-faq details[open] summary::after{content:"\2212"}
.sv-faq details p{max-width:760px;padding-bottom:24px;color:var(--muted);font-size:17px;line-height:1.6}
.sv-cta{margin:var(--section-space) calc(var(--page) * -1) 0;padding:clamp(56px,8vw,112px) var(--page);background:var(--ink);color:var(--paper,#f8f7f3)}
.sv-cta h2{max-width:900px;font-size:clamp(36px,4.6vw,72px);font-weight:500;letter-spacing:-.045em;line-height:1.02;text-wrap:balance}
.sv-cta p{max-width:620px;margin-top:20px;opacity:.75;font-size:clamp(17px,1.35vw,20px);line-height:1.55}
.sv-cta .button{background:var(--paper,#f8f7f3);color:var(--ink)}
.sv-cta .text-link{color:inherit}
.sv-related{padding-bottom:8px}
.site-footer .sv-footer-links{grid-column:1/-1;display:grid;justify-content:stretch;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px;padding-bottom:40px;margin-bottom:8px;border-bottom:1px solid var(--line);width:100%}
.sv-footer-links h2{margin-bottom:14px;color:var(--muted);font-size:12px;font-weight:560;letter-spacing:.1em;text-transform:uppercase}
.sv-footer-links ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.site-footer .sv-footer-links a{padding-block:0;color:inherit;font-size:15px;text-decoration:none}
.sv-footer-links a:hover{text-decoration:underline;text-underline-offset:3px}
@media (width<=1050px){
  .sv-features,.sv-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sv-numbered{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (width<=767px){
  .sv-features,.sv-links,.sv-numbered,.site-footer .sv-footer-links{grid-template-columns:1fr}
}

/* ---------- Mobile menu fix (portfolio homepage) ----------
   The header's backdrop blur makes iPhone Safari position the fixed menu
   inside the 64px header, so only a sliver showed. Drop the blur while
   the menu is open and give the panel an explicit full-screen height. */
@media (width<=767px){
  body.menu-open .site-header{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--paper)}
  .mobile-navigation:not([hidden]){top:var(--nav-height);right:0;bottom:auto;left:0;height:calc(100vh - var(--nav-height));height:calc(100dvh - var(--nav-height));overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;z-index:49}
  .mobile-navigation a{font-size:28px;padding-block:14px}
}

/* Project images: one frame size, whatever the source image's shape. */
.project-visual img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:center;background:var(--soft)}
.project-feature .project-visual img,.project-dark .project-visual img,.project-wide .project-visual img{aspect-ratio:16/9;max-height:none}
.project-split .project-visual,.project-split-reverse .project-visual{align-self:start}
@media (width<=767px){
  .project-visual img,.project-feature .project-visual img,.project-dark .project-visual img{aspect-ratio:16/10}
}
@media (width>767px){.project-split-reverse .project-inner{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}}
