/* =====================================================
   PORTFOLIO
   Font: Open Sans via Google Fonts
   ===================================================== */

/* --- Variables --- */
:root {
  --primary-blue: #0074bc;
  --primary-blue-strong: #00578c;
  --primary-green: #00855c;
  --primary-green-strong: #006646;
  --highlight-green: #ddebe7;
  --highlight-blue: #dde9f0;
  --surface-canvas: #f6f6f6;
  --surface-nav: #fff;
  --surface-l1: #e9e9e9;
  --surface-l2: #e0e0e0;
  --surface-l3: #999;
  --surface-l4: #474747;
  --text-primary: #333;
  --text-strong: #222;
  --text-light: #666;
  --text-inverted: #fff;
  --text-highlight-green: #035b40;
  --text-highlight-blue: #005e98;
  --text-error: #804141;
  --border-light: #ddd;
  --border-default: #bfbfbf;
  --border-strong: #333;
  --border-green: #006646;
  --border-blue: #00578c;
  --border-highlight-green: #93d8c1;
  --border-highlight-blue: #7aabca;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background-color: var(--surface-canvas);
  color: var(--text-primary);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  line-height: 150%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 72px;
  overflow-x: hidden;
}

h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0;
  line-height: 125%;
  font-weight: 600;
}

h1 { 
  font-size: 2.0rem; 
  line-height: 150%; 
  font-weight: 700; 
  margin-top: 0;
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p {
  margin-top: 0;
}

a {
  color: var(--primary-blue);
}

a:visited {
  color: var(--primary-blue);
}

a:hover {
  color: var(--primary-blue-strong);
}

img {
  max-width: 100%;
  border-radius: 8px;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

ul, ol {
  margin: 0 0 16px 0;
  padding-left: 1.5rem;
}

svg:not(:root) {
  overflow: visible;
}

/* --- Utilities --- */
.bold { font-weight: 700; }
.light { color: var(--text-light); font-weight: 400; }
.small-text { margin-bottom: 8px; font-size: .8rem; }
.large-text { margin-top: 4px; font-size: 1.3rem; }
.xl-text { font-size: 1.5rem; line-height: 150%; }
.no-bottom-padding { margin-bottom: 0; }
.neg-padding { margin-bottom: -16px; }
.bottom-margin { margin-bottom: 16px; }
.bottom-padding-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

.svg-large { width: 48px; height: 48px; flex-shrink: 0; }
.svg-small { width: 24px; height: 24px; flex-shrink: 0; }
.svg-xs { width: 16px; height: 16px; aspect-ratio: 1; flex-shrink: 0; }
.icon { width: 32px; height: 32px; flex-shrink: 0; }
.icon-padding { width: 32px; height: 32px; padding: 4px; }
.emoji { font-style: normal; }

.highlight { background-color: var(--highlight-blue); }

/* --- Skip Link --- */
.skip-link {
  background-color: var(--surface-canvas);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 1px;
  display: block;
  color: var(--text-inverted);
  text-align: center;
  font-size: .8rem;
  text-decoration: none;
  margin-top: -8px;
  padding: 4px;
  z-index: 10000;
  overflow: hidden;
  transition: background-color .3s, height .4s, margin .3s;
}

.skip-link:focus {
  background-color: var(--primary-green-strong);
  height: auto;
  margin-top: 0;
  outline: none;
}

/* --- Container --- */
.container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Primary Navigation --- */
.primary-nav {
  background-color: var(--surface-nav);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.primary-nav-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  column-gap: 24px;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0 8px;
  text-decoration: none;
  transition: box-shadow .3s cubic-bezier(.215, .61, .355, 1);
}

.brand:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: -2px;
  border-radius: 4px;
}

.brand:hover {
  color: var(--primary-green);
}

.brand:visited {
  color: var(--primary-green);
}

.primary-nav-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-nav-link {
  display: block;
  color: var(--text-light);
  padding: 24px 16px;
  text-decoration: none;
  font-size: 1rem;
  transition: box-shadow .3s cubic-bezier(.215, .61, .355, 1);
}

.primary-nav-link:hover {
  color: var(--primary-green-strong);
  box-shadow: 0 -2px 0 var(--primary-green) inset;

}

.primary-nav-link:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: -2px;
  border-radius: 4px;
}

.primary-nav-link:visited {
  color: var(--text-light);
}

.primary-nav-link[aria-current="page"] {
  color: var(--primary-green);
  font-weight: 600;
  box-shadow: 0 -3px 0 var(--primary-green) inset;
}

.menu-button {
  display: none;
  margin-left: auto;
  padding: 16px;
  cursor: pointer;
  color: var(--text-light);
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
}

.menu-button:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: -2px;
  border-radius: 4px;
}

.menu-button.is-open {
  background-color: var(--highlight-green);
  color: var(--text-highlight-green);
  border-radius: 8px;
}

.nav-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 14px;
  gap: 4px;
  pointer-events: none;
}

.nav-icon::before,
.nav-icon::after,
.nav-icon span {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.15s ease;
}

.menu-button.is-open .nav-icon::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-button.is-open .nav-icon span {
  opacity: 0;
  transform: scaleX(0);
}
.menu-button.is-open .nav-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Main Content --- */
main {
  flex: 1;
  margin: 0 24px;
}

/* --- Main Case Study Overrides --- */
.main.case-study {
  max-width: 940px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

/* --- Section: Landing --- */
.landing {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 40px 0;
}

.landing-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0px;
  max-width: 868px;
  width: 100%;
}

.cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.cta.side-by-side {
  gap: 24px;
  flex-direction: row;
}

/* --- Section: Companies --- */
.companies {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  padding-top: 64px;
  padding-bottom: 64px;
}

.company-experience {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 868px;
  width: 100%;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  padding: 0;
}

.company {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-light);
  background-color: var(--surface-l1);
  border-radius: 12px;
  padding: 16px;
  justify-content: flex-start;
  align-items: flex-start;
  transition: box-shadow .3s;
}

.company:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  color: var(--text-primary);
}

.company:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: 3px;
  border-radius: 12px;
}

.company-logo {
  max-width: 100px;
  max-height: 40px;
  border-radius: 0;
}

.company-title-industry {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.company-logo-and-password {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-self: stretch;
  align-items: flex-start;
  margin-bottom: 8px;
}

.password-protected {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-light);
  background-color: var(--surface-l1);
  border-radius: 8px;
  padding: 2px 12px;
  font-size: .8rem;
}

/* --- Section: Work (case study list) --- */
.work {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  padding-bottom: 64px;
  padding-top: 64px;
}

.work-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  max-width: 868px;
  width: 100%;
}

.case-study-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.case-study-preview {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.case-study-preview-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.case-study-preview-image {
  flex: 1;
  min-width: 0;
  width: 100%;
  border-radius: 12px;
}

.case-study-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-study-coming-soon {
  border: 1px solid var(--border-highlight-green);
  background-color: var(--highlight-green);
  color: var(--text-highlight-green);
  border-radius: 8px;
  padding: 24px;
}

/* --- Section: Designs (work page gallery) --- */
.designs {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 64px 0;
}

.designs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 868px;
  width: 100%;
}

.image-gallery {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 8px;
  flex: 1;
}

.column img {
  width: 100%;
  border-radius: 8px;
}

/* --- Section: About --- */
.about {
  display: flex;
  flex-direction: column;
  padding: 40px 0;
  gap: 40px;
}

.about-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 868px;
  width: 100%;
}

/* --- Section: Philosophy (tabs) --- */
.philosophy {
  padding: 40px 0;
  display: flex;
  justify-content: center;
  background-color: var(--surface-canvas);
}

.philosophy-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 868px;
  width: 100%;
}

.philosophy-text {
  font-size: 3rem;
  line-height: 125%;
}

.tabs {
  width: 100%;
}

.tabs-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  margin-bottom: 8px;
  font-size: .85rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tabs-menu::-webkit-scrollbar {
  display: none;
}

.tab {
  color: var(--text-light);
  cursor: pointer;
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: 2px;
  padding: 8px 8px;
  font-weight: 600;
  font-size: .85rem;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .3s, color .3s;
}

.tab:hover {
  border-bottom-color: var(--border-default);
  color: var(--text-primary);
}

.tab[aria-selected="true"] {
  border-bottom-color: var(--primary-green);
  color: var(--primary-green-strong);
}

.tab:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: -2px;
  border-radius: 4px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.tab-pane:focus {
  outline: none;
}

/* --- Section: Experience --- */
.experience {
  padding: 40px 0;
  display: flex;
  justify-content: center;
}

.experience-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  max-width: 878px;
}

.experience-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  list-style: none;
  margin: 0;
}

.work-experience-line-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border-default);
  width: 100%;
  padding: 16px;
}

.company-and-year,
.title-and-industry {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-self: stretch;
}

/* --- Section: Contact --- */
.contact {
  padding: 40px 0;
}

.contact-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  max-width: 868px;
  padding: 0 40px;
  gap: 24px;
}

.contact-stack {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  width: 100%;
  padding: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--text-light);
  align-self: baseline;
}

.schedule-call {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 40px;
}

/* --- Forms --- */
.contact-form {
  max-width: 500px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.input-and-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
}

.text-field,
.select-field {
  display: block;
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background-color: var(--surface-nav);
  transition: border-color .2s, outline .2s;
}

.text-field {
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.required-mark {
  color: var(--text-error);
}

.field-error {
  display: none;
  font-size: .8rem;
  color: var(--text-error);
}

.field-error.is-visible {
  display: block;
}

.text-field.is-invalid,
.select-field.is-invalid {
  border-color: #c94040;
}

.text-field.is-invalid:focus,
.select-field.is-invalid:focus {
  outline-color: #c94040;
  border-color: #c94040;
}

.text-field:hover { border-color: var(--border-strong); }
.text-field:focus {
  outline: 2px solid var(--primary-blue-strong);
  outline-offset: 3px;
  border-color: var(--primary-blue);
}

.select-field:hover { border-color: var(--border-strong); }
.select-field:focus {
  outline: 2px solid var(--primary-blue-strong);
  outline-offset: 3px;
  border-color: var(--primary-blue);
}

.success-message {
  border: 1px solid var(--border-highlight-green);
  background-color: var(--highlight-green);
  color: var(--text-highlight-green);
  border-radius: 8px;
  padding: 24px;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.form-alert {
  width: 100%;
  color: var(--text-error);
  background-color: #fdf2f2;
  border: 1px solid #e6a1a1;
  border-radius: 8px;
  padding: 16px;
}

.form-alert p {
  margin-bottom: 8px;
  font-weight: 600;
}

.form-alert ul {
  margin: 0;
  padding-left: 1.25rem;
}

.form-alert a {
  color: var(--text-highlight-blue);
}

.form-alert a:hover,
.form-alert a:visited {
  color: var(--text-highlight-blue);
}

.form-alert a:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.error-message {
  width: 100%;
  max-width: 480px;
  color: var(--text-error);
  background-color: #fdf2f2;
  border: 1px solid #e6a1a1;
  border-radius: 8px;
  padding: 16px;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* --- Buttons --- */
.primary-btn,
.secondary-btn,
.disabled {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 50px;
  padding: 12px 32px;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 100%;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: box-shadow .3s cubic-bezier(.215, .61, .355, 1), transform .3s, background-color .3s;
}

.primary-btn {
  border: 1px solid var(--border-blue);
  background-color: var(--primary-blue);
  color: var(--text-inverted);
}

.primary-btn:hover {
  border-color: var(--primary-blue-strong);
  color: var(--text-inverted);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,116,188,.15);
}

.primary-btn:visited {
  color: var(--text-inverted);
}

.primary-btn:active { transform: translateY(0); }

.primary-btn:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: 3px;
  border-radius: 25px;
}

.primary-btn:visited {
  color: var(--text-inverted);
}

.secondary-btn {
  border: 1px solid var(--border-blue);
  background-color: var(--surface-canvas);
  color: var(--primary-blue);
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
}

.secondary-btn:hover {
  background-color: var(--surface-l1);
  outline: 1px solid var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.secondary-btn:active { transform: translateY(0); }

.secondary-btn:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: 3px;
  border-radius: 25px;
}

.secondary-btn.mobile-only { display: none; }

.disabled {
  border: 1px solid var(--border-default);
  background-color: var(--surface-l1);
  color: var(--text-light);
  cursor: default;
  pointer-events: none;
}

/* --- Hero (case study pages) --- */
.hero {
  padding-top: 40px;
}

.hero-image {
  border-radius: 24px;
  width: 100%;
}

/* --- Case Study Layout --- */
.case-study {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 88px;
}

.content-wrapper {
  display: flex;
  flex-direction: row;
  gap: 24px;
  position: relative;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.secondary-navigation {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  width: 100px;
  flex-shrink: 0;
  padding: 0;
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

.secondary-navigation:focus {
  outline: 2px solid var(--border-green);
  outline-offset: 3px;
  border-radius: 4px;
}

.secondary-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 14px 0;
  margin: 0;
  width: 100px;
}

.secondary-nav-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  padding: 16px 8px;
  text-decoration: none;
  font-size: .85rem;
  transition: padding .3s, color .3s;
}

.secondary-nav-link:hover {
  color: var(--primary-green-strong);
  box-shadow: 2px 0 0 var(--primary-green) inset;
}

.secondary-nav-link.is-active {
  color: var(--primary-green);
  font-weight: 600;
}

.secondary-nav-link.back {
  display: flex;
  align-items: center;
  gap: 4px;
}

.secondary-nav-link:visited {
  color: var(--text-light);
}

.secondary-nav-link.back:visited {
  color: var(--text-light);
}

.secondary-nav-link:focus {
  outline: 2px solid var(--border-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Case Study Text Components --- */
.text-with-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: 8px;
  /*margin-bottom: 24px;*/
}

.text-with-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 0;
}

.text-with-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.context-stack {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  padding: 0;
}

.context-stack-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.context-stack-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.by-line {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.figma-embed-load {
  grid-column-gap: 16px;
  grid-row-gap: 16px;
  width: 100%;
  align-self: stretch;
  color: var(--text-inverted);
  text-align: center;
  background-image: url(../images/insights-figma-preview.jpg);
  background-position: 50% 0;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 8px;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  text-decoration: none;
  display: flex;
}

.figma-embed-load:hover {
  color: var(--border-highlight-blue);
  outline: 2px solid var(--border-highlight-blue);
  outline-offset: 2px;
}

.figma-embed-load:focus {
  outline: 2px solid var(--primary-blue-strong);
  outline-offset: 3px;
}

.play {
  width: 80px;
}

/* --- Tags --- */
.role-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-highlight-green);
  background-color: var(--highlight-green);
  color: var(--text-highlight-green);
  text-transform: capitalize;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 600;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-highlight-blue);
  background-color: var(--highlight-blue);
  color: var(--text-highlight-blue);
  text-transform: capitalize;
  border-radius: 99px;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 600;
}

.skills-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-list-item {
  display: flex;
}

/* --- Team Members --- */
.teammember-list {
  display: flex;
  flex-direction: row;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.teammember {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 32px;
  height: 32px;
  position: relative;
}

.teammember:hover .nametag {
  display: flex;
}

.teammember-photo {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  aspect-ratio: 1;
  object-fit: cover;
}

.nametag {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-l4);
  color: var(--text-inverted);
  text-align: center;
  border-radius: 4px;
  flex-direction: column;
  align-items: center;
  padding: 4px 16px;
  font-size: .85rem;
  line-height: 125%;
  white-space: nowrap;
}

/* --- Cards --- */
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border-light);
  background-color: var(--surface-l1);
  border-radius: 16px;
  justify-content: flex-start;
  align-self: stretch;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  padding: 24px;
  transition: transform .3s cubic-bezier(.215, .61, .355, 1), box-shadow .3s cubic-bezier(.215, .61, .355, 1), border-color .3s;
}

.card:hover {
  border-color: var(--border-default);
  background-color: var(--surface-l2);
  transform: translate(0, -5px);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.card:focus {
  outline: 2px solid var(--primary-blue-strong);
  outline-offset: 3px;
}

.card.goal {
  gap: 4px;
  padding: 16px 14px;
  white-space: nowrap;
}

.card.finding {
  padding-bottom: 0;
}

.card-list {
  display: flex;
  flex-direction: row;
  gap: 16px;
  list-style: none;
  padding: 8px 0;
  flex: 1;
  flex-wrap: wrap;
  width: 100%;
  align-items: flex-start;
}

.card-list.no-bottom-margin { margin-bottom: 0; }
.card-list.vertical { flex-direction: column; }

.card-list-item {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  align-items: flex-start;
  width: 100%;
}

.card-list.wide .card-list-item,
.card-list.row .card-list-item,
.card-list._3x2 .card-list-item,
.card-list._3x3 .card-list-item {
  flex: 1;
  width: auto;
}

.card-list._3x2 .card-list-item,
.card-list._3x3 .card-list-item {
  min-width: 30%;
}

.card-list._3x2 .card-list-item:nth-child(n+4) {
  min-width: 40%;
}

.card-list-item.goal-wide {
  min-width: 0;
}

.card-list-item.goal-narrow {
  width: fit-content;
  min-width: 0;
}

/* --- Media and Captions --- */
.media-and-caption {
  width: 100%;
  margin-bottom: 40px;
}

.media-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  aspect-ratio: 1.85;
  border: 1px solid var(--border-light);
  background-color: var(--surface-l1);
  border-radius: 24px;
  width: 100%;
  max-height: 433px;
  padding: 24px;
  overflow: hidden;
  object-fit: cover;
}

.media-wrapper img {
  width: 100%;
  height: auto;
  align-self: stretch;
  object-fit: contain;
}

.media-wrapper.video {
  padding: 24px;
}

.media-wrapper.auto-ratio {
  aspect-ratio: auto;
  max-height: none;
  display: flex;
  justify-content: center;
}

.media-wrapper.auto-ratio._2-col img {
  flex: 1;
  max-width: 50%;
  min-width: 40%;
}
/*
.media-wrapper.white {
  background-color: var(--surface-nav);
}
*/
.media-wrapper._3-up-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  aspect-ratio: auto;
  max-height: none;
}

.media-wrapper._3-up-header h3 { grid-column: 1 / -1; }

.media-wrapper._3-up {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 16px;
  aspect-ratio: auto;
  max-height: none;
}

.media-wrapper.auto-ratio img {
  height: auto;
  object-fit: initial;
}

.media-wrapper._3-up img,
.media-wrapper._3-up-header img {
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

.media-wrapper._3-up img.sm,
.media-wrapper._3-up-header img.sm { display: none; }

.media-pair {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 24px;
  width: 100%;
  border: 1px solid var(--border-light);
  background-color: var(--surface-l1);
  border-radius: 24px;
  overflow: hidden;
}

.media-pair img {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.media-text {
  min-width: 25%;
  max-width: 30%;
  font-size: .85rem;
  margin-bottom: 8px;
}

.horizontal {
  display: flex;
  flex-direction: row;
}

.vertical {
  display: flex;
  flex-direction: column;
}

._16-gap {
  gap: 16px;
}

.caption {
  margin-top: 8px;
  padding: 0 16px;
  font-size: .85rem;
  color: var(--text-light);
}

.caption.l-m { display: block; }
.caption.sm { display: none; }

.phone { max-height: 400px; }
.phone.sm { display: none; }
.l-m { display: block; }
.sm { display: none; }

.shrink-to-fit { height: 100%; }
.no-border-radius { border-radius: 0; }

.no-border-radius.sm { display: none; }
.no-border-radius.lg { display: block; }

.before-after {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  height: 100%;
}

.before-after.centered {
  justify-content: flex-start;
  align-items: center;
}

.lighthouse-scores {
  display: flex;
  flex-direction: row;
  gap: 40px;
  margin-top: 16px;
}

.score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  color: var(--text-light);
}

.score img {
  width: 80px;
  height: auto;
}

/* --- Testimonials --- */
.testimonial-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 40px;
  width: 100%;
  margin-bottom: 24px;
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 40%;
  max-width: 47%;
}

.testimonial-text {
  color: var(--text-light);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 160%;
  margin: 0;
  padding: 0;
}

/* --- User Journey --- */
.user-journey {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
  justify-content: center;
  margin-bottom: 24px;
}

.user-journey-step {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  border: 1px solid var(--border-highlight-green);
  background-color: var(--highlight-green);
  color: var(--text-strong);
  text-align: center;
  border-radius: 8px;
  padding: 8px;
  font-size: .85rem;
  line-height: 125%;
}

.arrow {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 30px;
}

.stem {
  position: absolute;
  background-color: var(--border-green);
  width: 100%;
  height: 2px;
  align-self: center;
}

.angle {
  position: absolute;
  right: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--border-green);
  border-right: 2px solid var(--border-green);
  transform: rotate(45deg);
}

/* --- Documentation Text (accessibility page) --- */
.documentation-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  max-width: 33%;
}

/* --- Breadcrumb Levels (documentation) --- */
.breadcrumb-levels {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-self: stretch;
}

.breadcrumb-level {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  gap: 8px;
  margin-bottom: 24px;
}

.breadcrumb-level p {
  margin: 0;
}

.breadcrumb-level img:not([src*="5-deep"]) {
  height: var(--breadcrumb-height, auto);
  width: auto;
}

.breadcrumb-level img[src*="5-deep"] {
  height: auto;
  width: 100%;
}

/* --- Misc Content Utilities --- */
.title { white-space: nowrap; max-width: 200px; }
.nested-list { margin-bottom: 0; }

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Slider (financial insights) --- */
.slider {
  position: relative;
  width: 100%;
  /*margin-bottom: 40px;*/
  overflow: hidden;
}

.slider-mask {
  width: 100%;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform .4s cubic-bezier(.215, .61, .355, 1);
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
}

.slide img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 0px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.slider-dot {
  width: 1.5em;
  min-width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  position: relative;
}

.slider-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.5em;
  height: 1.5em;
  border-radius: 24px;
  background-color: var(--text-light);
  transition: background-color .25s ease-in-out, width .25s ease-in-out;
}

.slider-dot:hover {
  color: var(--primary-blue)
}

.slider-dot.is-active::before {
  background-color: var(--primary-green);
  width: 3.5em;
}

.slider-dot:hover::before {
  background-color: var(--primary-blue);
}

.slider-dot:focus-visible {
  outline: none;
}

.slider-dot:focus-visible::before {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

.arrows {
  pointer-events: all;
  background-color: rgba(255,255,255,.9);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.arrows:hover { background-color: #fff; }

.slider-prev { left: 8px; }
.slider-next { right: 8px; }

/* --- Password Page --- */
.password-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 40px 16px;
}

.password-wrapper form{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 500px;
}

.password-wrapper h1 {
  font-size: 1.8rem;
}

/* --- Scroll to Top (fixed button) --- */
.scroll-to-top {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  z-index: 98;
  border: 1px solid var(--border-light);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  background-color: rgba(255,255,255,.9);
  border-radius: 8px;
  outline: none;
  color: var(--text-light);
  font-size: .85rem;
  padding: 16px;
  text-decoration: none;
  position: fixed;
  inset: auto 2% 3% auto;
  transition: color .3s, outline .3s;
}

.scroll-to-top:hover {
  color: var(--primary-green-strong);
  outline: 1px solid var(--border-green);
}

.scroll-to-top:focus {
  outline: 2px solid var(--border-green);
  outline-offset: -2px;
  border-radius: 4px;
}

.scroll-to-top:visited {
  color: var(--text-light);
}

/* --- Social Links --- */
.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  color: var(--text-light);
  padding: 16px;
  text-decoration: none;
  transition: color .3s;
}

.social-link:hover { color: var(--primary-green-strong); }

.social-link:focus {
  outline: 2px solid var(--border-green);
  outline-offset: -2px;
  color: var(--primary-green-strong);
  border-radius: 4px;
}

/* --- Footer --- */
.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  border-top: 1px solid var(--border-light);
  background-color: var(--surface-l1);
  margin-top: auto;
  position: relative;
  z-index: 99;
}

.footer-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 16px;
  gap: 16px;
  white-space: nowrap;
}

.footer-text {
  color: var(--text-light);
  font-size: .85rem;
}

.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  padding: 16px;
  font-size: .85rem;
  text-decoration: none;
  transition: color .3s;
}

.footer-links:hover { color: var(--primary-green-strong); }

.footer-links:focus {
  outline: 2px solid var(--border-green);
  outline-offset: -2px;
  border-radius: 4px;
}

.footer-links-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  color: var(--text-light);
}

/* =====================================================
   MEDIA QUERIES
   ===================================================== */

/* Small Desktop (1024px) */
@media (max-width: 1024px) {
  .container { max-width: 962px; }
  .landing-wrapper { max-width: 962px; }
  .work-wrapper { max-width: 962px; }
  .designs-wrapper { max-width: 962px; }
  .about-wrapper { max-width: 962px; }
  .company-experience { max-width: 962px; }
  .experience-wrapper { max-width: 962px; }
  .philosophy-wrapper { max-width: 962px; }
  .contact-wrapper { padding: 16px; max-width: 962px;}
  .schedule-call { margin-top: 24px; }
  .philosophy-text { font-size: 2.5rem; }
  .xl-text { font-size: 1.3rem; }
  .column._2,
  .column._3 { margin-top: 16px; }
  .footer-links-wrapper { gap: 8px; }
  .social-link { width: 44px; height: 32px; padding: 8px; }
  .cta.side-by-side { width: 100%; }
  .no-border-radius.lg { display: none; }
  .no-border-radius.sm { display: block; }
  .hero { padding-left: 24px; padding-right: 24px;}
  .context-stack { gap: 24px;}

  /* Hides secondary Nav on case studies */
  .content-wrapper { 
    flex-direction: column; 
    padding: 0 24px;
  }
  .secondary-navigation { display: none; }

  /* Suppress card hover lift on touch devices */
  .card:hover { transform: none; box-shadow: none; }

  /* Testimonials go full-width */
  .testimonial { max-width: 100%; }
}

/* Tablet (768px) */
@media (max-width: 768px) {
  .main {margin: 0 16px;}
  .container { max-width: none; }
  .caption.l-m { display: none; }
  .caption.sm { display: block; }
  .card-list { flex-direction: column; }
  .card-list.wide,
  .card-list._3x2,
  .card-list._3x3 { flex-direction: row; }
  .card-list._3x2 .card-list-item,
  .card-list._3x3 .card-list-item { min-width: 40%; max-width: 50%; }
  .card-list._3x2 .card-list-item:last-child { min-width: 100%; max-width: 100%; }
  .context-stack { gap: 0;}
  .content-wrapper { padding: 0 16px;}

  h1 { font-size: 2rem; }
  .landing-wrapper h1 { font-size: 2.2rem; }

  /* Responsive image size variants */
  .phone.l-m { display: none; }
  .phone.sm { display: block; }
  

  .l-m { display: none; }
  .sm { display: block; }

  /* 3-up grids collapse to single column */
  .media-wrapper._3-up-header,
  .media-wrapper._3-up {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .media-pair {
    flex-direction: column;
    align-items: stretch;
  }

  .media-pair img {
    width: 100%;
  }
  .media-text {
    min-width: none;
    max-width: 100%;
  }

    /* Documentation text goes full-width */
  .documentation-text { max-width: 100%; }

  .company-grid { grid-template-columns: repeat(2, 1fr); }
  .case-study-preview {
    flex-direction: column;
  }
  .case-study-preview-text { order: 1; }
  .case-study-preview-image { order: -1; max-width: 390px; margin: 0 auto; }
  

  /* User journey goes vertical */
  .user-journey { 
    flex-direction: column; 
    align-items: center; 
    justify-content: start;
    gap: 8px;
    width: 100%;
  }
  .user-journey-step {
    padding: 16px 32px;
    align-self: center;
  }
  .arrow { 
    width: 20px; 
    transform: rotate(90deg); 
    margin: 8px 0;
  }

  .contact-stack { grid-template-columns: 1fr; }
  .contact-details { display: none; }
  .schedule-call { margin-top: 24px; }

  .philosophy-text { font-size: 2rem; }
  .xl-text { font-size: 1.2rem; }

  .image-gallery { flex-direction: column; }
  .column { padding: 0; }

  /* Buttons */
  .primary-btn {padding: 18px 40px; font-size: 1rem;}
  .secondary-btn {padding: 18px 40px; font-size: 1rem;}
  .secondary-btn.mobile-only { margin-bottom: 16px; display: block; }

  .footer-wrapper {
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
    padding: 24px;
  }
  .footer-text { text-align: center; }
  .footer-links-wrapper {
    flex-direction: row;
    justify-content: center;
    align-self: stretch;
    align-items: center;
    width: 100%;
    padding: 0;
    gap: 16px;
  }
  .social-link { height: 44px; }

  .philosophy {padding: 0;}
  .philosophy-wrapper { padding: 0; }
  .experience-wrapper { width: 100%; max-width: 100vw; }
  .experience-list { align-self: stretch; max-width: 100vw; }
  .company-and-year,
  .title-and-industry {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .title-and-industry { color: var(--text-light); }

  .context-stack { grid-template-columns: 1fr; }
  .contact-wrapper { padding: 0; }

  .scroll-to-top { display: none; }
}

/* Mobile (480px) */
@media (max-width: 480px) {
  .main {margin: 0 8px;}
  .phone.l-m { display: none; }
  .phone.sm { display: block; }
  .media-wrapper._3-up img.l-m,
  .media-wrapper._3-up-header img.l-m { display: none; }
  .media-wrapper._3-up img.sm,
  .media-wrapper._3-up-header img.sm { display: block; }
  .cta.side-by-side { flex-direction: column; }
  .primary-nav-container { min-height: 72px; position: static; }

  .primary-btn { width: 100%; }
  .secondary-btn { width: 100%; }

  .primary-nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background-color: var(--surface-nav);
    border-top: 1px solid var(--border-light);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0s 0.3s;
  }

  .primary-nav-list.is-open {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    padding: 0 0 16px;
    transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0s;
  }

  .primary-nav-link {
    width: 100%;
    padding: 16px 24px;
  }

  .menu-button { display: flex; }

  .company-grid { grid-template-columns: 1fr; }
  .card-list.wide,
  .card-list._3x2,
  .card-list._3x3 { flex-direction: column; }
  
}