/* Frame Digital: shared styles for every page. styleguide.html shows each of these in use.
   Each page keeps its own <style> block for its own layout only; anything that appears on more than one page lives here. */

/* ---------- tokens ---------- */
:root{
  --ink:#0a0a0a;          /* text and black blocks */
  --paper:#fff;           /* background */
  --mute:#8d8d8d;         /* secondary text */
  --rule:rgba(10,10,10,.16); /* every divider line */
  --dim:#c4c4c4;          /* the other items in a list while one is hovered */
  --ph:#f1f1f1;           /* image placeholder, behind images while they load */
  --g:24px;               /* outer margin and column gap */
  --sp:200px;             /* space between sections */
  --ease:cubic-bezier(.7,0,.2,1);      /* moves that start and stop (panels, underlines) */
  --ease-out:cubic-bezier(.2,.75,.15,1) /* moves that land (letters, arrows, content coming in) */
}
@media (max-width:760px){:root{--g:16px;--sp:120px}}

/* ---------- base ---------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
ul,ol{list-style:none}
body{background:var(--paper);color:var(--ink);font:400 15px/1.4 var(--sans);font-synthesis:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
img,video{display:block;width:100%;height:100%;object-fit:cover}
:focus-visible{outline:1px solid currentColor;outline-offset:4px}

/* ---------- type ---------- */
.brand{font-family:var(--serif);font-weight:400;letter-spacing:0;text-transform:none}
.lab{font-size:13px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.mute{color:var(--mute)}
/* page title: one size on every page */
/* (the home statement is clamp(32px,4.4vw,72px); this sits between that and the old 140px) */
.pt{font-family:var(--serif-light);font-weight:400;font-size:min(104px,7.2vw);line-height:1;letter-spacing:-.02em}
/* large heading: a service or project name */
.hl{font-family:var(--serif-light);font-weight:400;font-size:clamp(44px,5.2vw,88px);line-height:1;letter-spacing:-.02em}
/* small heading: a module on a reading page ("What syncs", "Results") */
.sec{font-family:var(--serif-light);font-weight:400;font-size:35px;line-height:45px}
/* statement: the one-sentence summary beside a page's text */
.stmt{font-family:var(--serif-light);font-weight:400;font-size:42px;line-height:1.15;letter-spacing:-.01em}
/* subheading inside running text */
.sec2{margin-bottom:20px;font-size:28px;line-height:1.25;font-weight:600;letter-spacing:-.01em}
/* body copy is 17 px everywhere: paragraphs, answers, lists. 19 px is only for a description or line under a heading */
.body p{margin-bottom:1.15em;font-size:17px;line-height:1.5}
.body p:last-child{margin-bottom:0}
.small{font-size:17px;line-height:1.5}
.bl{margin-top:32px;display:flex;flex-direction:column;gap:12px;font-size:17px;line-height:1.5}
.bl li{position:relative;padding-left:26px}
.bl li::before{content:'';position:absolute;left:0;top:.6em;width:7px;height:7px;border-radius:50%;background:currentColor}
@media (max-width:760px){.stmt{font-size:30px}}

/* ---------- lines and images ---------- */
.rule{border-top:1px solid var(--rule)}
.ph{background:var(--ph);overflow:hidden}
/* .mono{filter:grayscale(1)} stock and studio photos in black and white; client work stays in colour.
   Switched off to see the stock photos in colour: take the comment marks off to switch it back on */

/* ---------- header: 22 px from the top, 24 px logo, nav in small caps; Services and Studio drop off on phones ----------
   The logo and nav are fixed, so the header never moves, on scroll or between pages. .bar stays in the page as a 104 px
   spacer. Drawn white with difference blending, they read black on paper and white over black sections and images.
   z-index 45: over the page and transition copies, under full-screen overlays (menus, the home page's crash screens) */
.bar{position:relative;display:flex;align-items:flex-start;justify-content:space-between;padding:22px var(--g);height:104px}
.bar .brand,.bar nav{position:fixed;top:22px;z-index:45;color:#fff;mix-blend-mode:difference}
html.attop .bar .brand,html.attop .bar nav{position:absolute} /* at the very top: pulled down with the page (site.js) */
.bar .brand{left:var(--g);font-size:24px;line-height:1}
.bar nav{right:var(--g);display:flex;gap:22px}
@media (max-width:760px){.bar nav a:nth-child(2),.bar nav a:nth-child(3){display:none}}

/* ---------- page header: title 168 px from the top (header 104 + 64), optional intro line, 192 px to the content ---------- */
.phead{padding:64px var(--g) 192px;text-align:center}
.pintro{font-size:19px;line-height:1.5;max-width:34ch;margin:32px auto 0;opacity:.8}
@media (max-width:760px){.phead{padding:40px var(--g) 112px}.pt{font-size:11vw}.pintro{font-size:17px}}

/* the title drops in letter by letter (split into .wd words and .lt letters by site.js, or by the page's own script).
   Each word clips its own letters, so a wrapped second line stays hidden until it drops */
.wd{display:inline-block;white-space:nowrap;overflow:hidden;vertical-align:top;padding:0 .04em .16em;margin:0 -.04em -.16em}
.lt{display:inline-block}
.drop .lt{animation:fall .75s var(--ease-out) both;animation-delay:var(--d)}
/* letters wait 135% of their height above the line, so descenders are fully out of view */
@keyframes fall{from{transform:translateY(-135%)}to{transform:none}}
@media (prefers-reduced-motion:reduce){.drop .lt{animation:none}}

/* ---------- links and buttons ---------- */
/* underline that grows on hover; .on marks the current page */
.ul{background-image:linear-gradient(currentColor,currentColor);background-size:0 1px;background-position:0 100%;background-repeat:no-repeat;padding-bottom:2px;transition:background-size .5s var(--ease)}
.ul:hover,.ul.on{background-size:100% 1px}
/* main action: rounded outline button */
.pill{display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 22px;border:1px solid currentColor;border-radius:22px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;transition:background .3s,color .3s}
.pill:hover{background:var(--ink);color:var(--paper)}
/* action inside a section: small caps over a full underline, arrow moves on hover */
.cta{display:inline-flex;gap:14px;align-items:center;padding:18px 0 4px;border-bottom:1px solid currentColor;font-size:13px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
/* arrows: → within the site, ↓ down the page, ↗ to another site */
.arr{font-style:normal;display:inline-block;transition:transform .4s var(--ease-out)}
a:hover .arr{transform:translateX(6px)}
a:hover .arr.dn{transform:translateY(4px)}
/* a list of links: hovering one fades the rest */
.dims a{transition:color .2s}
.dims:hover a{color:var(--dim)}
.dims a:hover{color:var(--ink)}

/* ---------- cards (work listing, related work) ---------- */
.card{display:flex;flex-direction:column;gap:18px}
.frame{position:relative;display:block;aspect-ratio:4/3}
.clip{position:absolute;inset:0;overflow:hidden;clip-path:inset(0 round 2px);transition:clip-path .9s cubic-bezier(.2,.7,.1,1);background:var(--ph)}
.clip img{object-position:50% 0;transition:transform 1.2s cubic-bezier(.2,.7,.1,1)}
.card:hover .clip{clip-path:inset(3% round 2px)}
.card:hover .clip img{transform:scale(1.06)}
.cname{font-family:var(--serif-light);font-size:28px;line-height:1.1;letter-spacing:-.01em}

/* ---------- listing pages (services, contact): 12 columns ---------- */
/* a list under the page title: divider, small-caps label, then one row per item (Services chooser, Contact details) */
.pick{margin:0 var(--g);border-top:1px solid var(--rule)}
.pick h2{padding:18px 0 40px}
.pick a{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:baseline;padding:22px 0;border-bottom:1px solid var(--rule)}
.pick .q{font-family:var(--serif-light);font-size:clamp(26px,3.2vw,44px);line-height:1.1;letter-spacing:-.015em}
.pick .to{display:flex;gap:12px;align-items:baseline;white-space:nowrap}
/* a section: large heading and a line about it on the left (sticky), content on the right */
.svc{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--g);padding:var(--sp) var(--g) 0;scroll-margin-top:calc(104px - var(--sp))} /* a jump lands with the heading 104px from the top (under the fixed header), where it sticks */
.svc .side{grid-column:1/6;align-self:start;position:sticky;top:104px}
.svc .for{font-size:19px;line-height:1.5;max-width:26ch;margin-top:24px;opacity:.8}
.svc .body{grid-column:7/13;padding-top:8px}
.svc .cta{margin-top:8px}
@media (max-width:860px){
  .svc .side{grid-column:1/13;position:static;margin-bottom:48px}
  .svc .body{grid-column:1/13}
}
@media (max-width:760px){
  .pick h2{padding-bottom:16px}
  .pick a{grid-template-columns:1fr;gap:4px;padding:18px 0}
  .pick .to{color:var(--mute)}
  .pick.dims:hover a{color:inherit}
  .svc{scroll-margin-top:calc(88px - var(--sp))}
  .svc .for{font-size:17px}
}

/* ---------- reading pages (case study, integration): 8 columns, text held in the middle six ---------- */
.g8{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));column-gap:var(--g);padding:0 var(--g)}
.L{grid-column:2 / span 2}.C{grid-column:4 / span 4}.W{grid-column:2 / span 6}.LL{grid-column:2 / span 3}.RR{grid-column:5 / span 3}
.A{grid-column:2 / span 4} /* two thirds of the content width, from the left edge (text module 15b) */
.stick{position:sticky;top:104px;align-self:start;display:flex;flex-direction:column;gap:48px}
.mod{padding-top:var(--sp)}
.gap{height:72px}
.pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--g);row-gap:48px}
/* rows of two columns on a rule: a name, then its value in bold ("What syncs", contact details, form fields).
   Each row is a .rule; end the list with an empty .rule to close it */
.flow>*{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--g);padding:18px 0}
.flow dd,.flow .v{font-weight:600}
/* common questions: question in the serif, answer under it in plain text, so each answer can be quoted on its own
   (integration pages, Studio). Each question is a .rule; end with an empty .rule */
.qa div{padding:28px 0 32px}
.qa dt{font-family:var(--serif-light);font-size:26px;line-height:1.2;margin-bottom:12px}
.qa dd{font-size:17px;line-height:1.5;opacity:.8;max-width:56ch}
@media (max-width:760px){.qa dt{font-size:22px}}
@media (max-width:1100px){.L{grid-column:1 / span 3}.C{grid-column:4 / span 5}.W{grid-column:1 / -1}.LL{grid-column:1 / span 4}.RR{grid-column:5 / span 4}.A{grid-column:1 / span 5}}
@media (max-width:760px){
  .g8{grid-template-columns:minmax(0,1fr);row-gap:28px}
  .L,.C,.W,.LL,.RR,.A{grid-column:1 / -1}
  .stick{position:static}.gap{height:48px}
  .pair{grid-template-columns:minmax(0,1fr)}
}

/* ---------- page transitions (site.js picks one by what was clicked) ---------- */
/* copies of an image or a line of text that ride over the page swap */
.ghost{position:fixed;z-index:44;pointer-events:none;overflow:hidden}
.ghost img{width:100%;height:100%;object-fit:cover}
.gtext{position:fixed;z-index:44;pointer-events:none;font-family:var(--serif-light);font-weight:400;line-height:1;white-space:nowrap;transform-origin:0 0;color:var(--ink)}
/* the new page, as it is put in: held back until its transition plays */
.fdin{transition:opacity .6s ease,transform .8s var(--ease-out)}
html.arrive .fdin{opacity:0;transform:translateY(24px)}   /* the rest of the page builds in around the title */
html.arrive.up .fdin{transform:translateY(-24px)}          /* going up a level: it comes down instead */
html.arrive.still .fdin{transform:none}                    /* back/forward: a plain fade */
html.hidet #swup .phead .pt,html.hidet #fd-ttl .pt,
html.itemin #swup .phead .pt{visibility:hidden}            /* the title waits for its drop, or for the moving name */
html.cardin #fd-hero img{visibility:hidden}                /* the hero waits for the image growing out of the card */
html.cardin #fd-hero{background:none}                      /* without its grey placeholder showing behind the moving image */
html.navin .bar .ul.on{background-size:0 1px}              /* the current page's underline grows in */

/* ---------- the end of the page: keep scrolling past the bottom and one more footer row opens under it (site.js) ---------- */
.eof{background:var(--ink);color:var(--paper)}
.eofr p{margin:0;padding:18px var(--g)}
.eofr+.eofr p{padding-top:0} /* the second line sits straight under the first */
.eofr:last-child p{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
.eof a{margin-left:14px}

/* ---------- footer: the same on every page ---------- */
footer{display:flex;flex-wrap:wrap;gap:16px 32px;padding:18px var(--g) 24px;border-top:1px solid var(--rule)}
footer span:last-child{margin-left:auto;font-weight:400}
