/* Readability and responsive refinements for the existing KUBEK identity. */
:root {
  --muted: #cbd0df;
  --line: #34344b;
}

html {
  scroll-padding-top: 7rem;
}

section[id], .founder-story, #career-success {
  scroll-margin-top: 0;
}

.nav {
  gap: 28px;
}

.nav-links, .career-nav {
  font-size: 1rem;
}

.nav-links {
  gap: 25px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-actions > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

.nav-actions .nav-contact {
  color: var(--cyan);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding-block: 8px;
  border-bottom: 2px solid var(--cyan);
}

.nav-actions .nav-contact:hover {
  color: var(--text);
  border-color: var(--text);
}

.header-controls {
  display: none;
}

.mobile-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  color: var(--cyan);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

.mobile-contact:hover {
  color: var(--text);
  border-color: var(--text);
  background: #1c2235;
}

.nav-links > a, .career-nav > a, .nav > .text-link,
.footer-link, .footer-bottom > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links > a:not(.button), .career-nav > a:not(.button) {
  color: #d6d8e6;
}

.nav-links > a:not(.button):hover, .career-nav > a:not(.button):hover {
  color: var(--cyan);
}

.button, .outline-button, .contact-choices button, .calc-tabs button,
.calc-reset, .dialog-close {
  min-height: 44px;
}

.button {
  max-width: 100%;
  text-align: center;
}

.button-small, .career-nav .button {
  font-size: 1rem;
}

.button-secondary {
  background: #151728;
  color: #eff0fa;
  border: 1px solid #73708e;
}

.button-secondary:hover {
  background: #222136;
  border-color: var(--violet);
  box-shadow: 0 7px 25px #a47aff18;
}

.text-link {
  color: #e2e4ef;
  border-color: #9892b0;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.eyebrow, .tag, .number, .service-label, .path-index,
.launch-note p, .signature span, .founder-signature small,
.footer-main p, .footer-link, .footer-bottom, .form-note,
.reward-note, .small, .help, .data-info, .field-error,
.agent-fit-questions li::before, .calc-header .eyebrow,
.calc-disclaimer, .calc-chart figcaption, .hero-topics span {
  font-size: .875rem;
}

.eyebrow {
  letter-spacing: .12em;
  line-height: 1.6;
}

.number {
  color: #bdb9d1;
}

.service-label, .tag {
  color: #ddd3f4;
}

.lead, .career-lead {
  color: #d4d8e6;
  line-height: 1.75;
}

.hero-backdrop {
  position: relative;
  isolation: isolate;
  background: var(--bg);
}

.hero-backdrop::before, .hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-backdrop::before {
  background: url('/assets/architecture-background.jpeg') center / cover no-repeat;
  opacity: .22;
  filter: saturate(.65);
}

.hero-backdrop::after {
  background:
    linear-gradient(0deg, var(--bg), #0a0a1a00 38%),
    linear-gradient(90deg, #0a0a1ac7, #0a0a1a75 48%, #0a0a1a12);
}

.hero-backdrop .company-hero {
  background: none;
}

.company-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(38px, 5vw, 76px);
  padding-block: 72px 80px;
}

.company-hero .hero-copy {
  min-width: 0;
  max-width: 660px;
}

.company-hero h1 {
  font-size: clamp(3.1rem, 4.8vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -.05em;
  text-wrap: balance;
}

.company-hero .eyebrow {
  margin-bottom: 24px;
}

.company-hero .lead, .hero-backdrop .hero-copy .lead {
  color: #dde1ed;
  font-size: 1.125rem;
  max-width: 580px;
  margin-top: 26px;
}

.company-hero .actions {
  gap: 12px;
  margin-top: 30px;
}

.company-hero .actions .button {
  min-height: 52px;
  gap: 14px;
  padding: 14px 23px;
}

.hero-story-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  min-height: 44px;
  margin-top: 8px;
  font-size: 1rem;
  color: #d4d8e6;
  text-decoration: underline;
  text-decoration-color: #77718c;
  text-underline-offset: 5px;
}

.hero-story-link:hover {
  color: var(--cyan);
}

.company-hero .launch-note {
  gap: 12px;
  max-width: 580px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #59546d;
}

.company-hero .launch-note p, .hero-backdrop .launch-note p {
  color: #d6d9e6;
  font-size: .875rem;
  line-height: 1.65;
}

.tag {
  padding: 4px 10px;
  border-color: #777089;
  background: #171325;
  line-height: 1.5;
}

.hero-portrait {
  align-self: center;
  height: clamp(420px, 41vw, 536px);
  min-height: 0;
  max-height: none;
  border-color: #a48dc152;
  box-shadow: 0 24px 65px #0004;
}

.hero-portrait::after {
  inset: 57% 0 0;
  background: linear-gradient(transparent, #0a0a1aeb);
}

.hero-portrait figcaption {
  bottom: 24px;
  left: 24px;
  right: 24px;
  gap: 3px;
}

.hero-portrait figcaption span {
  color: #e0dceb;
}

.path-card {
  border-color: #4b4a64;
}

.path-career {
  border-color: #695282;
}

.path-action {
  min-height: 44px;
  padding-block: 6px;
}

.path-card small {
  font-size: .875rem;
  color: #d3d1df;
}

.form-note, .reward-note, .help, .calc-disclaimer, .calc-chart figcaption {
  color: #cbd0df;
  line-height: 1.65;
}

.contact-card {
  min-width: 0;
  padding: 32px;
  border: 1px solid #4b4a64;
  border-radius: 20px;
  background: linear-gradient(135deg, #171729, #10101f);
  font-style: normal;
}

.contact-card .eyebrow {
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 1.5rem;
}

.contact-card > p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--muted);
}

.contact-detail {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 44px;
  margin-top: 24px;
  padding: 20px 32px 20px 0;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  color: var(--muted);
  font-size: .875rem;
}

.contact-detail strong {
  font-size: 1.125rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-detail:hover strong, .contact-arrow {
  color: var(--cyan);
}

.contact-arrow {
  position: absolute;
  right: 0;
  top: 50%;
}

.contact-card .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.footer-bottom {
  flex-wrap: wrap;
}

.footer-bottom a {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .contact-card {
    padding: 24px;
  }

  .contact-card .actions {
    grid-template-columns: 1fr;
  }
}

input::placeholder, textarea::placeholder {
  color: #b7b9ce;
}

.dialog-close {
  width: 44px;
  padding: 0;
  line-height: 1;
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 20px;
  }

  .company-hero {
    gap: 40px;
  }

  .company-hero h1 {
    font-size: clamp(3rem, 5.1vw, 3.6rem);
  }

  .hero-portrait {
    height: 440px;
  }

  .company-hero .actions .button {
    padding-inline: 18px;
  }
}

@media (max-width: 1100px) {
  .home-nav {
    min-height: 80px;
  }

  .header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .nav-actions .nav-contact {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid #59566f;
    border-radius: 10px;
    background: #141423;
    color: var(--text);
    font-size: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 18px 24px 24px;
    background: #111121;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 25px #0004;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links > a:not(.button) {
    padding: 10px 4px;
  }

  .nav-actions {
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 10px;
  }
}

@media (max-width: 900px) {
  .nav {
    min-height: 80px;
  }

  .contact, .career-contact {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-status {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .company-hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-block: 52px 60px;
  }

  .company-hero .hero-copy {
    max-width: 660px;
  }

  .company-hero h1 {
    font-size: clamp(2.6rem, 6.5vw, 3.7rem);
  }

  .hero-portrait {
    width: min(100%, 430px);
    height: 470px;
    justify-self: center;
  }

  .hero-backdrop::before {
    background-position: 42% top;
    opacity: .16;
  }

  .hero-backdrop::after {
    background:
      linear-gradient(0deg, var(--bg), #0a0a1a00 45%),
      linear-gradient(90deg, #0a0a1a85, #0a0a1a40);
  }
}

@media (max-width: 700px) {
  .wrap {
    width: calc(100% - 36px);
  }

  .nav {
    min-height: 74px;
    gap: 12px;
  }

  .company-hero {
    padding-block: 40px 48px;
    gap: 32px;
  }

  .company-hero h1 {
    font-size: clamp(2.35rem, 9.7vw, 3.4rem);
    line-height: 1.12;
  }

  .company-hero .eyebrow {
    margin-bottom: 20px;
    letter-spacing: .105em;
  }

  .company-hero .lead, .hero-backdrop .hero-copy .lead {
    margin-top: 22px;
    font-size: 1.0625rem;
    line-height: 1.7;
  }

  .company-hero .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 26px;
    width: 100%;
  }

  .company-hero .actions .button {
    width: 100%;
    font-size: 1rem;
  }

  .company-hero .launch-note {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
  }

  .company-hero .launch-note p {
    flex: 1 1 240px;
  }

  .hero-portrait {
    width: min(100%, 380px);
    height: 420px;
  }

  .hero-portrait figcaption {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .hero-portrait img {
    object-position: center 23%;
  }

  .career-nav {
    gap: 12px;
    font-size: 1rem;
  }

  .career-nav .button {
    padding: 10px 14px;
    font-size: 1rem;
  }

  .career-hero h1, .referral-hero h1 {
    font-size: clamp(2.25rem, 8.5vw, 3.3rem);
    overflow-wrap: anywhere;
  }

  .career-lead, .referral-hero .lead {
    font-size: 1.0625rem;
  }

  .section-heading, .role-title, .role-details, .contact-copy,
  .career-contact > div, .referral-hero > div {
    min-width: 0;
  }

  .service-label {
    font-size: .875rem;
  }

  .section-tail {
    text-align: left;
  }

  .contact-choices button {
    min-height: 48px;
  }

  .dialog-close {
    top: 7px;
    right: 7px;
  }
}

@media (max-width: 480px) {
  .nav {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-block: 12px;
  }

  .home-nav .header-controls {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .brand {
    gap: 8px;
    font-size: 1rem;
  }

  .monogram {
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    border-radius: 9px;
  }

  .career-nav, .nav > .text-link {
    margin-left: auto;
  }

  .path-card {
    padding: 24px;
  }

  .path-card h3 {
    line-height: 1.2;
  }

  .services {
    grid-template-columns: 1fr;
  }

  .service {
    padding: 24px;
  }

  .service p {
    font-size: 1rem;
  }

  .service-top {
    margin-bottom: 24px;
  }

  .principles {
    column-gap: 20px;
  }

  .contact-form {
    padding: 24px 18px;
  }

  .role-title > .button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .company-hero h1 {
    font-size: clamp(2.2rem, 10.3vw, 2.45rem);
    letter-spacing: -.045em;
  }

  .company-hero .eyebrow {
    letter-spacing: .085em;
  }

  .hero-portrait {
    height: 360px;
  }

  .career-nav .button {
    padding-inline: 12px;
  }

  .steps, .principles {
    grid-template-columns: 1fr;
  }

  .principle:last-child {
    grid-column: auto;
  }

  .contact-choices {
    flex-direction: column;
  }
}
