/*
Theme Name: Envision Creative
Theme URI: https://www.envisionsolutions.net
Author: Envision Creative
Author URI: https://www.envisionsolutions.net
Description: Dark cinematic theme with a hand-drawn naive line-art layer, built for Envision Creative — the agency arm of Envision Solutions. Includes an animated brand mark, a scroll-driven doodle system and an editable Portfolio post type.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: envision-creative
Tags: portfolio, one-column, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   ENVISION CREATIVE — Design System
   Dark cinematic canvas + naive hand-drawn line art
   Brand: navy #052748 · blue #1095DD
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted variable) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* Ink & surfaces */
  --ink:        #03111E;
  --ink-2:      #061B2E;
  --navy:       #052748;
  --navy-lift:  #08304F;

  /* Brand */
  --blue:       #1095DD;
  --blue-hi:    #45B8F5;
  --blue-dim:   rgba(16, 149, 221, .16);

  /* Paper */
  --paper:      #F4F1EA;
  --paper-70:   rgba(244, 241, 234, .70);
  --paper-45:   rgba(244, 241, 234, .45);
  --paper-25:   rgba(244, 241, 234, .25);
  --line:       rgba(244, 241, 234, .12);
  --line-soft:  rgba(244, 241, 234, .06);

  /* Type */
  --display: "Fraunces", "Recoleta", Georgia, "Times New Roman", serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --hand:    "Caveat", "Bradley Hand", cursive;

  /* Scale */
  --step--1: clamp(.80rem, .77rem + .15vw, .88rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3:  clamp(2.1rem, 1.6rem + 2.4vw, 3.8rem);
  --step-4:  clamp(2.6rem, 1.6rem + 4.2vw, 5rem);
  --step-5:  clamp(3rem, 1.7rem + 5.4vw, 6.4rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --bay:    clamp(4.5rem, 10vw, 10rem);
  --max:    1440px;

  /* Motion */
  --ease-out:  cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-pop:  cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 350;
  line-height: 1.62;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; }

::selection { background: var(--blue); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 4px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; top: -100px; left: var(--gutter); z-index: 999;
  background: var(--blue); color: #fff; padding: .7rem 1.2rem; border-radius: 999px;
  font-size: var(--step--1); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.03em;
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 100;
}

.display-xl { font-size: var(--step-5); }
.display-l  { font-size: var(--step-4); }
.display-m  { font-size: var(--step-3); }
.display-s  { font-size: var(--step-2); line-height: 1.05; }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-hi);
  display: flex; align-items: center; gap: .8rem;
}
/* The eyebrow marker is the eye, not a rule. Everything that leads a heading
   on this site belongs to the same mark, so the dash was retired: the shape is
   masked rather than drawn, which keeps it one colour token and one element. */
:root {
  --eye-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Cpath d='M2 10c4-7 22-7 26 0-4 7-22 7-26 0Z' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'/%3E%3Ccircle cx='15' cy='10' r='3.2' fill='%23000'/%3E%3C/svg%3E");
}
.eyebrow::before {
  content: ""; width: 24px; height: 15px; flex: none;
  background: var(--blue);
  -webkit-mask: var(--eye-mask) center / contain no-repeat;
  mask: var(--eye-mask) center / contain no-repeat;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--paper-70);
  font-weight: 300;
  max-width: 42ch;
}

.scrawl {
  font-family: var(--hand);
  font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem);
  color: var(--blue-hi);
  font-weight: 600;
  line-height: 1;
  transform: rotate(-4deg);
  display: inline-block;
}

.tint { color: var(--blue-hi); }
.muted { color: var(--paper-45); }

/* Ink-swipe underline for key words */
.mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.mark svg {
  position: absolute;
  left: -2%; bottom: -.18em;
  width: 104%; height: .42em;
  overflow: visible;
  pointer-events: none;
}
.mark svg path {
  fill: none; stroke: var(--blue); stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 420; stroke-dashoffset: 420;
}
.is-in .mark svg path {
  animation: draw 1s var(--ease-out) .35s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- 4. Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.bay { padding-block: var(--bay); position: relative; }
.bay--tight { padding-block: calc(var(--bay) * .6); }

.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- 5. Naive line-art doodles ---------- */
.doodle {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.doodle path, .doodle circle, .doodle line, .doodle polyline {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len, 600);
  stroke-dashoffset: var(--len, 600);
  transition: stroke-dashoffset 1.4s var(--ease-out);
}
.is-in .doodle path,
.is-in .doodle circle,
.is-in .doodle line,
.is-in .doodle polyline { stroke-dashoffset: 0; }

.doodle--dim path, .doodle--dim circle, .doodle--dim line, .doodle--dim polyline { stroke: var(--paper-25); }
.doodle--hi path, .doodle--hi circle { stroke: var(--blue-hi); }
.doodle--thin path, .doodle--thin circle, .doodle--thin line { stroke-width: 2.2; }
.doodle--fat path, .doodle--fat circle { stroke-width: 4.5; }

/* --- idle motion: the marks never sit still --- */
@keyframes dFloat  { 0%,100% { transform: translateY(0)   rotate(0deg); }
                     50%     { transform: translateY(-14px) rotate(0deg); } }
@keyframes dSway   { 0%,100% { transform: rotate(-7deg); }
                     50%     { transform: rotate(7deg); } }
@keyframes dDrift  { 0%,100% { transform: translate(0,0) rotate(0deg); }
                     33%     { transform: translate(12px,-10px) rotate(4deg); }
                     66%     { transform: translate(-9px,7px) rotate(-3deg); } }
@keyframes dSpin   { to      { transform: rotate(360deg); } }
@keyframes dPulse  { 0%,100% { transform: scale(1)    rotate(0deg); }
                     50%     { transform: scale(1.16) rotate(6deg); } }
@keyframes dWiggle { 0%,100% { transform: translateX(0) rotate(0deg); }
                     25%     { transform: translateX(5px)  rotate(4deg); }
                     75%     { transform: translateX(-5px) rotate(-4deg); } }

.doodle--float  { animation: dFloat  7s   var(--ease-soft) infinite; }
.doodle--sway   { animation: dSway   6.5s var(--ease-soft) infinite; }
.doodle--drift  { animation: dDrift  14s  var(--ease-soft) infinite; }
.doodle--spin   { animation: dSpin   28s  linear infinite; }
.doodle--pulse  { animation: dPulse  4.5s var(--ease-soft) infinite; }
.doodle--wiggle { animation: dWiggle 5s   var(--ease-soft) infinite; }

/* stagger so nothing beats in unison */
.doodle[data-delay="1"] { animation-delay: -1.4s; }
.doodle[data-delay="2"] { animation-delay: -2.9s; }
.doodle[data-delay="3"] { animation-delay: -4.3s; }
.doodle[data-delay="4"] { animation-delay: -5.8s; }

/* --- trace: the line keeps redrawing itself, forever --- */
.doodle--trace path,
.doodle--trace circle,
.doodle--trace polyline {
  transition: none;
  animation: dTrace 7s var(--ease-soft) infinite;
}
@keyframes dTrace {
  0%        { stroke-dashoffset: var(--len, 600); }
  40%, 58%  { stroke-dashoffset: 0; }
  100%      { stroke-dashoffset: calc(var(--len, 600) * -1); }
}

/* --- in-flow hand-drawn section divider --- */
.drule {
  width: 100%; height: 34px; margin-block: clamp(2rem, 5vw, 3.5rem);
  overflow: visible;
}
.drule svg { width: 100%; height: 100%; overflow: visible; }
.drule path {
  fill: none; stroke: var(--blue); stroke-width: 2.6;
  stroke-linecap: round; opacity: .55;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len, 3000); stroke-dashoffset: var(--len, 3000);
  transition: stroke-dashoffset 2.4s var(--ease-out);
}
.is-in .drule path { stroke-dashoffset: 0; }

/* --- scribbled underline under a figure --- */
.fig__scribble { width: 78px; height: 12px; overflow: visible; margin-top: .1rem; }
.fig__scribble path {
  fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 200; stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.1s var(--ease-out);
}
.is-in .fig__scribble path { stroke-dashoffset: 0; }
.fig:hover .fig__scribble path { stroke: var(--blue-hi); }

/* --- hand-drawn oval circling a phrase --- */
.circled { position: relative; display: inline-block; }
.circled svg {
  position: absolute; left: -7%; top: -22%;
  width: 114%; height: 150%;
  overflow: visible; pointer-events: none;
}
.circled svg path {
  fill: none; stroke: var(--blue); stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len, 900); stroke-dashoffset: var(--len, 900);
  transition: stroke-dashoffset 1.6s var(--ease-out) .4s;
}
.is-in .circled svg path { stroke-dashoffset: 0; }

/* --- a scribble that appears when you hover a card --- */
.svc__scrib {
  position: absolute; right: 1.1rem; top: 1.1rem;
  width: 46px; height: 46px; overflow: visible;
  opacity: 0; transition: opacity .45s var(--ease-soft);
  pointer-events: none;
}
.svc__scrib path {
  fill: none; stroke: var(--blue-hi); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len, 190);
  stroke-dashoffset: var(--len, 190);
  transition: stroke-dashoffset .8s var(--ease-out);
}
.svc:hover .svc__scrib { opacity: 1; }
.svc:hover .svc__scrib path { stroke-dashoffset: 0; }

/* --- corner tick on a work card --- */
.work__scrib {
  position: absolute; z-index: 4; right: 1rem; top: 1rem;
  width: 40px; height: 40px; overflow: visible;
  opacity: 0; transition: opacity .5s var(--ease-soft);
  pointer-events: none;
}
.work__scrib path {
  fill: none; stroke: var(--blue-hi); stroke-width: 3.2;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len, 160);
  stroke-dashoffset: var(--len, 160);
  transition: stroke-dashoffset .9s var(--ease-out);
}
.work:hover .work__scrib { opacity: 1; }
.work:hover .work__scrib path { stroke-dashoffset: 0; }

/* ---------- 6. Buttons — drawn by hand, not by a border-radius ---------- */

/* irregular corner radii: the classic "sketched box" trick.
   Two different sets so the fill and the outline never agree. */
:root {
  --wonk-a: 255px 14px 225px 15px / 15px 225px 15px 255px;
  --wonk-b: 14px 225px 15px 255px / 225px 15px 255px 15px;
  --wonk-c: 200px 22px 190px 18px / 20px 190px 18px 210px;
}

.btn {
  --btn-bg: var(--blue);
  --btn-fg: #fff;
  --wobble: -.7deg;
  position: relative;
  display: inline-flex; align-items: center; gap: .7rem;
  padding: 1.05rem 2rem;
  background: transparent;          /* the fill lives on ::before so it can be roughened */
  color: var(--btn-fg);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  isolation: isolate;
  rotate: var(--wobble);
  transition: rotate .45s var(--ease-pop), translate .45s var(--ease-out), color .4s;
  will-change: rotate, translate;
}

/* pass one of the pen: the fill. Two-stop gradient at double height so the
   paper wipe is a background-position slide — survives the roughen filter. */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: var(--wonk-a);
  background: linear-gradient(var(--paper) 0 50%, var(--btn-bg) 50% 100%);
  background-size: 100% 200%;
  background-position: 0 100%;
  filter: url(#roughen-soft);   /* gentler on a solid fill than on a hairline */
  transition: background-position .55s var(--ease-out), border-radius .5s var(--ease-soft);
}

/* pass two: the outline, offset and leaning the other way, roughed up harder */
.btn::after {
  content: ""; position: absolute; inset: -5px -7px; z-index: -1;
  border: 2px solid var(--btn-fg);
  border-radius: var(--wonk-b);
  rotate: 1.1deg;
  opacity: .38;
  filter: url(#roughen);
  transition: rotate .5s var(--ease-pop), opacity .4s var(--ease-soft),
              inset .4s var(--ease-out), border-radius .5s var(--ease-soft);
  pointer-events: none;
}

.btn:hover {
  color: var(--navy);
  rotate: calc(var(--wobble) * -1.4);
  translate: 0 -2px;
}
.btn:hover::before { background-position: 0 0; border-radius: var(--wonk-c); }
.btn:hover::after {
  rotate: -2.2deg;
  opacity: .9;
  inset: -9px -12px;
  border-radius: var(--wonk-c);
}
.btn:active { rotate: calc(var(--wobble) * .3); translate: 0 1px; }

.btn svg { transition: transform .45s var(--ease-pop); flex: none; }
.btn:hover svg { transform: translateX(5px) rotate(12deg); }

/* alternate the lean and the shape so a row of buttons never lines up */
.btn:nth-of-type(even) { --wobble: .85deg; }
.btn:nth-of-type(even)::before { border-radius: var(--wonk-b); }
.btn:nth-of-type(even)::after  { border-radius: var(--wonk-a); rotate: -1.4deg; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --wobble: .95deg;
}
.btn--ghost::before { border: 2px solid var(--paper-25); }
.btn--ghost::after  { opacity: .22; }
.btn--ghost:hover::before { border-color: transparent; }
.btn--ghost:hover::after  { opacity: .75; }

/* The filters stay on for touch too — they only repaint once, and without them
   the buttons snap back to clean rectangles, which breaks the hand-drawn look. */

/* Text link with sliding rule */
.tlink {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding-bottom: .35rem;
  position: relative;
}
.tlink::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1.5px; background: currentColor;
  transform-origin: right; transform: scaleX(1);
  transition: transform .45s var(--ease-out);
}
.tlink:hover::after { transform-origin: left; animation: swipe .55s var(--ease-out); }
@keyframes swipe {
  0%   { transform: scaleX(1); transform-origin: right; }
  49%  { transform: scaleX(0); transform-origin: right; }
  50%  { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}
.tlink svg { transition: transform .45s var(--ease-out); }
.tlink:hover svg { transform: translateX(4px); }

/* ---------- 7. Header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-block: clamp(1rem, 2vw, 1.6rem);
  transition: background .5s var(--ease-soft), padding .5s var(--ease-soft),
              backdrop-filter .5s var(--ease-soft), border-color .5s;
  border-bottom: 1px solid transparent;
}
.hdr.is-stuck {
  background: rgba(3, 17, 30, .82);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line-soft);
  padding-block: .8rem;
}
.hdr__in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: flex; align-items: center; gap: .75rem; position: relative; z-index: 120; }
.brand__eye { width: 40px; height: 40px; flex: none; transition: transform .6s var(--ease-pop); }
.brand:hover .brand__eye { transform: rotate(-8deg) scale(1.08); }
.brand__wm { height: 30px; width: auto; }
@media (max-width: 560px) { .brand__wm { height: 24px; } .brand__eye { width: 32px; height: 32px; } }

.nav { display: flex; align-items: center; gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.nav a {
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper-70);
  position: relative; padding-block: .3rem;
  transition: color .35s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1.5px; background: var(--blue);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.hdr .btn { padding: .8rem 1.4rem; }
.nav .btn { display: none; }   /* only surfaces inside the mobile drawer */

.burger { display: none; width: 44px; height: 44px; position: relative; z-index: 120; }
.burger span {
  position: absolute; left: 11px; width: 22px; height: 2px; border-radius: 2px;
  background: var(--paper); transition: transform .45s var(--ease-out), opacity .3s;
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.is-open .burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.is-open .burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: block; }
  .hdr .btn--nav { display: none; }
  .nav {
    position: fixed; inset: 0;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: .4rem;
    padding: 0 var(--gutter);
    background: var(--navy);
    clip-path: circle(0% at calc(100% - 46px) 42px);
    transition: clip-path .8s var(--ease-out);
  }
  .is-open .nav { clip-path: circle(150% at calc(100% - 46px) 42px); }
  .nav a { font-family: var(--display); font-size: var(--step-3); text-transform: none; letter-spacing: -.02em; color: var(--paper); }
  .nav a::after { display: none; }
  /* .nav a above sets text-transform:none for the big drawer links — the
     button has to win that back, and needs more presence beside them. */
  .nav .btn {
    display: inline-flex;
    margin-top: 1.8rem;
    font-family: var(--sans);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 1rem 1.8rem;
  }
}

/* ---------- 8. Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-block: clamp(7rem, 12vh, 9rem) clamp(4rem, 9vh, 6rem);
  overflow: hidden;
}
.hero__glow {
  position: absolute; left: 50%; top: 32%;
  width: min(120vw, 1100px); aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(circle, rgba(16,149,221,.30) 0%, rgba(16,149,221,.08) 38%, transparent 66%);
  filter: blur(20px);
  pointer-events: none;
  animation: breathe 9s var(--ease-soft) infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.11); }
}

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero__in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: clamp(1.1rem, 2.2vh, 1.7rem); }

/* The animated mark */
.eyestage {
  width: clamp(118px, 14vw, 186px);
  aspect-ratio: 1;
  position: relative;
}
.eye-svg { width: 100%; height: 100%; overflow: visible; }
.eye-svg #eyeOutline, .eye-svg #eyePupil { fill: var(--paper); }
.eye-svg .ray { fill: var(--blue); }

/* halo ring behind the eye */
.eyestage::after {
  content: "";
  position: absolute; inset: -14%;
  border-radius: 50%;
  border: 1.5px dashed rgba(16,149,221,.30);
  opacity: 0;
  animation: ringIn 1.2s var(--ease-out) 1.5s forwards, spin 34s linear 1.5s infinite;
}
@keyframes ringIn { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- intro timeline --- */
#lidRect {
  transform-origin: 146px 198px;
  transform: scaleY(0);
}
.eye-svg #eyePupil { transform-origin: 141px 200px; transform: scale(0); }
.eye-svg .ray { transform: scale(0) translateY(14px); opacity: 0; }

.is-loaded #lidRect  { animation: lidOpen .95s var(--ease-out) .18s forwards; }
.is-loaded #eyePupil { animation: pupilIn .7s var(--ease-pop) .75s forwards; }
.is-loaded .ray      { animation: rayPop .6s var(--ease-pop) forwards; }
.is-loaded #rayTop   { animation-delay: 1.02s; }
.is-loaded #rayLeft  { animation-delay: 1.12s; }
.is-loaded #rayRight { animation-delay: 1.20s; }
.is-loaded #rayDash  { animation-delay: 1.30s; }

@keyframes lidOpen  { to { transform: scaleY(1); } }
@keyframes pupilIn  { to { transform: scale(1); } }
@keyframes rayPop   { to { transform: scale(1) translateY(0); opacity: 1; } }

/* blink (JS-triggered) */
.is-blinking #lidRect { animation: blink .32s var(--ease-soft); }
@keyframes blink {
  0%, 100% { transform: scaleY(1); }
  45%      { transform: scaleY(.02); }
}

/* pupil follows cursor — no CSS transition here, the rAF lerp in main.js
   does the smoothing. A transition on top of it only adds lag. */

.hero h1 { max-width: 22ch; text-wrap: balance; }
@media (max-width: 620px) { .hbr { display: none; } }
.hero .lede { max-width: 46ch; margin-inline: auto; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: .6rem; }

.hero__note { margin-top: .2rem; }
.hero__note .scrawl { transform: rotate(-2.2deg); }
@media (max-height: 720px), (hover: none) { .hero__note { display: none; } }

.scrollcue {
  position: absolute; right: var(--gutter); bottom: 2rem;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-size: .68rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--paper-25);
  z-index: 3;
}
.scrollcue__bar {
  width: 1.5px; height: 46px; background: var(--line);
  position: relative; overflow: hidden;
}
.scrollcue__bar::after {
  content: ""; position: absolute; inset: 0;
  background: var(--blue);
  animation: cue 2.2s var(--ease-soft) infinite;
}
@keyframes cue {
  0%   { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* keep the floating scatter clear of content on small screens —
   the in-flow dividers and scribbles stay, they can't collide */
@media (max-width: 900px) {
  .doodle { display: none; }
  .scrollcue { display: none; }
}
@media (min-width: 901px) and (max-width: 1240px) {
  .doodle { opacity: .55; }
}

/* ---------- 9. Ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--ink-2);
  padding-block: clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
  position: relative;
}
.ticker__track {
  display: flex; align-items: center; gap: 2.6rem;
  width: max-content;
  animation: roll 38s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes roll { to { transform: translateX(-50%); } }
.ticker__item {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--paper);
  white-space: nowrap;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}
.ticker__item:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--paper-25);
}
/* The separator between phrases is the eye, at ticker size. */
.ticker__eye { width: 26px; height: 17px; flex: none; }
.ticker__eye path, .ticker__eye circle { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linejoin: round; }

/* ---------- 10. Reveal ---------- */
.rv { opacity: 0; transform: translateY(34px); }
.is-in.rv, .is-in .rv {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.is-in .rv:nth-child(2) { transition-delay: .08s; }
.is-in .rv:nth-child(3) { transition-delay: .16s; }
.is-in .rv:nth-child(4) { transition-delay: .24s; }
.is-in .rv:nth-child(5) { transition-delay: .32s; }
.is-in .rv:nth-child(6) { transition-delay: .40s; }

/* Line-by-line statement reveal */
.stmt { font-size: var(--step-3); line-height: 1.12; max-width: 20ch; }
.stmt .ln { display: block; overflow: hidden; }
.stmt .ln > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--ease-out);
}
.is-in .stmt .ln > span { transform: none; }
.is-in .stmt .ln:nth-child(2) > span { transition-delay: .1s; }
.is-in .stmt .ln:nth-child(3) > span { transition-delay: .2s; }
.is-in .stmt .ln:nth-child(4) > span { transition-delay: .3s; }
.is-in .stmt .ln:nth-child(5) > span { transition-delay: .4s; }

/* ---------- 11. Split section ---------- */
.split {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: flex-start;
}
.split > * { flex: 1 1 100%; min-width: 0; }
@media (min-width: 900px) {
  .split > *:first-child { flex: 1 1 calc(52% - clamp(1rem, 2.5vw, 2.5rem)); }
  .split > *:last-child  { flex: 1 1 calc(48% - clamp(1rem, 2.5vw, 2.5rem)); }
}
.split__aside { display: flex; flex-direction: column; gap: 1.6rem; }

/* ---------- 12. Services ---------- */
/* Hairlines come from item borders so the container is a plain flex row —
   a grid gap over a background cannot be reproduced in an Elementor container. */
.svcs {
  display: flex; flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.svcs > * { flex: 1 1 100%; border-bottom: 1px solid var(--line); }
.svcs > *:last-child { border-bottom: 0; }
@media (min-width: 680px) {
  .svcs > * { flex: 1 1 50%; max-width: 50%; border-right: 1px solid var(--line); }
  .svcs > *:nth-child(2n) { border-right: 0; }
  .svcs > *:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 1040px) {
  .svcs > * { flex: 1 1 33.3333%; max-width: 33.3333%; border-right: 1px solid var(--line); }
  .svcs > *:nth-child(2n) { border-right: 1px solid var(--line); }
  .svcs > *:nth-child(3n) { border-right: 0; }
  .svcs > *:nth-last-child(-n+3) { border-bottom: 0; }
}

.svc {
  position: relative;
  background: var(--ink);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  display: flex; flex-direction: column; gap: 1rem;
  min-height: 290px;
  isolation: isolate;
  overflow: hidden;
  transition: background .6s var(--ease-soft);
}
.svc::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--navy) 0%, var(--ink-2) 100%);
  opacity: 0; transition: opacity .6s var(--ease-soft);
}
.svc:hover::before { opacity: 1; }

.svc__no {
  font-family: var(--sans);
  font-size: .72rem; letter-spacing: .2em;
  color: var(--paper-25);
  transition: color .5s;
}
.svc:hover .svc__no { color: var(--blue-hi); }

.svc__ico { width: 56px; height: 56px; overflow: visible; }
.svc__ico path, .svc__ico circle, .svc__ico line, .svc__ico polyline {
  fill: none; stroke: var(--blue); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 260; stroke-dashoffset: 260;
  transition: stroke-dashoffset 1.1s var(--ease-out), stroke .5s;
}
.is-in .svc__ico path, .is-in .svc__ico circle,
.is-in .svc__ico line, .is-in .svc__ico polyline { stroke-dashoffset: 0; }
.svc:hover .svc__ico path, .svc:hover .svc__ico circle,
.svc:hover .svc__ico line, .svc:hover .svc__ico polyline { stroke: var(--blue-hi); }

.svc h3 { font-size: var(--step-2); }
.svc p { color: var(--paper-45); font-size: .95rem; line-height: 1.6; }
.svc__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .8rem; }
.svc__tags span {
  font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--paper-45);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .7rem;
  transition: border-color .4s, color .4s;
}
.svc:hover .svc__tags span { border-color: rgba(16,149,221,.4); color: var(--paper-70); }

/* ---------- 13. Work teaser ---------- */
.works {
  display: flex; flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.works > * { flex: 1 1 100%; min-width: 0; }
@media (min-width: 760px) {
  .works > * { flex: 1 1 calc(50% - clamp(.5rem, 1vw, .8rem)); max-width: calc(50% - clamp(.5rem, 1vw, .8rem)); }
}

.work {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  display: block;
  isolation: isolate;
  transition: transform .7s var(--ease-out), border-color .5s;
  will-change: transform;
}
.work:hover { border-color: rgba(16,149,221,.45); }
@media (min-width: 760px) {
  .works > .work--wide { flex: 1 1 100%; max-width: 100%; aspect-ratio: 16 / 8; }
}

/* placeholder canvas until real imagery lands */
.work__ph {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 20% 15%, rgba(16,149,221,.34), transparent 60%),
    linear-gradient(150deg, var(--navy) 0%, var(--ink) 100%);
  transition: transform 1s var(--ease-out), filter .7s;
}
.work:hover .work__ph { transform: scale(1.06); filter: saturate(1.25); }
.work__ph::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,241,234,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,241,234,.045) 1px, transparent 1px);
  background-size: 42px 42px;
}
.work__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ghost typography inside the placeholder — swap out when real art lands */
.work__ghost {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.8rem, 4.2vw, 4rem);
  line-height: 1;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244,241,234,.20);
  text-align: center; padding-inline: 1rem;
  transition: -webkit-text-stroke-color .6s, transform 1s var(--ease-out);
  pointer-events: none;
}
.work:hover .work__ghost { -webkit-text-stroke-color: rgba(244,241,234,.42); transform: scale(1.04); }

/* scale the ghost to its own card, not the viewport */
@supports (container-type: inline-size) {
  .work { container-type: inline-size; }
  .work__ghost { font-size: 12cqw; }
}

.work__label {
  position: absolute; inset: auto 0 0 0; z-index: 3;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  background: linear-gradient(to top, rgba(3,17,30,.92) 12%, rgba(3,17,30,.5) 55%, transparent);
}
.work__label h3 { font-size: var(--step-2); }
.work__label p { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-hi); margin-bottom: .4rem; }
.work__go {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--navy);
  transform: scale(0) rotate(-40deg);
  transition: transform .55s var(--ease-pop);
}
.work:hover .work__go { transform: scale(1) rotate(0); }

.work__tape {
  position: absolute; z-index: 4; top: 1.1rem; left: 1.1rem;
  font-family: var(--hand); font-size: 1.05rem; font-weight: 700;
  color: var(--navy); background: var(--blue-hi);
  padding: .15rem .8rem; border-radius: 4px;
  transform: rotate(-3deg);
}

/* ---------- 14. Numbers ---------- */
.figs {
  display: flex; flex-wrap: wrap;
  border-block: 1px solid var(--line);
}
.figs > * { flex: 1 1 50%; max-width: 50%; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figs > *:nth-child(2n) { border-right: 0; }
.figs > *:nth-last-child(-n+2) { border-bottom: 0; }
@media (min-width: 900px) {
  .figs > * { flex: 1 1 25%; max-width: 25%; border-right: 1px solid var(--line); border-bottom: 0; }
  .figs > *:nth-child(2n) { border-right: 1px solid var(--line); }
  .figs > *:last-child { border-right: 0; }
}
.fig {
  background: var(--ink);
  padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1rem, 2vw, 2rem);
  display: flex; flex-direction: column; gap: .4rem; align-items: flex-start;
  transition: background .5s;
}
.fig:hover { background: var(--ink-2); }
.fig__n {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1; color: var(--paper);
  font-variation-settings: "SOFT" 20, "WONK" 1;
}
.fig__n em { font-style: normal; color: var(--blue); }
.fig__l { font-size: .82rem; color: var(--paper-45); line-height: 1.45; }

/* ---------- 15. Logo strip ---------- */
.strip { overflow: hidden; padding-block: clamp(1.4rem, 2.5vw, 2rem); }
.strip__track { display: flex; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); width: max-content; animation: roll 42s linear infinite; }
.strip__track--rev { animation-direction: reverse; }
.strip:hover .strip__track { animation-play-state: paused; }
.strip__item {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  letter-spacing: -.01em;
  color: var(--paper-25);
  white-space: nowrap;
  transition: color .4s;
}
.strip__item:hover { color: var(--paper); }

/* ---------- 16. Parent-company band ---------- */
.band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ink-2) 70%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.8rem);
  display: flex; flex-wrap: wrap; gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* :first-of-type would also match the button (first <a>), stretching it. */
.band > div { flex: 1 1 320px; min-width: 0; }
.band > .btn { flex: 0 0 auto; }
@media (min-width: 880px) { .band { flex-wrap: nowrap; } }
.band__marks { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 1.2rem; }
.band__marks img { height: 34px; width: auto; opacity: .95; }
.band__div { width: 1px; height: 34px; background: var(--line); }

/* ---------- 17. CTA ---------- */
.cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.6rem; position: relative; }
.cta h2 { max-width: 16ch; }

/* ---------- 18. Footer ---------- */
.ftr { border-top: 1px solid var(--line); background: var(--ink-2); padding-block: clamp(3rem, 6vw, 5rem) 2rem; position: relative; overflow: hidden; }
.ftr__top { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.ftr__top > * { flex: 1 1 100%; min-width: 0; }
@media (min-width: 820px) {
  .ftr__top > *:first-child { flex: 1 1 40%; }
  .ftr__top > *:not(:first-child) { flex: 1 1 25%; }
}
.ftr__h { font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-25); margin-bottom: 1.1rem; font-weight: 600; }
.ftr li + li { margin-top: .55rem; }
.ftr a { color: var(--paper-70); transition: color .3s; font-size: .95rem; }
.ftr a:hover { color: var(--blue-hi); }
.ftr__bot {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .8rem; color: var(--paper-25);
}
.ftr__wm { height: 44px; width: auto; margin-bottom: 1.2rem; }

/* ---------- 19. Custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 999;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue-hi);
  pointer-events: none;
  translate: -50% -50%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out),
              background .35s, opacity .3s;
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor.is-live { opacity: 1; }
.cursor.is-big { width: 58px; height: 58px; background: rgba(69,184,245,.28); }
@media (hover: none), (max-width: 860px) { .cursor { display: none; } }

/* ---------- 20. Grain ---------- */
.grain {
  position: fixed; inset: -50%;
  z-index: 1; pointer-events: none;
  opacity: .035;
  background-image: 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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -4%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(4%, 4%); }
}

/* ---------- 21. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .rv { opacity: 1; transform: none; }
  #lidRect { transform: scaleY(1); }
  .eye-svg #eyePupil { transform: scale(1); }
  .eye-svg .ray { transform: none; opacity: 1; }
  .stmt .ln > span { transform: none; }
  .grain { display: none; }
}

/* ==========================================================================
   22. WordPress templates — portfolio archive, single project, pages, blog
   ========================================================================== */

/* --- discipline filter chips --- */
.filters {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: clamp(1.8rem, 3vw, 2.6rem);
}
.filters__chip {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 500;
  color: var(--paper-45);
  padding: .55rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--wonk-a);
  transition: color .35s, border-color .35s, rotate .35s var(--ease-pop);
  rotate: -.5deg;
}
.filters__chip:nth-child(even) { rotate: .6deg; border-radius: var(--wonk-b); }
.filters__chip:hover { color: var(--paper); border-color: rgba(16,149,221,.5); rotate: 0deg; }
.filters__chip.is-on { color: #fff; background: var(--blue); border-color: var(--blue); }

/* --- project facts --- */
.facts {
  display: flex; flex-wrap: wrap;
  border-block: 1px solid var(--line);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.facts > div {
  flex: 1 1 180px;
  background: var(--ink);
  padding: 1.3rem 1.4rem;
  display: flex; flex-direction: column; gap: .35rem;
  border-right: 1px solid var(--line);
}
.facts > div:last-child { border-right: 0; }
.facts dt {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--paper-25);
}
.facts dd { margin: 0; font-size: .98rem; color: var(--paper); }

/* --- project media + body --- */
.project__hero {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
}
.project__hero img { width: 100%; height: auto; display: block; }

.project__body, .entry {
  max-width: 68ch;
  margin-top: clamp(2rem, 4vw, 3rem);
  color: var(--paper-70);
  font-size: 1.05rem; line-height: 1.72;
}
.project__body > * + *, .entry > * + * { margin-top: 1.25rem; }
.project__body h2, .entry h2 { font-size: var(--step-2); color: var(--paper); margin-top: 2.4rem; }
.project__body h3, .entry h3 { font-size: var(--step-1); color: var(--paper); margin-top: 2rem; }
.project__body a, .entry a { color: var(--blue-hi); text-decoration: underline; text-underline-offset: .2em; }
.project__body a:hover, .entry a:hover { color: var(--paper); }
.project__body img, .entry img { border-radius: 14px; height: auto; }
.project__body ul, .entry ul { list-style: none; padding-left: 0; }
.project__body ul li, .entry ul li { position: relative; padding-left: 1.5rem; margin-top: .6rem; }
.project__body ul li::before, .entry ul li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
}
.project__body ol, .entry ol { padding-left: 1.3rem; }
.project__body blockquote, .entry blockquote {
  border-left: 3px solid var(--blue);
  padding-left: 1.4rem;
  font-family: var(--display); font-size: var(--step-1);
  color: var(--paper); font-style: normal;
}
.project__body figcaption, .entry figcaption {
  font-size: .82rem; color: var(--paper-25); margin-top: .6rem;
}

/* --- blog list --- */
.posts { display: flex; flex-direction: column; border-block: 1px solid var(--line); margin-top: 3rem; }
.posts > * { border-bottom: 1px solid var(--line); }
.posts > *:last-child { border-bottom: 0; }
.post-row { background: var(--ink); transition: background .45s; }
.post-row:hover { background: var(--ink-2); }
.post-row a { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; padding: clamp(1.6rem, 3vw, 2.4rem); }
.post-row p { color: var(--paper-45); font-size: .95rem; max-width: 60ch; }

/* --- pagination --- */
.pagination { margin-top: clamp(2.5rem, 5vw, 4rem); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pagination .page-numbers {
  min-width: 44px; padding: .6rem .9rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line);
  border-radius: var(--wonk-a);
  font-size: .85rem; color: var(--paper-45);
  transition: color .3s, border-color .3s, rotate .3s var(--ease-pop);
  rotate: -.6deg;
}
.pagination .page-numbers:nth-child(even) { rotate: .7deg; border-radius: var(--wonk-b); }
.pagination .page-numbers:hover { color: var(--paper); border-color: rgba(16,149,221,.5); }
.pagination .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-links { display: flex; gap: .5rem; margin-top: 2rem; font-size: .9rem; }

/* --- WordPress core classes --- */
.alignwide  { width: min(100%, 1100px); margin-inline: auto; }
.alignfull  { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.aligncenter { display: block; margin-inline: auto; }
.alignleft  { float: left; margin: .4rem 1.6rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.6rem; }
.wp-caption { max-width: 100%; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Keep the fixed header from covering anchor targets and the admin bar. */
.admin-bar .hdr { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .hdr { top: 46px; } }

/* Every template except the front page starts below the fixed header. */
body:not(.home) #main > .bay:first-child { padding-top: calc(var(--bay) + 3.5rem); }

/* ==========================================================================
   23. Elementor integration
   ========================================================================== */

/* Elementor wraps every widget; our sections carry their own rhythm. */
.elementor-widget-container > .bay,
.elementor-widget-container > .hero,
.elementor-widget-container > .ticker { margin: 0; }

[class*="elementor-widget-ec_"] .elementor-widget-container { margin: 0; padding: 0; }
[class*="elementor-widget-ec_"] { width: 100%; }

/* Full-bleed sections must escape Elementor's default 1140px container. */
.elementor-section.ec-full > .elementor-container,
.elementor-widget-ec_hero .elementor-widget-container,
.elementor-widget-ec_ticker .elementor-widget-container,
.elementor-widget-ec_figures .elementor-widget-container,
.elementor-widget-ec_clients .elementor-widget-container { max-width: none; width: 100%; }

/* Elementor's editor adds an empty-state min-height that fights our hero. */
.elementor-editor-active .elementor-widget-ec_hero .hero { min-height: 70svh; }

/* Inline doodle (the standalone widget), as opposed to the absolute scatter. */
.doodle-slot { display: flex; width: 100%; }
.doodle--inline { position: static; }

/* Ticker without the alternating outline treatment. */
.ticker--solid .ticker__item:nth-child(even) { color: var(--paper); -webkit-text-stroke: 0; }

/* Uploaded client logos rather than names. */
.strip__logo {
  height: clamp(26px, 3.4vw, 44px); width: auto;
  opacity: .55; filter: grayscale(1) brightness(1.7);
  transition: opacity .4s, filter .4s;
}
.strip__logo:hover { opacity: 1; filter: none; }

/* Footer social row. */
.ftr__social { display: flex; gap: .7rem; margin-top: 1.2rem; }
.ftr__social a {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); border-radius: var(--wonk-a);
  rotate: -1deg; transition: color .3s, border-color .3s, rotate .35s var(--ease-pop);
}
.ftr__social a:nth-child(even) { rotate: 1.2deg; border-radius: var(--wonk-b); }
.ftr__social a:hover { color: var(--blue-hi); border-color: rgba(16,149,221,.5); rotate: 0deg; }
.ftr__social svg { width: 17px; height: 17px; fill: currentColor; }

/* Customizer motion switches. */
.ec-no-grain .grain { display: none; }
.ec-no-cursor .cursor { display: none; }
.ec-no-rough .btn::before,
.ec-no-rough .btn::after { filter: none; }

/* ==========================================================================
   24. Contact page & form
   ========================================================================== */

.contact {
  display: flex; flex-wrap: wrap;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  align-items: flex-start;
}
.contact > * { flex: 1 1 100%; min-width: 0; }
@media (min-width: 940px) {
  .contact__form  { flex: 1 1 60%; }
  .contact__aside { flex: 1 1 30%; }
}

/* --- aside --- */
.contact__aside { display: flex; flex-direction: column; gap: clamp(1.8rem, 3vw, 2.6rem); }
.contact__block .ftr__h {
  font-family: var(--sans); font-size: .7rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--paper-25); margin-bottom: .9rem;
}
.contact__big {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  letter-spacing: -.02em; line-height: 1.25;
  display: inline-block;
  background-image: linear-gradient(var(--blue), var(--blue));
  background-size: 0% 2px; background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .45s var(--ease-out), color .3s;
}
.contact__big:hover { background-size: 100% 2px; color: var(--blue-hi); }
.contact__block p + p { margin-top: .5rem; }

.steps { counter-reset: s; display: flex; flex-direction: column; gap: 1.1rem; padding: 0; list-style: none; }
.steps li {
  counter-increment: s;
  position: relative; padding-left: 2.6rem;
  font-size: .92rem; color: var(--paper-45); line-height: 1.55;
}
.steps li span { display: block; color: var(--paper); font-weight: 500; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -.1rem;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: .82rem;
  color: var(--blue-hi);
  border: 1.5px solid var(--line);
  border-radius: var(--wonk-a);
  rotate: -3deg;
}
.steps li:nth-child(even)::before { border-radius: var(--wonk-b); rotate: 3deg; }

/* --- form shell --- */
.formwrap {
  background: linear-gradient(160deg, var(--navy) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.6rem, 3.5vw, 3rem);
  position: relative;
}

.form { display: flex; flex-direction: column; gap: clamp(1.1rem, 2vw, 1.5rem); margin-top: 1.8rem; }
.form__row { display: flex; flex-wrap: wrap; gap: clamp(1.1rem, 2vw, 1.5rem); }
.form__row > * { flex: 1 1 100%; min-width: 0; }
@media (min-width: 560px) { .form__row > * { flex: 1 1 calc(50% - .8rem); } }

.field { display: flex; flex-direction: column; gap: .5rem; margin: 0; border: 0; padding: 0; }
.field label, .field legend {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper-45);
  padding: 0;
}
.field label span, .field legend span { color: var(--blue); }
.field__hint { font-size: .78rem; color: var(--paper-25); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--paper);
  background: rgba(3, 17, 30, .55);
  border: 1.5px solid var(--line);
  border-radius: var(--wonk-a);
  padding: .85rem 1.05rem;
  transition: border-color .35s, background .35s, rotate .35s var(--ease-pop);
  rotate: -.25deg;
}
.field textarea { resize: vertical; min-height: 140px; border-radius: 18px 6px 20px 8px / 8px 20px 6px 18px; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%2345B8F5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 12px;
  padding-right: 2.6rem;
}
.field select option { background: var(--navy); color: var(--paper); }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(3, 17, 30, .8);
  rotate: 0deg;
}
.field input::placeholder, .field textarea::placeholder { color: var(--paper-25); }

/* --- service chips --- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; cursor: pointer; display: inline-block; }
/* The input sits on top of its own label so it always receives the click.
   The span underneath is purely visual. */
.chip input {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.chip span {
  display: block; position: relative; z-index: 1;
  font-size: .78rem; font-weight: 500;
  letter-spacing: .06em;
  color: var(--paper-45);
  border: 1.5px solid var(--line);
  border-radius: var(--wonk-a);
  padding: .5rem 1rem;
  rotate: -.7deg;
  transition: color .3s, border-color .3s, background .3s, rotate .35s var(--ease-pop);
}
.chip:nth-child(even) span { border-radius: var(--wonk-b); rotate: .8deg; }
.chip:hover span { color: var(--paper); border-color: rgba(16,149,221,.5); }
.chip input:checked + span {
  color: #fff; background: var(--blue); border-color: var(--blue); rotate: 0deg;
}
.chip input:focus-visible + span { outline: 2px solid var(--blue-hi); outline-offset: 3px; }

/* --- send row --- */
.form__send { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: .4rem; }
.form__send .scrawl { transform: rotate(-2deg); }

/* --- honeypot: off-screen, never display:none (bots skip hidden fields) --- */
.form__hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- messages --- */
.form__err {
  margin-top: 1.2rem; padding: .9rem 1.2rem;
  border: 1.5px solid rgba(255,120,120,.45);
  border-radius: var(--wonk-b);
  background: rgba(255,90,90,.08);
  color: #ffb3b3; font-size: .9rem;
}

.form__ok { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding-block: 1rem; }
.form__tick { width: 62px; height: 62px; overflow: visible; }
.form__tick path {
  fill: none; stroke: var(--blue); stroke-width: 7;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 130; stroke-dashoffset: 130;
  animation: draw .9s var(--ease-out) .25s forwards;
}
.form__ok p { max-width: 46ch; }

/* Elementor form widget sits inside its own container. */
.elementor-widget-ec_form .formwrap { margin: 0; }

/* ==========================================================================
   25. Studio page — team and process accordion
   ========================================================================== */

.team {
  display: flex; flex-wrap: wrap;
  gap: clamp(1.2rem, 2.5vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.team > * { flex: 1 1 100%; min-width: 0; }
@media (min-width: 620px)  { .team > * { flex: 1 1 calc(50% - 1rem); max-width: calc(50% - 1rem); } }
@media (min-width: 1000px) { .team > * { flex: 1 1 calc(33.333% - 1.34rem); max-width: calc(33.333% - 1.34rem); } }

.person {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: .5rem;
  padding: clamp(1.3rem, 2.5vw, 1.8rem);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px 6px 20px 8px / 8px 20px 6px 18px;
  transition: border-color .5s, background .5s, rotate .5s var(--ease-pop);
  rotate: -.4deg;
}
.person:nth-child(even) { rotate: .5deg; border-radius: 6px 20px 8px 18px / 20px 8px 18px 6px; }
.person:hover { border-color: rgba(16,149,221,.45); background: var(--navy); rotate: 0deg; }

.person__pic {
  width: 68px; height: 68px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--ink) 100%);
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .4rem;
  flex: none;
}
.person__pic img { width: 100%; height: 100%; object-fit: cover; }
.person__initials {
  font-family: var(--display); font-weight: 800;
  font-size: 1.35rem; color: var(--blue-hi);
  letter-spacing: -.02em;
}
.person h3 { font-size: var(--step-1); line-height: 1.15; }
.person__role { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-hi); }
.person__note { font-size: .9rem; color: var(--paper-45); line-height: 1.55; }

/* --- accordion: native <details>, no JavaScript --- */
.acc {
  display: flex; flex-direction: column;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.acc__item { border-bottom: 1px solid var(--line); }

.acc__head {
  display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(1.3rem, 2.5vw, 1.9rem) 0;
  cursor: pointer;
  list-style: none;
  transition: color .4s;
}
.acc__head::-webkit-details-marker { display: none; }
.acc__head:hover { color: var(--blue-hi); }
.acc__head:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 4px; }

.acc__no {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .2em;
  color: var(--paper-25); flex: none; min-width: 2.4rem;
  transition: color .4s;
}
.acc__item[open] .acc__no { color: var(--blue-hi); }

.acc__title {
  flex: 1 1 auto;
  font-family: var(--display); font-weight: 700;
  font-size: var(--step-2); line-height: 1.1;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

.acc__sign {
  flex: none; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line);
  border-radius: var(--wonk-a);
  rotate: -2deg;
  transition: rotate .5s var(--ease-pop), border-color .4s;
}
.acc__sign svg { width: 15px; height: 15px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; }
.acc__item[open] .acc__sign { rotate: 43deg; border-color: rgba(16,149,221,.5); }

.acc__body { padding-bottom: clamp(1.3rem, 2.5vw, 1.9rem); padding-left: 2.4rem; }
.acc__body p { max-width: 62ch; color: var(--paper-45); line-height: 1.65; }

@media (prefers-reduced-motion: no-preference) {
  .acc__item[open] .acc__body { animation: accOpen .45s var(--ease-out); }
  @keyframes accOpen { from { opacity: 0; transform: translateY(-6px); } }
}

/* --- values row --- */
.values { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: clamp(2rem, 4vw, 3rem); }
.values span {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  letter-spacing: -.01em;
  color: var(--paper-70);
  border: 1.5px solid var(--line);
  border-radius: var(--wonk-a);
  padding: .6rem 1.2rem;
  rotate: -.8deg;
  transition: color .4s, border-color .4s, rotate .4s var(--ease-pop);
}
.values span:nth-child(even) { rotate: .9deg; border-radius: var(--wonk-b); }
.values span:hover { color: var(--paper); border-color: rgba(16,149,221,.5); rotate: 0deg; }


/* A hidden element stays hidden. Author display rules such as .work{display:block}
   outrank the browser default for [hidden], which silently broke the portfolio
   chips: they set card.hidden but the cards kept rendering. */
[hidden] { display: none !important; }
