/* =========================================================================
   A.C. EVANS — Portfolio
   A refined card room. Bone paper everywhere; felt only at the table.
   ========================================================================= */

/* ----- Design tokens ----- */
:root {
  --bone:        #FAF9F6;  /* primary paper (soft white) */
  --bone-deep:   #F0EFEA;  /* recessed paper */
  --ink:         #1A1C1A;  /* warm near-black text */
  --ink-soft:    #4A4D48;  /* secondary text */
  --ink-faint:   #8A8C84;  /* captions */
  --felt:        #1F3D34;  /* table green — used ONLY on the table */
  --felt-light:  #2A5247;
  --felt-edge:   #14271F;
  --brass:       #B8945A;  /* gold accent, used with restraint */
  --brass-deep:  #8E6E3C;
  --oxblood:     #8C3B33;  /* muted card red (hearts / diamonds) */
  --line:        #E4E2DB;  /* hairline rules on paper */
  --card-paper:  #FFFFFF;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.05; }

/* ----- Reusable bits ----- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--brass);
  display: inline-block;
}

.section { padding-block: clamp(72px, 11vw, 140px); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--bone);
  cursor: pointer;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
/* Monogram — a gilt ace token, NOT the wordmark */
.monogram {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--brass);
  color: var(--ink);
  font-family: var(--serif); font-size: 22px; font-weight: 500;
  position: relative;
  transition: transform .5s var(--ease);
}
.monogram::after {
  content: "♠"; position: absolute; bottom: 5px; right: 6px;
  font-size: 9px; color: var(--brass);
}
.monogram:hover { transform: rotate(-8deg); }
.nav__links { display: flex; gap: 36px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink-soft); position: relative; padding-block: 4px;
  transition: color .3s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--brass);
  transition: width .35s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { width: 100%; }

/* Suit that pops up beside each nav link */
.nav__links li > a::before {
  position: absolute; left: -15px; top: 50%;
  transform: translateY(-50%) scale(.3); transform-origin: center;
  opacity: 0; font-size: 10px; line-height: 1; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.nav__links li:nth-child(1) > a::before { content: "\2660"; color: var(--ink); }
.nav__links li:nth-child(2) > a::before { content: "\2665"; color: var(--oxblood); }
.nav__links li:nth-child(3) > a::before { content: "\2666"; color: var(--oxblood); }
.nav__links li:nth-child(4) > a::before { content: "\2663"; color: var(--ink); }
.nav__links li > a:hover::before,
.nav__links li > a[aria-current="page"]::before { opacity: 1; transform: translateY(-50%) scale(1); }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s var(--ease); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding-block: clamp(56px, 9vw, 120px); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 88px); align-items: center;
}
.hero__headline {
  font-size: clamp(48px, 8.5vw, 104px);
  line-height: 0.94; letter-spacing: -0.02em;
  margin: 22px 0 28px;
  font-optical-sizing: auto;
}
.hero__headline em { font-style: italic; color: var(--brass-deep); }
.hero__lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); max-width: 46ch; }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* portrait framed as a card */
.hero__portrait {
  position: relative;
  aspect-ratio: 5 / 6.2;
  border-radius: 14px;
  background: var(--card-paper);
  border: 1px solid var(--line);
  padding: 14px;
  box-shadow: 0 30px 60px -28px rgba(26,28,26,.45);
  transform: rotate(2.2deg);
  transition: transform .6s var(--ease);
}
.hero__portrait:hover { transform: rotate(0deg); }
.hero__portrait::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid var(--brass);
  border-radius: 8px; pointer-events: none; opacity: .5;
}
.hero__portrait-img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; border-radius: 6px;
  background: linear-gradient(135deg, var(--bone-deep), #dcd3bd);
}
.hero__corner {
  position: absolute; font-family: var(--serif);
  color: var(--ink); line-height: .8; text-align: center;
}
.hero__corner span { display: block; font-size: 13px; }
.hero__corner--tl { top: 22px; left: 24px; }
.hero__corner--br { bottom: 22px; right: 24px; transform: rotate(180deg); }
.hero__corner .rank { font-size: 22px; }

/* =========================================================================
   SECTION 2 — THE TABLE (the only green)
   ========================================================================= */
.table {
  background:
    radial-gradient(120% 90% at 50% 8%, var(--felt-light) 0%, var(--felt) 42%, var(--felt-edge) 100%);
  color: var(--bone);
  position: relative;
  padding-block: clamp(80px, 12vw, 160px);
  overflow: hidden;
}
/* stitched rail */
.table::before {
  content: ""; position: absolute; inset: 22px;
  border: 2px solid rgba(184,148,90,.28);
  border-radius: 28px;
  pointer-events: none;
}
.table::after {
  content: ""; position: absolute; inset: 28px;
  border: 1px dashed rgba(244,240,230,.16);
  border-radius: 24px;
  pointer-events: none;
}
/* faint felt weave */
.table__weave {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,.04) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.02) 0 2px, transparent 2px 4px);
}
.table .eyebrow { color: var(--brass); }
.table .eyebrow::before { background: var(--brass); }
.table__head { text-align: center; max-width: 60ch; margin-inline: auto; position: relative; z-index: 2; }
.table__title { font-size: clamp(34px, 5vw, 60px); margin: 18px 0 14px; color: var(--bone); }
.table__sub { color: rgba(244,240,230,.72); font-size: 17px; }

/* dealt cards */
.deal {
  position: relative; z-index: 2;
  margin-top: clamp(48px, 7vw, 90px);
  display: flex; justify-content: center; align-items: flex-end;
  perspective: 1400px;
  min-height: 440px;
  flex-wrap: nowrap;
}
.pcard {
  --rot: 0deg;
  position: relative;
  width: clamp(150px, 15.5vw, 210px);
  aspect-ratio: 5 / 7;
  margin-inline: clamp(-18px, -0.8vw, -8px);
  border-radius: 14px;
  background:
    linear-gradient(160deg, var(--card-paper) 0%, #F1EDE2 100%);
  box-shadow:
    0 2px 2px rgba(0,0,0,.18),
    0 18px 30px -14px rgba(0,0,0,.5);
  transform: rotate(var(--rot)) translateY(0);
  transform-style: preserve-3d;
  transition: transform .55s var(--ease), box-shadow .55s var(--ease);
  cursor: pointer;
  will-change: transform;
  color: var(--ink);
  display: block;
}
.pcard::before { /* gilt inner frame */
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(184,148,90,.55); border-radius: 9px;
  pointer-events: none;
}
.pcard:hover, .pcard:focus-visible {
  transform: rotate(var(--rot)) translateY(-46px) scale(1.04);
  box-shadow:
    0 4px 4px rgba(0,0,0,.2),
    0 50px 60px -22px rgba(0,0,0,.6);
  z-index: 20; outline: none;
}
.pcard:focus-visible::before { border-color: var(--brass); }

.pcard__corner {
  position: absolute; font-family: var(--serif); line-height: .82;
  text-align: center; letter-spacing: -.02em;
}
.pcard__corner .rank { font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; display: block; }
.pcard__corner .pip  { font-size: clamp(15px, 1.8vw, 20px); display: block; }
.pcard__corner--tl { top: 16px; left: 18px; }
.pcard__corner--br { bottom: 16px; right: 18px; transform: rotate(180deg); }

.pcard__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 18px 20px;
}
.pcard__suit { font-size: clamp(34px, 4.4vw, 52px); line-height: 1; margin-bottom: 14px; }
.pcard__title {
  font-family: var(--serif); font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.12; letter-spacing: -.01em;
}
.pcard__meta {
  margin-top: 10px; font-family: var(--sans);
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint);
}
.pcard__open {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-deep); opacity: 0;
  transition: opacity .4s var(--ease);
}
.pcard:hover .pcard__open, .pcard:focus-visible .pcard__open { opacity: 1; }

.suit-red  { color: var(--oxblood); }
.suit-dark { color: var(--ink); }

.table__hint {
  text-align: center; margin-top: clamp(40px, 6vw, 72px);
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(244,240,230,.5); position: relative; z-index: 2;
}

/* =========================================================================
   SECTION 3 — PROCESS / EXPERTISE
   ========================================================================= */
.process__head { max-width: 64ch; }
.process__title { font-size: clamp(32px, 4.6vw, 54px); margin: 18px 0 16px; letter-spacing: -.02em; }
.process__intro { color: var(--ink-soft); max-width: 56ch; font-size: 18px; }

.steps {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.step { background: var(--bone); padding: 32px 28px 38px; }
.step__no {
  font-family: var(--serif); font-size: 13px; color: var(--brass-deep);
  letter-spacing: .1em;
}
.step__name { font-family: var(--serif); font-size: 24px; margin: 14px 0 10px; }
.step__body { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }

.expertise {
  margin-top: clamp(48px, 6vw, 72px);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.expertise__label { /* label now uses .eyebrow treatment; layout below */ }
.chip {
  font-size: 13px; padding: 9px 16px; border: 1px solid var(--line);
  border-radius: 100px; color: var(--ink-soft); background: var(--bone-deep);
}

/* =========================================================================
   SECTION 4 — CLIENTS
   ========================================================================= */
.clients { background: var(--bone-deep); border-block: 1px solid var(--line); }
.clients__head { text-align: center; }
.clients__title { font-size: clamp(28px, 4vw, 46px); margin-top: 16px; }
.logos { margin-top: clamp(44px, 6vw, 68px);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(18px, 3vw, 30px); align-items: stretch; }
.logo {
  display: grid; place-items: center; min-height: 58px;
  flex: 1 1 165px; max-width: 215px; padding: 8px 14px;
}
.logo img { max-height: 100%; width: auto; object-fit: contain; }
/* fallback wordmark when logo image absent */
.logo__text { font-family: var(--serif); font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink); letter-spacing: .015em; text-align: center; line-height: 1.3; }

/* =========================================================================
   FOOTER — back of a playing card
   ========================================================================= */
.footer {
  background: var(--ink);
  color: var(--bone);
  position: relative;
  padding-block: clamp(56px, 8vw, 96px);
}
.footer__inner { position: relative; z-index: 2; }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  align-items: start;
}
.footer__brand .monogram { border-color: var(--brass); color: var(--bone); }
.footer__brand .monogram::after { color: var(--brass); }
.footer__tag { margin-top: 20px; font-family: var(--serif); font-size: 22px; max-width: 22ch; color: var(--bone); }
.footer__col h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: 16px; }
.footer__col a, .footer__col p { display: block; color: rgba(244,240,230,.82); font-size: 15px; margin-bottom: 10px; transition: color .3s var(--ease); }
.footer__col a:hover { color: var(--bone); }
.footer__base {
  position: relative; z-index: 2;
  margin-top: clamp(40px, 5vw, 64px); padding-top: 22px;
  border-top: 1px solid rgba(244,240,230,.18);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: rgba(244,240,230,.6);
}

/* =========================================================================
   SUB-PAGE shared (resume / work / blog / project)
   ========================================================================= */
.page-head { padding-block: clamp(60px, 8vw, 110px) clamp(24px, 4vw, 40px); }
.page-head__title { font-size: clamp(40px, 7vw, 84px); letter-spacing: -.02em; margin: 20px 0 18px; }
.page-head__sub { color: var(--ink-soft); font-size: 19px; max-width: 56ch; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Work grid */
.work-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px); padding-block: clamp(48px, 7vw, 90px);
}
.work-card {
  display: block; background: var(--card-paper);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.work-card:hover { transform: translateY(-8px); box-shadow: 0 30px 50px -28px rgba(26,28,26,.4); }
.work-card__cover {
  aspect-ratio: 16/10; background: #fff;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.work-card__cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.work-card__cover--placeholder { background: linear-gradient(135deg, var(--bone-deep), #d8cfb8); }
.work-card__chip { position: absolute; top: 12px; left: 12px; z-index: 2; box-shadow: 0 6px 16px -6px rgba(26,28,26,.5); border-radius: 50%; }
.work-card__suit { font-size: 56px; opacity: .85; }
.work-card__body { padding: 26px 28px 30px; }
.work-card__rank { font-family: var(--serif); color: var(--brass-deep); font-size: 14px; letter-spacing: .08em; }
.work-card__title { font-family: var(--serif); font-size: 26px; margin: 8px 0 10px; line-height: 1.1; }
.work-card__desc { color: var(--ink-soft); font-size: 15px; }

/* Resume */
.resume { padding-block: clamp(40px, 6vw, 72px); }
.resume__layout { display: grid; grid-template-columns: 1fr 2.2fr; gap: clamp(36px, 6vw, 80px); }
.resume__aside h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }
.resume__aside section { margin-bottom: 40px; }
.resume__aside p, .resume__aside li { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }
.resume__aside ul { list-style: none; margin: 0; padding: 0; }
.resume__aside li { margin-bottom: 8px; }
.role { padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.role:last-child { border-bottom: 0; }
.role__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.role__title { font-family: var(--serif); font-size: 24px; }
.role__co { color: var(--brass-deep); font-weight: 600; font-size: 15px; }
.role__when { font-size: 13px; color: var(--ink-faint); letter-spacing: .04em; white-space: nowrap; }
.role__body { margin: 12px 0 0; padding: 0; list-style: none; }
.role__body li { position: relative; padding-left: 22px; margin-bottom: 8px; font-size: 15.5px; color: var(--ink-soft); }
.role__body li::before { content: "♠"; position: absolute; left: 0; top: 1px; font-size: 11px; color: var(--brass); }

/* Blog */
.posts { padding-block: clamp(40px, 6vw, 72px); display: grid; gap: 2px; }
.post {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 28px; align-items: center;
  padding: 30px 8px; border-top: 1px solid var(--line);
  transition: background .3s var(--ease), padding-inline .4s var(--ease);
}
.post:last-child { border-bottom: 1px solid var(--line); }
.post:hover { background: var(--bone-deep); }
.post__date { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.post__title { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.12; }
.post__title span { display: block; font-family: var(--sans); font-size: 15px; color: var(--ink-soft); margin-top: 8px; font-weight: 400; }
.post__arrow { font-size: 22px; color: var(--brass-deep); transition: transform .4s var(--ease); }
.post:hover .post__arrow { transform: translateX(6px); }

/* Project case study */
.case { padding-block: clamp(40px, 6vw, 72px); }
.case__lead { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 56px; }
.case__fact h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 10px; }
.case__fact p { margin: 0; font-size: 16px; color: var(--ink); }
.case__hero-img {
  aspect-ratio: 16/9; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--bone-deep), #d8cfb8);
  display: grid; place-items: center; color: var(--ink-faint); margin-bottom: 56px;
}
.case__section { max-width: 70ch; margin-bottom: 52px; }
.case__section h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 16px; letter-spacing: -.01em; }
.case__section p { color: var(--ink-soft); font-size: 17px; margin: 0 0 16px; }
.case__imgrow { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 52px; }
.case__img {
  aspect-ratio: 4/3; border-radius: 10px; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--bone-deep), #d8cfb8);
  display: grid; place-items: center; color: var(--ink-faint); font-size: 13px;
}
.case__next { border-top: 1px solid var(--line); padding-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

/* =========================================================================
   Reveal-on-scroll
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__portrait { max-width: 380px; margin-inline: auto; transform: rotate(0); }
  .steps { grid-template-columns: 1fr 1fr; }
  .logo { flex: 1 1 42%; min-height: 50px; padding: 8px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .resume__layout { grid-template-columns: 1fr; }
  .case__lead, .case__imgrow { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr auto; }
  .post__date { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .nav__links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--bone); border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 44px -26px rgba(26, 28, 26, .4);
    padding: 8px var(--gutter) 16px;
    transform: translateY(-130%); transition: transform .45s var(--ease);
    z-index: 200;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 4px; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: none; }
  .nav__links a::after { content: none; }
  .nav__links li > a::before {
    position: static; transform: none; opacity: 1;
    font-size: 12px; line-height: 1;
  }
  .nav__links a[aria-current="page"] { color: var(--brass-deep); }
  .nav__toggle { display: block; }
  .steps { grid-template-columns: 1fr; }
  .deal { gap: 16px; flex-wrap: wrap; }
  .pcard { margin-inline: 0; width: clamp(150px, 60vw, 220px); }
  .pcard:hover, .pcard:focus-visible { transform: rotate(0) translateY(-10px) scale(1.02); }
  .case__lead { gap: 18px; }
}

/* Motion off */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   LUCK MODAL + MULTI-EXPERIENCE STAGE (poker / slots / roulette)
   ========================================================================= */

/* ----- Luck modal ----- */
.luck[hidden] { display: none; }
.luck { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.luck__backdrop { position: absolute; inset: 0; background: rgba(18,20,18,.74); backdrop-filter: blur(7px); }
.luck__card {
  position: relative; background: var(--bone); border: 1px solid var(--line);
  border-radius: 18px; max-width: 560px; width: 100%; padding: clamp(28px, 5vw, 48px);
  text-align: center; box-shadow: 0 44px 90px -34px rgba(0,0,0,.65);
  animation: luckIn .5s var(--ease);
  max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
}
@keyframes luckIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.luck__card .eyebrow { justify-content: center; }
.luck__title { font-size: clamp(30px, 5vw, 46px); letter-spacing: -.02em; margin: 16px 0 10px; }
.luck__lede { color: var(--ink-soft); margin: 0 auto 30px; max-width: 42ch; }
.luck__options { display: grid; gap: 12px; }
.luck__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  text-align: left; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card-paper); cursor: pointer;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.luck__opt:hover, .luck__opt:focus-visible { transform: translateY(-3px); border-color: var(--brass); background: var(--bone); outline: none; }
.luck__word { font-family: var(--serif); font-size: 24px; }
.luck__desc { font-size: 11.5px; letter-spacing: .12em; color: var(--ink-faint); text-transform: uppercase; text-align: right; }
.luck__skip { margin-top: 22px; background: none; border: 1px solid var(--line); border-radius: 100px; color: var(--ink-soft); font-size: 14px; cursor: pointer; letter-spacing: .04em; padding: 10px 22px; transition: border-color .3s var(--ease), color .3s var(--ease); }
.luck__skip:hover { color: var(--ink); border-color: var(--brass); }
body.luck-open { overflow: hidden; }

/* ----- Stage shell (replaces single .table) ----- */
.stage { position: relative; overflow: hidden; padding-block: clamp(80px, 12vw, 160px); color: var(--bone); }
.stage__bg { position: absolute; inset: 0; z-index: 0; }
.stage .wrap { position: relative; z-index: 2; }
.stage__head { text-align: center; max-width: 60ch; margin-inline: auto; }
.stage__title { font-size: clamp(34px, 5vw, 60px); margin: 18px 0 14px; color: var(--bone); }
.stage__sub { color: rgba(244,240,230,.72); font-size: 17px; }
.stage .eyebrow { color: var(--brass); }
.stage .eyebrow::before { background: var(--brass); }

/* mode backdrops — green ONLY for poker */
body[data-mode="poker"] .stage__bg {
  background: radial-gradient(120% 90% at 50% 8%, var(--felt-light) 0%, var(--felt) 42%, var(--felt-edge) 100%);
}
body[data-mode="poker"] .stage__bg::before { content:""; position:absolute; inset:22px; border:2px solid rgba(184,148,90,.28); border-radius:28px; }
body[data-mode="poker"] .stage__bg::after  { content:""; position:absolute; inset:28px; border:1px dashed rgba(244,240,230,.16); border-radius:24px; }
body[data-mode="slots"] .stage__bg {
  background: radial-gradient(120% 90% at 50% 6%, #2b2723 0%, #1c1a18 55%, #121110 100%);
}
body[data-mode="roulette"] .stage__bg {
  background: radial-gradient(120% 90% at 50% 6%, #3a201f 0%, #241413 55%, #140b0b 100%);
}

/* experience visibility */
.exp { display: none; }
body[data-mode="poker"] .exp--poker { display: block; }
body[data-mode="slots"] .exp--slots { display: block; }
body[data-mode="roulette"] .exp--roulette { display: block; }
.exp--poker .deal { margin-top: clamp(48px, 7vw, 90px); }

/* change-luck chip */
.luck-again {
  display: block; margin: clamp(40px, 6vw, 70px) auto 0; background: transparent;
  border: 1px solid rgba(184,148,90,.5); color: var(--brass);
  font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  padding: 11px 22px; border-radius: 100px; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.luck-again:hover { background: var(--brass); color: var(--ink); }

/* ----- Winner card (shared by slots + roulette) ----- */
.winner { margin: clamp(34px, 5vw, 58px) auto 0; max-width: 520px; opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.winner.is-in { opacity: 1; transform: none; }
.winner[hidden] { display: none; }
.winner__link { display: flex; gap: 22px; align-items: center; text-align: left; background: var(--card-paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; color: var(--ink); position: relative; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.winner__link::before { content:""; position:absolute; inset:8px; border:1px solid rgba(184,148,90,.4); border-radius:9px; pointer-events:none; }
.winner__link:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -26px rgba(0,0,0,.5); }
.winner__suit { font-size: 52px; line-height: 1; flex: none; }
.winner__body { display: flex; flex-direction: column; }
.winner__label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-deep); }
.winner__title { font-family: var(--serif); font-size: 24px; line-height: 1.1; margin: 4px 0 6px; }
.winner__meta { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.winner__go { margin-left: auto; font-size: 22px; color: var(--brass-deep); flex: none; }

/* ----- SLOT MACHINE ----- */
.slot { max-width: 640px; margin-inline: auto; text-align: center; }
.slot__cabinet { position: relative; display: inline-flex; align-items: stretch; justify-content: center; gap: 16px; margin-top: clamp(30px, 5vw, 56px); }
.slot__frame { position: relative; background: linear-gradient(180deg, #f6f2e8, #e6ddca); border: 2px solid var(--brass); border-radius: 18px; padding: 20px; box-shadow: 0 34px 64px -32px rgba(0,0,0,.75), inset 0 0 0 6px rgba(184,148,90,.14); }
.slot__reels { --tileH: 88px; position: relative; display: flex; gap: 12px; background: var(--ink); padding: 14px; border-radius: 10px; }
.reel { width: clamp(66px, 10vw, 88px); height: calc(var(--tileH) * 3); overflow: hidden; background: linear-gradient(180deg, #fbf9f3, #ece5d6); border-radius: 6px; position: relative; box-shadow: inset 0 9px 14px -8px rgba(0,0,0,.55), inset 0 -9px 14px -8px rgba(0,0,0,.55); }
.reel__strip { display: flex; flex-direction: column; will-change: transform; }
.reel__tile { height: var(--tileH); display: grid; place-items: center; font-size: clamp(32px, 5vw, 44px); line-height: 1; }
.reel.is-spinning { filter: blur(1px); }
.slot__payline { position: absolute; left: 8px; right: 8px; top: 50%; transform: translateY(-50%); height: var(--tileH); border-top: 2px solid rgba(184,148,90,.75); border-bottom: 2px solid rgba(184,148,90,.75); pointer-events: none; border-radius: 3px; }
.slot__handle { position: relative; width: 30px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 4px; align-self: flex-start; background: none; border: 0; cursor: pointer; }
.slot__rod { width: 8px; height: 110px; background: linear-gradient(180deg, #cbab6d, #8e6e3c); border-radius: 6px; transform-origin: top center; transition: transform .18s var(--ease); }
.slot__knob { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c0392b, #7a201f); box-shadow: 0 4px 9px rgba(0,0,0,.45); }
.slot__handle.is-pulled .slot__rod { transform: scaleY(1.55); }
.slot__pull { margin-top: clamp(26px, 4vw, 40px); }
.slot__hint { margin-top: 14px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(244,240,230,.5); }
.slot.jackpot .reel { animation: jack .45s ease 2; }
@keyframes jack { 50% { box-shadow: inset 0 0 0 3px var(--brass), inset 0 9px 14px -8px rgba(0,0,0,.55), inset 0 -9px 14px -8px rgba(0,0,0,.55); } }

/* ----- ROULETTE ----- */
.roulette { max-width: 560px; margin-inline: auto; text-align: center; }
.wheel-wrap { position: relative; width: min(80vw, 400px); aspect-ratio: 1; margin: clamp(24px, 4vw, 44px) auto 0; }
.wheel { position: absolute; inset: 0; border-radius: 50%; transition: transform 4.6s cubic-bezier(.17,.67,.2,1); box-shadow: 0 34px 60px -30px rgba(0,0,0,.75), 0 0 0 10px rgba(184,148,90,.22), 0 0 0 13px rgba(18,18,18,.7); }
.wheel svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.wheel__hub { position: absolute; top: 50%; left: 50%; width: 26%; height: 26%; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #cbab6d, #8e6e3c); box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 0 0 4px rgba(18,18,18,.3); display: grid; place-items: center; z-index: 3; }
.wheel__hub span { font-family: var(--serif); color: var(--ink); font-size: clamp(18px, 3vw, 26px); }
.ball-track { position: absolute; inset: 7%; border-radius: 50%; transition: transform 4.4s cubic-bezier(.17,.67,.2,1); z-index: 2; pointer-events: none; }
.ball { position: absolute; top: 1%; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #cdc4b0); box-shadow: 0 2px 5px rgba(0,0,0,.55); }
.roulette__pointer { position: absolute; top: -3px; left: 50%; transform: translateX(-50%); z-index: 4; width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 18px solid var(--brass); }
.roulette__spin { margin-top: clamp(26px, 4vw, 40px); }
.roulette__hint { margin-top: 14px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(244,240,230,.5); }

@media (max-width: 600px) {
  .slot__reels { --tileH: 64px; }
  .slot__cabinet { gap: 10px; }
  .winner__link { gap: 14px; padding: 18px; }
  .winner__suit { font-size: 40px; }
  .luck__desc { display: none; }
}

/* =========================================================================
   CASINO VISUALS — poker chips, deco suit texture, gold accents
   ========================================================================= */

/* faint art-deco diamond/pip texture */
.deco-suits { position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpolygon points='32,14 50,32 32,50 14,32' fill='none' stroke='%231a1c1a' stroke-width='1'/%3E%3Ccircle cx='32' cy='32' r='1.6' fill='%231a1c1a'/%3E%3C/svg%3E");
  background-size: 64px 64px; }
.deco-suits--light { opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpolygon points='32,14 50,32 32,50 14,32' fill='none' stroke='%23f4f0e6' stroke-width='1'/%3E%3Ccircle cx='32' cy='32' r='1.6' fill='%23f4f0e6'/%3E%3C/svg%3E"); }

.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 1; }

/* poker chip component */
.chip { --sz: 60px; --body: #b8945a; --edge: #8e6e3c;
  position: relative; width: var(--sz); height: var(--sz); border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 50% 50%, #f6f2e8 0 25%, transparent 25.5%),
    radial-gradient(circle at 50% 50%, var(--edge) 0 37%, var(--body) 37.5% 100%);
  box-shadow: 0 6px 16px rgba(0,0,0,.28), inset 0 1px 2px rgba(255,255,255,.35), inset 0 -3px 6px rgba(0,0,0,.25); }
.chip::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(#f6f2e8 0 6deg, transparent 6deg 45deg);
  -webkit-mask: radial-gradient(circle, transparent 0 39%, #000 39% 48%, transparent 48%);
          mask: radial-gradient(circle, transparent 0 39%, #000 39% 48%, transparent 48%); }
.chip__pip { position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); color: var(--ink); font-size: calc(var(--sz) * .34); line-height: 1; z-index: 1; }
.chip--sm { --sz: 34px; }
.chip--lg { --sz: 74px; }
.chip--red { --body: #8c3b33; --edge: #5f251f; }

/* hero chip badge */
.hero__chip { position: absolute; top: -24px; left: -24px; z-index: 3; animation: chipFloat 4.5s ease-in-out infinite; }
@keyframes chipFloat { 0%,100% { transform: translateY(0) rotate(-7deg); } 50% { transform: translateY(-9px) rotate(-7deg); } }

/* chip divider rule */
.chip-rule { display: flex; align-items: center; gap: 24px; padding-block: clamp(24px, 5vw, 48px); }
.chip-rule::before, .chip-rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* footer polish: gold top line + faint texture */
.footer { overflow: hidden; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(184,148,90,.6), transparent); }

/* luck modal chips + brand line */
.luck__chips { display: flex; justify-content: center; margin-bottom: 18px; }
.luck__chips .chip { --sz: 40px; margin-inline: -6px; }
.luck__chips .chip:nth-child(1) { transform: rotate(-9deg); }
.luck__chips .chip:nth-child(2) { transform: translateY(-5px); z-index: 1; }
.luck__chips .chip:nth-child(3) { transform: rotate(9deg); }
.luck__brand { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 16px; }
.luck__brand strong { color: var(--ink); }
.luck__opt .chip { --sz: 30px; }
.luck__opt .luck__word { flex: 1; }

/* modal welcome headline + signature */
.luck__welcome { font-family: var(--serif); font-size: clamp(19px, 2.4vw, 24px); color: var(--ink); margin: 0 0 10px; letter-spacing: -.01em; }
.luck__sign { display: block; margin-top: 8px; font-family: var(--serif); font-style: italic; color: var(--brass-deep); font-size: 15px; }

/* case study: real cover image + NDA note */
.case__hero-img--media { background: #fff; padding: 0; overflow: hidden; color: transparent; aspect-ratio: 865 / 675; display: block; }
.case__hero-img--media img { width: 100%; height: 100%; display: block; object-fit: contain; }
.case__note { font-size: 14px; font-style: italic; color: var(--ink-faint); border-left: 2px solid var(--brass); padding-left: 14px; margin-top: 4px; }

/* case study: contributions list */
.case__subhead { font-family: var(--serif); font-size: 21px; margin: 28px 0 12px; letter-spacing: -.01em; }
.case__list { list-style: none; margin: 0; padding: 0; }
.case__list li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }
.case__list li::before { content: "♠"; position: absolute; left: 0; top: 2px; font-size: 11px; color: var(--brass); }

/* footer version toggle */
.mode-toggle { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: clamp(30px, 4vw, 44px); position: relative; z-index: 2; }
.mode-toggle__label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); }
.mode-toggle__set { display: inline-flex; border: 1px solid rgba(184,148,90,.4); border-radius: 100px; padding: 4px; gap: 2px; background: rgba(0,0,0,.22); }
.mode-toggle__btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--sans); font-size: 13px; letter-spacing: .02em; color: rgba(244,240,230,.75); background: transparent; border: 0; border-radius: 100px; padding: 8px 16px; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.mode-toggle__btn span { font-family: var(--serif); }
.mode-toggle__btn:hover { color: var(--bone); }
.mode-toggle__btn.is-active { background: var(--brass); color: var(--ink); }

/* expertise "deck" — aligned grid of colored poker chips with labels beneath */
.expertise { display: block; margin-top: clamp(48px, 6vw, 72px); }
.expertise__label { display: inline-flex; margin: 0 0 22px; }
.deck { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 26px; max-width: 940px; }
.deck__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.deck__item .chip { --sz: 78px; }
.deck__name { font-size: 15.5px; color: var(--ink-soft); line-height: 1.34; max-width: 16ch; }
.chip--ink { --body: #3a3d38; --edge: #23251f; }
.chip--pale { --body: #e7e0ce; --edge: #c9c0ae; }
@media (max-width: 760px) { .deck { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; } }

/* footer "change your luck" button (replaces the version toggle) */
.luck-footer { display: inline-flex; align-items: center; gap: 9px; margin-top: clamp(30px, 4vw, 44px); position: relative; z-index: 2; background: transparent; border: 1px solid rgba(184,148,90,.5); color: var(--brass); font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; padding: 11px 22px; border-radius: 100px; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.luck-footer span { font-family: var(--serif); }
.luck-footer:hover { background: var(--brass); color: var(--ink); }

/* case study: full-width live image gallery */
.case__gallery { display: flex; flex-direction: column; gap: 22px; margin: 20px 0 52px; }
.case__gallery figure { margin: 0; }
.case__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.case__grid figure { margin: 0; }
.case__grid img { border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 680px) { .case__grid { grid-template-columns: 1fr; } }
.case__gallery img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.case__gallery figcaption { font-size: 13px; color: var(--ink-faint); font-style: italic; text-align: center; margin-top: 8px; }

/* placeholder shown in a project gallery before images are added */
.case__gallery-empty { aspect-ratio: 16/9; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--ink-faint); font-size: 14px; background: var(--bone-deep); }

/* fifth project — gold "Joker" wild card */
.suit-gold { color: var(--brass-deep); }

/* ===== Access gate (client-side passphrase) ===== */
.gate { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 10%, #24463b 0%, #163029 55%, #0e1f1a 100%);
  animation: gateIn .4s var(--ease); }
.gate.is-out { opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; }
@keyframes gateIn { from { opacity: 0; } to { opacity: 1; } }
.gate__inner { position: relative; max-width: 460px; width: 100%; background: var(--bone); border: 1px solid var(--line);
  border-radius: 18px; padding: clamp(28px, 5vw, 46px); text-align: center; box-shadow: 0 44px 90px -34px rgba(0,0,0,.7); }
.gate__chips { display: flex; justify-content: center; margin-bottom: 16px; }
.gate__chips .chip { --sz: 40px; margin-inline: -6px; }
.gate__chips .chip:nth-child(1) { transform: rotate(-9deg); }
.gate__chips .chip:nth-child(2) { transform: translateY(-5px); z-index: 1; }
.gate__chips .chip:nth-child(3) { transform: rotate(9deg); }
.gate .eyebrow { justify-content: center; color: var(--brass-deep); }
.gate .eyebrow::before { background: var(--brass); }
.gate__title { font-family: var(--serif); font-size: clamp(30px, 5vw, 44px); letter-spacing: -.02em; margin: 14px 0 10px; }
.gate__sub { color: var(--ink-soft); margin: 0 auto 24px; max-width: 38ch; font-size: 15px; }
.gate__form { display: flex; gap: 10px; }
.gate__input { flex: 1; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--sans); font-size: 15px; background: var(--card-paper); color: var(--ink); }
.gate__input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(184,148,90,.18); }
.gate__btn { flex: none; }
.gate__err { color: #a3372e; font-size: 13px; margin: 12px 0 0; min-height: 18px; }
.gate__note { margin: 18px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.gate__note a { color: var(--brass-deep); }
.gate.is-error .gate__inner { animation: gateShake .4s; }
@keyframes gateShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
body.gate-open { overflow: hidden; }
@media (max-width: 460px) { .gate__form { flex-direction: column; } }

/* link under a gallery image (e.g., open a Figma board) */
.case__figlink { margin-top: 14px; text-align: center; }

/* ---- Blog article pages ---- */
.article { max-width: 720px; margin: 0 auto; padding-block: clamp(30px, 5vw, 56px); }
.article__title { max-width: 900px; }
.article p { font-size: 17px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 22px; }
.article p:first-of-type { font-size: 18.5px; color: var(--ink); }
.article strong { color: var(--ink); font-weight: 600; }
.article a { color: var(--brass-deep); text-decoration: underline; text-underline-offset: 3px; }
.article a:hover { color: var(--ink); }
.article ul, .article ol { margin: 0 0 22px; padding-left: 22px; }
.article li { font-size: 17px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 10px; }
.article__nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.article__nav .btn { max-width: 46%; }
.article__back { margin-top: 22px; text-align: center; }
.article__back a { color: var(--ink-faint); font-size: 14px; }
.article__back a:hover { color: var(--brass-deep); }
@media (max-width: 680px) {
  .article__nav { flex-direction: column; }
  .article__nav .btn { max-width: 100%; text-align: center; }
}

.footer__email { display: block; color: rgba(244,240,230,.82); font-size: 15px; margin-bottom: 10px; }
