/* Global responsive rules */
@media (max-width: 600px) {
  :root { --page-inset: 1em; }

  nav.dark .link a {
    font-size: 1.2rem;
  }

  .app .theme-switch {
    width: calc(5.07rem + 2px);
    height: calc(1.9rem - 2px);
  }

  .app .theme-switch .site-theme-toggle i {
    font-size: calc(1rem - 4px);
  }

  .app .theme-switch #site-theme-toggle i {
    font-size: calc(1rem - 4px);
  }
}

/* Global responsive rules */
@media (max-width: 480px) {
  :root { --social-icon-size: 43px; }
}

/* Global responsive rules */
@media (min-width: 901px) and (max-width: 1800px) {

  .hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    text-align: center;
  }

  .hero-image h1 {
    font-size: 3.2rem;
  }

  .hero-image h2 {
    font-family: var(--display-bold), Helvetica, sans-serif;
    font-size: 1.9rem;
  }

  .hero-cards:nth-of-type(1) {
    flex-direction: row;
    gap: 0.8em;
  }

  .site-header {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2;
    width: 100px;
    padding: 2em;
    text-align: right;
  }
}

/* Global responsive rules */
@media (max-width: 900px) {

  .hero-cards:nth-of-type(1) {
    flex-direction: row;
    gap: 0.8em;
  }

  .site-intro {
    flex-direction: column;
    gap: 2em;
  }

  .site-intro > div {
    text-align: right;
  }
}

/* Global responsive rules */
@media (max-width: 480px) {

  .hero {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .hero h1 {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    text-align: center;
    white-space: nowrap;
  }
  
}

/* Home layout responsive rules */
@media (max-width: 600px) {
  .about-link {
    font-size: 1.2rem;
  }
}

/* Hero responsive rules */
@media (min-width: 601px) {
  .hero-motion__mark {
    width: min(36%, 90px);
  }

  .site-name {
    top: var(--page-inset);
    left: 50vw;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-name p.site-role {
    display: block;
  }

  .site-name p {
    line-height: 1;
  }

  .site-name p + p {
    margin-top: calc(0.05em + 7px);
  }
}

/* Hero responsive rules */
@media (min-width: 601px) {
  .hero-byline {
    position: fixed;
    top: var(--page-inset);
    right: auto;
    left: var(--page-inset);
    z-index: 150;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
  }

  .hero-byline p {
    width: max-content;
    max-width: none;
    margin-left: 0;
    text-align: left;
  }
}

/* Hero responsive rules */
@media (min-width: 801px) {
  .hero-byline {
    position: fixed;
    inset: var(--page-inset) auto auto var(--page-inset);
    margin: 0;
    transform: none;
    align-self: flex-start;
    text-align: left;
  }

  .hero-byline p {
    margin: 0;
    text-align: left;
  }
}

/* Hero responsive rules */
@media (min-width: 901px) {
  .hero-image h1 {
    align-self: flex-start;
    width: 100%;
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
  }

}

/* Hero responsive rules */
@media (min-width: 1200px) {
  .hero-image {
    padding-left: 15vw;
  }
}

/* Hero responsive rules */
@media (max-width: 2000px) {
  .hero-cards {
    width: var(--social-icon-size);
    max-width: var(--social-icon-size);
  }

  .hero-card {
    width: var(--social-icon-size);
    max-width: var(--social-icon-size);
    flex: none;
  }
}

/* Hero responsive rules */
@media (max-width: 600px) {
  .app:not(.nav-visible):not(.menu-open) .site-name {
    opacity: 1;
    visibility: visible;
    transition: none;
  }

  .motto-hero {
    font-size: 1.3rem;
  }

  .hero .wrapper {
    padding: var(--page-inset);
  }

  .hero-image {
    width: 100%;
    container-type: inline-size;
  }

  body .hero-image h1 {
    top: -4.9rem;
    align-self: flex-start;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    font-size: clamp(1.4rem, 10.1cqi, 3.4rem);
    line-height: 1.1;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
  }

  .hero-image h2 {
    position: relative;
    top: -50px;
    align-self: center;
    width: 92%;
    font-weight: 100;
    text-align: center;
    margin: 0 auto;
  }

  .hero-byline {
    position: fixed;
    top: calc(2px + var(--page-inset) + 1.65rem);
    left: 50%;
    z-index: 3;
    width: max-content;
    max-width: calc(100vw - 2 * var(--page-inset));
    flex-wrap: nowrap;
    justify-content: center;
    transform: translateX(-50%);
  }

  .hero-byline p {
    position: static;
    top: auto;
    margin: 0;
    text-align: center;
    line-height: 1.5em;
  }

  .hero-byline__name {
    display: none;
  }

  .hero-byline__role {
    text-align: right;
    font-size: 1.3rem;
  }

  .hero-copy .motto-end {
    font-size: 1.3rem;
  }

  .hero-motion {
    align-self: stretch;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    grid-template-columns: 1.15fr 0.85fr;
    aspect-ratio: 1.6 / 1;
  }

  .hero-motion__topline,
  .hero-motion__baseline {
    font-size: .8rem;
  }

  .hero-motion__headline {
    font-size: clamp(1.7rem, 10.5cqi, 4.1rem);
  }

  .hero-motion__symbol-label {
    top: 10px;
    left: 10px;
    font-size: .8rem;
  }

}

/* Hero responsive rules */
@media (prefers-reduced-motion: reduce) {
  .hero-motion__headline > span,
  .hero-motion__availability-plus {
    animation: none;
  }

  .hero-motion__headline > span {
    transform: none;
  }
}

/* Section responsive rules */
@media (min-width: 601px) {
  .contact-pricing-layout {
    --contact-column-width: min(500px, calc(50vw - var(--page-inset)));
    width: var(--contact-column-width);
    margin-left: calc(50vw - var(--contact-column-width) - var(--page-inset));
  }

  .contact-section {
    width: 100%;
  }

  .footer .contact-section>h1 {
    box-sizing: border-box;
    width: 100%;
    text-align: right;
  }

  .footer .pricing-card {
    width: 100%;
    margin-top: 0;
    margin-left: 50%;
  }
}

/* Section responsive rules */
@media (max-width: 540px) {
  .meta {
    display: none;
  }
}

/* Section responsive rules */
@media (prefers-reduced-motion: reduce) {

  .work-list a,
  .title,
  .arrow,
  .meta {
    transition: none;
  }

  .archive .work-list .meta::before {
    transition: none;
  }
}

/* Section responsive rules */
@media (min-width: 768px) {
  .service-list {
    padding-top: 3rem;
  }

  .work-list {
    padding-top: 3rem;
  }
}

/* Section responsive rules */
@media (min-width: 901px) {
  .carousel h1 {
    align-self: flex-end;
    width: min(50%, 48rem);
    margin-right: 0;
    margin-left: auto;
    text-align: right;
  }
}

/* Section responsive rules */
@media (prefers-reduced-motion: reduce) {
  .carousel .service-details {
    transition: none;
  }
}

/* Section responsive rules */
@media (min-width: 601px) {
  .carousel .service-list .title {
    font-size: 1.3rem;
  }
}

/* Section responsive rules */
@media (max-width: 900px) {
  .archive .work-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    margin-right: calc(-1 * var(--page-inset));
  }
}

/* Section responsive rules */
@media (max-width: 600px) {
  .carousel .service-kicker {
    width: 100%;
    margin: 0 0 0.5rem;
  }

  .carousel .service-list {
    width: 100%;
    margin: 0 0 calc(-1 * var(--page-inset));
    padding: 0;
  }

  .carousel .service-card-content {
    padding: 0.65em 3rem 0.65em 0.75em;
    gap: 0.5rem;
  }

  .carousel .service-list .left {
    gap: 0.5rem;
  }

  .carousel .service-list .right {
    gap: 0.4rem;
  }

  .carousel .service-details {
    padding-right: 3rem;
    padding-left: calc(0.75em + 5px);
    font-size: 0.9rem;
  }

  .archive .work-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin-right: calc(-1 * var(--page-inset));
  }

  .archive .work-list li,
  .archive .work-list li:nth-child(9) {
    width: 100%;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    margin: 0;
  }

  .archive .work-card__face {
    padding: 0.6rem;
  }

  .archive .work-card__back {
    padding: 0;
  }

  .archive .work-list .meta {
    display: flex;
  }

  .archive .work-list .arrow {
    font-size: 1rem;
  }
}

/* Section responsive rules */
@media (prefers-reduced-motion: reduce) {
  .archive .work-card__inner {
    transition: none;
  }
}

/* Section responsive rules */
@media (max-width: 600px) {
  nav.dark:not(.utility-nav) .nav-item .link {
    line-height: 0;
  }

  nav.dark:not(.utility-nav) .nav-item .link a {
    display: block;
  }

  #carousel-panel h1,
  #archive-panel h1,
  #footer-panel .contact-section > h1 {
    width: 100%;
    padding-top: calc(4.76rem + 2.1em + 9px);
    padding-right: 0.15rem;
    text-align: right;
  }

  #footer-panel .contact-section .c-wrapper p,
  #footer-panel .pricing-card .c-wrapper p {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  #carousel-panel .service-list .title {
    font-size: 1.5rem;
  }

  .carousel .service-kicker {
    width: 100%;
    margin: 0 0 1.25rem;
  }

  .carousel .service-list {
    width: 100%;
    margin: 0 0 calc(-1 * var(--page-inset));
    padding: 0;
  }

  .carousel .service-card-content {
    padding: 0.65em 3rem 0.65em 0.75em;
    gap: 0.5rem;
  }

  .carousel .service-list .left {
    gap: 0.5rem;
  }

  .carousel .service-list .right {
    gap: 0.4rem;
  }

  .carousel .service-details {
    padding-right: 3rem;
    padding-left: calc(0.75em + 5px);
    font-size: 1.2rem;
    line-height: 1.2;
  }

  #carousel-panel .service-details > p {
    font-size: 1.2rem;
    line-height: 1.2;
  }

  .archive .work-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin-right: calc(-1 * var(--page-inset));
  }

  .archive .work-list li,
  .archive .work-list li:nth-child(9) {
    width: 100%;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    margin: 0;
  }

  .archive .work-card__face {
    padding: 0.6rem;
  }

  .archive .work-card__back {
    padding: 0;
  }

  .archive .work-list .meta {
    display: flex;
  }

  .archive .work-list .arrow {
    font-size: 1rem;
  }
}

/* Section responsive rules */
@media (prefers-reduced-motion: reduce) {
  .archive .work-card__inner {
    transition: none;
  }
}

/* Preloader responsive rules */
@media (min-width: 601px) {
  .preloader__motto-copy {
    display: none;
  }
}

/* Preloader responsive rules */
@media (prefers-reduced-motion: reduce) {
  .preloader__veil {
    transition-duration: 1ms;
  }

  .preloader__byline-copy,
  .preloader__byline-copy *,
  .preloader__motto-copy {
    transition-duration: 1ms;
  }
}
