/* Carries the redesigned look (Portfolio, Approach) onto the case study, Consulting and Experience pages.
   It retunes the Modernist tokens and component classes; page content and layout are untouched.
   Remove this file's <link> from a page to return that page to the original look. */
/* Fonts come from the design system's own @import; requesting them twice cost an extra round trip. */

html:root {
  --paper: #cddef4;
  --ink: #201e1d;
  --acc: var(--color-accent);
  --ease: cubic-bezier(.2,.7,0,1);
  --color-bg: #cddef4;
  --color-surface: #c0d2e8;
  --font-heading: "Archivo", system-ui, sans-serif;
  --font-heading-weight: 800;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
body { position: relative; -webkit-font-smoothing: antialiased; }
::selection { background: var(--acc); color: var(--paper); }

/* scroll progress */
@supports (animation-timeline: scroll()) {
  html::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; background: var(--acc); transform-origin: left; transform: scaleX(0); animation: rd-progress linear both; animation-timeline: scroll(root); pointer-events: none; }
  @keyframes rd-progress { to { transform: scaleX(1); } }
}

/* angular wedge behind the hero */
body::after { content: ""; position: absolute; top: 0; right: 0; width: clamp(120px, 22vw, 360px); aspect-ratio: 1; background: var(--acc); clip-path: polygon(100% 0, 100% 100%, 0 0); z-index: -1; pointer-events: none; animation: rd-wedge 1.4s cubic-bezier(.7,0,.2,1) .2s both; }
@keyframes rd-wedge { from { clip-path: polygon(100% 0, 100% 0, 100% 0); } }

/* type */
h1, h2 { letter-spacing: -0.045em !important; }
h3, h4 { letter-spacing: -0.03em !important; }
h1 { line-height: .94 !important; }
h2 { line-height: 1 !important; }
h1 [style*="color: var(--color-accent)"], h2 [style*="color: var(--color-accent)"] { font-family: "Fraunces", Georgia, serif !important; font-style: italic; font-weight: 400 !important; letter-spacing: -0.03em; }
blockquote, [data-scrub] { font-family: "Fraunces", Georgia, serif !important; font-weight: 400 !important; letter-spacing: -0.02em !important; }

/* nav */
.nav { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); min-height: 68px; gap: clamp(16px, 2.6vw, 36px); }
.nav-brand { font-size: 15px; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 10px; }
.nav-brand::before { content: ""; width: 14px; height: 14px; background: var(--acc); clip-path: polygon(0 0, 100% 0, 0 100%); }
.nav a:not(.btn):not(.nav-brand) { position: relative; font-weight: 600; padding: 6px 0; }
.nav a:not(.btn):not(.nav-brand)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:not(.btn):not(.nav-brand):hover::after, .nav a:not(.btn):not(.nav-brand):focus-visible::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 8px 18px; padding-block: 12px; }
  .nav-brand { flex: 1 0 100%; margin-right: 0; }
  .nav a:not(.btn):not(.nav-brand) { font-size: 13px; }
  .nav .btn-primary { margin-left: auto; }
}

/* buttons */
.btn { font-weight: 600; letter-spacing: .01em; }
.btn-primary { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--paper); padding: 14px 24px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%); }
.btn-primary::before { content: ""; position: absolute; inset: 0 -30%; z-index: -1; background: var(--acc); transform: translateX(-102%) skewX(-24deg); transition: transform .6s var(--ease); }
.btn-primary:hover, .btn-primary:active { background: var(--ink); color: var(--paper); }
.btn-primary:hover::before, .btn-primary:focus-visible::before { transform: translateX(0) skewX(-24deg); }
/* The nav CTA matches the ".cta sm" button on the Portfolio and Approach pages exactly. */
.nav .btn-primary {
  gap: 14px; padding: 11px 18px; font-size: 13px; font-weight: 600; letter-spacing: .01em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  /* the design system's `.nav a { color: inherit }` outranks `.btn-primary`,
     which left the label the same ink as the button. Two classes beat class+type. */
  color: var(--paper);
}
.nav .btn-primary:hover, .nav .btn-primary:active, .nav .btn-primary:focus-visible { color: var(--paper); }
.nav .btn-primary:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.btn-ghost:not(.btn-icon) { color: var(--ink); font-weight: 700; padding: 6px 0; background: linear-gradient(var(--acc), var(--acc)) left bottom / 100% 2px no-repeat; transition: background-size .5s var(--ease), color .3s; }
.btn-ghost:not(.btn-icon):hover, .btn-ghost:not(.btn-icon):active { background-color: transparent; background-size: 30% 2px; color: var(--acc); }
.btn-icon { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); transition: background .3s, color .3s; }
.btn-icon:hover { background: var(--ink); color: var(--paper); }

/* tags */
.tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; }
.tag-outline { border: 0; box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
.tag-accent { background: var(--acc); color: var(--paper); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }

/* imagery: cut corner */
figure:has(> img:only-child), figure:has(> image-slot:only-child), figure:has(> video:only-child) { clip-path: polygon(0 0, 100% 0, 100% calc(100% - clamp(14px, 2vw, 28px)), calc(100% - clamp(14px, 2vw, 28px)) 100%, 0 100%); }

/* closing contact band */
#contact, #inquire { position: relative; background: var(--ink) !important; color: var(--paper) !important; clip-path: polygon(0 clamp(32px, 6vw, 96px), 100% 0, 100% 100%, 0 100%); padding-top: clamp(24px, 4vw, 64px); margin-top: clamp(32px, 5vw, 72px); }
#contact h2, #inquire h2 { letter-spacing: -0.055em !important; line-height: .9 !important; }
#contact .btn-ghost, #inquire .btn-ghost { color: var(--paper); }
#contact .btn-ghost:hover, #inquire .btn-ghost:hover { color: var(--acc); }
#contact::after { content: ""; position: absolute; right: 0; bottom: 0; width: clamp(96px, 16vw, 260px); aspect-ratio: 1; background: var(--acc); clip-path: polygon(100% 0, 100% 100%, 0 100%); pointer-events: none; }
#inquire form, #inquire [data-sent] { color: var(--ink); }
#inquire form .btn-ghost, #inquire [data-sent] .btn-ghost { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .btn-primary::before, .btn-ghost, .nav a::after { transition: none !important; }
}

/* B11 — skip link, visible only when focused */
.skip { position: absolute; left: -9999px; top: 0; z-index: 60; background: var(--ink); color: var(--paper);
  padding: 12px 18px; font-size: 14px; font-weight: 600; }
.skip:focus { left: 8px; top: 8px; outline: 2px solid var(--acc); outline-offset: 2px; }
