@font-face {
  font-family: 'Clash Display';
  src: url('../fonts/ClashDisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Display';
  src:
    url('../fonts/ClashDisplay-Semibold.woff2') format('woff2'),
    url('../fonts/ClashDisplay-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Display';
  src:
    url('../fonts/ClashDisplay-Bold.woff2') format('woff2'),
    url('../fonts/ClashDisplay-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@layer theme {
  :root,
  .sw-root {
    --sw-bg: #e3e5e8;
    --sw-ink: #23211e;
    --sw-ink-soft: #6e655b;
    --sw-accent: #957737;
  }
}

/* Preview mode — NDA clients stay redacted. Case Western and U.S. Bank are
   public (`is-public`) so their names and copy stay readable. Case-study
   links stay locked behind the passcode on every card. */
html.is-portfolio-preview .sw-copy:not(.is-public) .sw-copy__eyebrow {
  user-select: none;
}

/* A wide, heavy smear so locked names read as redacted — not a missing word. */
html.is-portfolio-preview .sw-redact {
  display: inline-block;
  min-width: 7.5ch;
  padding: 0.1em 0.5em 0.16em;
  border-radius: 5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.4);
  filter: blur(6px);
  user-select: none;
  vertical-align: -0.08em;
}

html.is-portfolio-preview .sw-copy__eyebrow .sw-redact {
  min-width: 12ch;
  padding: 0.14em 0.65em 0.2em;
  filter: blur(7px);
}

.sw-btn,
.sw-btn--primary,
.sw-btn--ghost {
  border-radius: 999px;
  border: 0;
  box-shadow: none;
}

html.is-portfolio-preview a.sw-btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.92;
}

html.is-portfolio-preview a.sw-btn--primary::before {
  content: '';
  width: 13px;
  height: 13px;
  flex: none;
  background: currentcolor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 8V7a3 3 0 1 1 6 0v3H9z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* Touch reliability: opt every control out of double-tap-to-zoom heuristics
   so the first tap always registers as a click on phones. */
a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Screen-reader-only narration that keeps the visual layout untouched. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.access-loading {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 2;
  margin: 0;
  color: #625d56;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  pointer-events: none;
  transform: translateX(-50%);
}

html:not(.is-access-pending, .is-returning-to-section) .access-loading {
  display: none;
}

/* Interstitial shown while the journey is rebuilt and scrolled back to the
   section a case study came from. One centred micro-label over a hairline
   rail: enough signal that work is happening, nothing to read twice. */
html.is-returning-to-section .access-loading {
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: radial-gradient(115% 78% at 50% 44%, #f2f3f5 0%, #e3e5e8 56%, #d2d4d7 100%);
  color: #3a352e;
  font-family: ui-monospace, sfmono-regular, menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  pointer-events: auto;
  transform: none;
}

html.is-returning-to-section .access-loading::before,
html.is-returning-to-section .access-loading::after {
  content: '';
  position: absolute;
  top: calc(50% + 28px);
  left: 50%;
  width: min(220px, 46vw);
  height: 1px;
  transform: translateX(-50%);
}

html.is-returning-to-section .access-loading::before {
  background: rgb(58 53 46 / 14%);
}

html.is-returning-to-section .access-loading::after {
  background: linear-gradient(90deg, transparent, #1b1a18 50%, transparent);
  background-repeat: no-repeat;
  background-size: 40% 100%;
  animation: access-scan 1.15s linear infinite;
}

@keyframes access-scan {
  from {
    background-position: -45% 0;
  }

  to {
    background-position: 145% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-returning-to-section .access-loading::after {
    background-position: 0 0;
    animation: none;
  }
}

html.is-returning-to-section body > :not(.access-loading, .access-gate) {
  visibility: hidden;
}

html.is-access-pending,
html.is-access-locked,
html.is-access-pending body,
html.is-access-locked body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-access-pending body {
  background: #e3e5e8;
}

html.is-access-locked #world {
  visibility: hidden;
}

html.is-access-pending .hs-social,
html.is-access-locked .hs-social {
  display: none;
}

html.is-access-pending .hs-hint,
html.is-access-locked .hs-hint {
  display: none !important;
}

html.is-hero-gate-open .hs-cta {
  visibility: hidden;
}

/* A first-time visitor gets the password card in place of the photograph, so the
   photograph must stay hidden through the split that opens the journey. */
html.is-hero-gate-open .hs-card__media,
html.is-hero-gate-open .hs-card,
html.is-gate-entry .hs-card__media,
html.is-gate-entry .hs-card {
  visibility: hidden;
}

.access-gate[hidden] {
  display: none;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px 20px clamp(30px, 7vh, 72px);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.access-gate.is-open {
  opacity: 1;
}

.access-gate__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 58%, rgba(174, 126, 61, 0.16), transparent 38%),
    #e3e5e8;
}

.access-gate__panel {
  position: relative;
  width: min(100%, 470px);
  box-sizing: border-box;
  padding: clamp(25px, 4vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(231, 230, 227, 0.92)),
    #eeece8;
  box-shadow:
    0 28px 90px rgba(20, 18, 15, 0.32),
    inset 0 1px 0 #fff;
  color: #23211e;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.access-gate.is-open .access-gate__panel {
  transform: none;
}

.access-gate.is-success .access-gate__panel {
  transform: scale(0.985);
  box-shadow:
    0 28px 90px rgba(20, 18, 15, 0.22),
    0 0 0 3px rgba(174, 126, 61, 0.45);
}

.access-gate--hero {
  display: block;
  padding: 0;
  pointer-events: none;
}

/* The hero gate stands in for the photograph, so there is nothing to dim. */
.access-gate--hero .access-gate__backdrop {
  display: none;
}

.access-gate--hero .access-gate__panel {
  position: absolute;
  left: var(--access-card-left);
  top: var(--access-card-top);
  width: var(--access-card-width);
  height: var(--access-card-height);
  max-height: var(--access-card-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 2.2vw, 28px);
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--access-card-radius);
  background: #f2f3f2;
  box-shadow:
    0 30px 80px -20px rgba(35, 33, 30, 0.35),
    0 10px 28px -12px rgba(35, 33, 30, 0.25);
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(0.98);
}

.access-gate--hero.is-open .access-gate__panel {
  transform: translate(-50%, -50%);
}

.access-gate--hero.is-success .access-gate__panel {
  transform: translate(-50%, -50%) scale(0.985);
}

.access-gate__split-half {
  z-index: 4;
  visibility: visible !important;
  opacity: 1;
  transition:
    transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.32s ease;
}

.access-gate.is-splitting .access-gate__split-half--top {
  opacity: 0;
  transform: translate3d(0, -64px, 0) !important;
}

.access-gate.is-splitting .access-gate__split-half--bottom {
  opacity: 0;
  transform: translate3d(0, 64px, 0) !important;
}

.access-gate--hero .access-gate__brand,
.access-gate--hero .access-gate__close {
  display: none;
}

.access-gate--hero h2 {
  width: min(420px, 100%);
  align-self: center;
  font-size: clamp(1.15rem, 3vw, 1.42rem);
  word-spacing: 0.12em;
}

.access-gate--hero .access-gate__form label {
  margin-top: 12px;
  margin-bottom: 4px;
}

.access-gate--hero .access-gate__field {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.access-gate--hero .access-gate__field input {
  grid-area: 1 / 1;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 10px 52px 10px 12px;
  border: 1px solid rgba(35, 33, 30, 0.18);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
}

.access-gate--hero .access-gate__field .access-gate__reveal {
  z-index: 1;
  grid-area: 1 / 1;
  justify-self: end;
}

.access-gate--hero .access-gate__field:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.access-gate--hero .access-gate__field input:focus {
  border-color: #957737;
  box-shadow: 0 0 0 3px rgba(174, 126, 61, 0.14);
}

.access-gate--hero .access-gate__field button[type='submit'] {
  grid-area: 2 / 1;
  min-width: 100%;
  min-height: 48px;
  padding-inline: 14px;
}

.access-gate--hero.has-error .access-gate__field {
  border: 0;
  animation: none;
}

.access-gate--hero.has-error .access-gate__field input {
  border-color: #a34a3d;
  animation: access-shake 0.32s ease;
}

.access-gate--hero .access-gate__status {
  min-height: 0;
  margin: 0;
}

.access-gate--hero .access-gate__status:not(:empty) {
  min-height: 18px;
  margin: 6px 4px 0;
}

.access-gate__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(35, 33, 30, 0.12);
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.52);
  color: #23211e;
  font: 400 1.25rem/1 sans-serif;
}

.access-gate__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 44px;
  margin-bottom: 28px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-gate__brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.access-gate__eyebrow {
  margin: 0 0 8px;
  color: #8c6532;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.access-gate h2 {
  margin: 0;
  font-family: 'Clash Display', ui-rounded, 'SF Pro Rounded', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.access-gate__form label {
  display: block;
  margin-bottom: 7px;
  color: #59544e;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-gate__field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(35, 33, 30, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.access-gate__field:focus-within {
  border-color: #957737;
  box-shadow: 0 0 0 3px rgba(174, 126, 61, 0.14);
}

.access-gate.has-error .access-gate__field {
  border-color: #a34a3d;
  animation: access-shake 0.32s ease;
}

.access-gate__field input {
  min-width: 0;
  padding: 10px 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #23211e;
  font: 600 1rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  letter-spacing: 0.08em;
}

.access-gate__field button {
  min-width: 94px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  background: #23211e;
  color: #fff;
  font: 700 0.78rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui,
    sans-serif;
  transition:
    transform 0.2s,
    background 0.2s;
}

.access-gate__field button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #23211e;
}

.access-gate__field button:disabled {
  cursor: wait;
  opacity: 0.62;
}

/* Eye toggle: quiet icon button between the input and Unlock. */
.access-gate__field .access-gate__reveal {
  display: grid;
  place-items: center;
  min-width: 44px;
  padding: 0;
  background: transparent;
  color: #6e655b;
}

@media (hover: hover) {
  .access-gate__field button:hover {
    background: #806333;
    transform: translateY(-1px);
  }

  .access-gate__field .access-gate__reveal:hover {
    background: rgba(35, 33, 30, 0.07);
    color: #23211e;
    transform: none;
  }
}

.access-gate__reveal svg {
  width: 19px;
  height: 19px;
}

.access-gate__reveal .access-gate__eye-off,
.access-gate__reveal.is-on .access-gate__eye {
  display: none;
}

.access-gate__reveal.is-on .access-gate__eye-off {
  display: block;
}

.access-gate__status {
  min-height: 18px;
  margin: 8px 4px 0;
  color: #a34a3d;
  font-size: 0.76rem;
}

.access-gate__public {
  margin: 2px 0 0;
  color: #625d56;
  font-size: 0.8rem;
  text-align: center;
}

.access-gate__public a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #6e4b1d;
  font-weight: 700;
  text-underline-offset: 3px;
}

.access-gate--hero .access-gate__public {
  width: min(420px, 100%);
  align-self: center;
  margin-top: 16px;
  font-size: 0.76rem;
}

.access-gate.is-success .access-gate__status {
  color: #396b4a;
}

@keyframes access-shake {
  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .access-gate {
    top: var(--access-vv-top, 0);
    bottom: auto;
    box-sizing: border-box;
    width: 100%;
    height: var(--access-vv-height, 100dvh);
    place-items: center;
    padding:
      max(16px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }

  .access-gate__panel {
    max-height: calc(var(--access-vv-height, 100dvh) - 24px);
    padding: clamp(18px, 5vw, 26px);
    overflow: hidden auto;
    overscroll-behavior: contain;
    border-radius: 22px;
  }

  /* Reclaim vertical space so the field and Unlock button stay above the
     keyboard and its autofill accessory bar on small screens. */
  .access-gate__brand {
    margin-bottom: 14px;
  }
}

/* The password form replaces the hero photograph at every breakpoint. The
   same card then splits to reveal the photograph and begin the cloud journey. */
.access-gate--hero .access-gate__form {
  width: min(420px, 100%);
  align-self: center;
}

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .access-gate--hero .access-gate__panel {
    padding: 12px;
  }

  .access-gate--hero h2 {
    font-size: 1.25rem;
  }

  .access-gate--hero .access-gate__form label {
    margin-top: 6px;
    margin-bottom: 3px;
    font-size: 0.64rem;
  }

  .access-gate--hero .access-gate__field {
    gap: 8px;
  }

  .access-gate--hero .access-gate__field input,
  .access-gate--hero .access-gate__field button[type='submit'] {
    min-height: 44px;
  }

  .access-gate--hero .access-gate__public {
    font-size: 0.7rem;
  }

  .access-gate--hero .access-gate__public a {
    min-height: 32px;
  }
}

/* A software keyboard leaves very little height. Drop the tagline and nudge the
   name down so it clears the logo instead of colliding with it. */
@media (max-height: 560px) {
  html.is-hero-gate-open .hs-role {
    display: none;
  }

  html.is-hero-gate-open .hs-name {
    margin-top: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-gate,
  .access-gate__panel,
  .access-gate__split-half {
    transition: none;
  }

  .access-gate.has-error .access-gate__field {
    animation: none;
  }
}
