:root {
  --paper: #ffffff;
  --outside: #eeeeee;
  --ink: #000000;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

/* ======================================
   MOBILE — LONG VERTICAL CARE LABEL
   ====================================== */

#home.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  width: 100%;
  min-height: 100dvh;

  /* DOUBLE THE PREVIOUS GREY BORDERS */
  padding: 0 24px 14px;

  background: var(--outside);
}

.care-label {
  --reveal: 0;
  --mobile-type: clamp(27px, 7.7vw, 36px);

  position: relative;

  width: 100%;
  max-width: none;

  min-height: max(140dvh, 1050px);

  padding: 80px 22px 175px;

  display: flex;
  flex-direction: column;
  align-items: center;

  background: var(--paper);
}

/* HA MONOGRAM */

.monogram {
  flex-shrink: 0;

  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

/* NAME */

.home-header {
  width: 100%;
  margin-top: 88px;
  text-align: center;
}

.home-header h1 {
  margin: 0;

  font-size: var(--mobile-type);
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1.44;
}

.home-header h1 span {
  display: block;
}

/* HOME CONTENT */

.home-content {
  width: 100%;
  min-width: 0;
}

/* ======================================
   FIVE CATEGORY ICONS
   ====================================== */

.home-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;

  width: calc(100% - 20px);
  margin: 138px auto 0;

  gap: 0;
}

.home-link {
  position: relative;

  width: 100%;
  min-width: 0;
  height: 66px;

  display: flex;
  align-items: center;
  justify-content: center;

  outline-offset: 5px;
}

.symbol {
  display: block;

  width: clamp(39px, 10.7vw, 56px);
  height: clamp(39px, 10.7vw, 56px);

  flex-shrink: 0;
  overflow: visible;
}

/* CATEGORY HOVER LABELS */

.category {
  position: absolute;

  top: calc(100% + 7px);
  left: 50%;

  opacity: 0;
  transform: translate(-50%, -5px);

  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.035em;
  white-space: nowrap;

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.home-link:hover .category,
.home-link:focus-visible .category {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ======================================
   MOBILE STATEMENT
   ====================================== */

.home-statement {
  padding: 0;
}

.mobile-statement {
  display: block;

  width: max-content;
  max-width: 100%;

  margin: 150px auto 0;
}

.mobile-statement p {
  margin: 0;

  font-size: var(--mobile-type);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: -0.035em;
}

.mobile-statement p span {
  display: block;
  white-space: nowrap;
}

.desktop-statement {
  display: none;
}

/* ======================================
   DESKTOP / LANDSCAPE
   UNCHANGED
   ====================================== */

@media (orientation: landscape) and (min-width: 600px) {

  html:has(#home.active),
  body:has(#home.active) {
    height: 100%;
    overflow: hidden;
  }

  #home.active {
    display: flex;
    justify-content: flex-start;
    align-items: center;

    width: 100%;
    height: 100dvh;
    min-height: 0;

    padding: 0;
    overflow: hidden;

    background: var(--outside);
  }

  /* WHITE HORIZONTAL LABEL */

  .care-label {
    --reveal: 0;
    --desktop-type: clamp(21px, 2.45vw, 38px);

    width: calc(100% - 18px);
    max-width: none;

    height: 76dvh;
    min-height: 190px;

    margin: 0;
    padding: 20px 22px;

    display: flex;
    flex-direction: row;
    align-items: center;

    background: var(--paper);
  }

  /* SIDEWAYS HA */

  .monogram {
    position: absolute;

    top: 50%;
    left: 5px;

    margin: 0;
    font-size: clamp(17px, 1.7vw, 24px);

    transform:
      translateY(-50%)
      rotate(-90deg);

    transform-origin: center;
    z-index: 3;
  }

  /* SIDEWAYS NAME */

  .home-header {
    position: relative;

    width: clamp(125px, 12.5vw, 205px);
    flex: 0 0 clamp(125px, 12.5vw, 205px);

    height: 100%;
    margin: 0;

    text-align: left;
    border: 0;
  }

  .home-header h1 {
    position: absolute;

    top: 50%;
    left: calc(50% + 25px);

    width: max-content;
    margin: 0;

    font-size: var(--desktop-type);
    font-weight: 400;
    letter-spacing: 0.18em;
    line-height: 1.4;

    text-align: center;

    transform:
      translate(-50%, -50%)
      rotate(-90deg);
  }

  /* HORIZONTAL CONTENT */

  .home-content {
    position: relative;

    display: flex;
    align-items: center;

    flex: 1;
    min-width: 0;
    height: 100%;
  }

  /* FIVE ICONS */

  .home-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;

    width: calc(100% - var(--reveal) * 46%);
    flex: 0 0 auto;

    margin: 0;
    gap: 0;

    position: relative;
    z-index: 2;
  }

  .home-link {
    width: 100%;
    height: 135px;
  }

  .symbol {
    width: clamp(54px, 6.8vw, 105px);
    height: clamp(54px, 6.8vw, 105px);
  }

  .category {
    top: calc(100% + 4px);
    font-size: 10px;
  }

  /* HIDE MOBILE STATEMENT */

  .mobile-statement {
    display: none;
  }

  /* DESKTOP FOUR-LINE REVEAL */

  .desktop-statement {
    position: absolute;

    display: block;

    left: 55%;
    top: 50%;

    width: 44%;
    margin: 0;
    padding: 0;

    opacity: var(--reveal);

    transform:
      translate(
        calc((1 - var(--reveal)) * 20px),
        -50%
      );

    pointer-events: none;
  }

  .desktop-statement p {
    margin: 0;

    font-size: var(--desktop-type);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.035em;
  }

  .desktop-statement p span {
    display: block;
    white-space: nowrap;
  }
}

/* ======================================
   COMPACT LANDSCAPE
   ====================================== */

@media (orientation: landscape)
       and (min-width: 600px)
       and (max-height: 500px) {

  .care-label {
    --desktop-type: clamp(17px, 2vw, 24px);

    height: 82dvh;
    min-height: 150px;
    padding: 12px 14px;
  }

  .monogram {
    left: 5px;
    font-size: 16px;
  }

  .home-header {
    width: 108px;
    flex-basis: 108px;
  }

  .home-header h1 {
    left: calc(50% + 17px);
  }

  .home-link {
    height: 86px;
  }

  .symbol {
    width: clamp(39px, 5.7vw, 70px);
    height: clamp(39px, 5.7vw, 70px);
  }

  .desktop-statement p {
    line-height: 1.25;
  }
}

/* ======================================
   NARROW PHONES
   ====================================== */

@media (orientation: portrait) and (max-width: 360px) {

  #home.active {
    /* Previously 10px, now 20px */
    padding-left: 20px;
    padding-right: 20px;
  }

  .care-label {
    --mobile-type: clamp(24px, 7.4vw, 27px);

    padding: 70px 14px 160px;
  }

  .monogram {
    font-size: 28px;
  }

  .home-header {
    margin-top: 76px;
  }

  .home-header h1 {
    letter-spacing: 0.16em;
  }

  .home-nav {
    width: calc(100% - 8px);
    margin-top: 116px;
  }

  .symbol {
    width: clamp(35px, 11vw, 39px);
    height: clamp(35px, 11vw, 39px);
  }

  .mobile-statement {
    margin-top: 130px;
  }
}

/* ======================================
   CATEGORY / PROJECT PAGES
   ====================================== */

#category-page,
#project-page {
  background: var(--paper);
}

.page-container {
  width: 100%;
  max-width: 1100px;

  margin: 0 auto;
  padding: 35px 30px 100px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.back-link,
.site-name {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.category-heading,
.project-heading {
  margin-top: 110px;
  margin-bottom: 75px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 15px;
}

.category-heading h2,
.project-heading h2 {
  margin: 0;

  font-size: clamp(32px, 7vw, 76px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.project-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;

  padding: 24px 0;
  border-top: 1px solid #000;

  transition: padding-left 0.25s ease;
}

.project-item:last-child {
  border-bottom: 1px solid #000;
}

.project-name {
  font-size: clamp(18px, 3vw, 32px);
}

.project-number {
  font-size: 11px;
}

#project-description {
  max-width: 550px;
  margin-top: 25px;

  font-size: 14px;
  line-height: 1.7;
}

.project-placeholder {
  min-height: 420px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #ddd;
}

.project-placeholder span {
  color: #777;
  font-size: 11px;
  letter-spacing: 0.06em;
}

@media (max-width: 600px) {

  .page-container {
    padding: 25px 22px 70px;
  }

  .category-heading,
  .project-heading {
    margin-top: 90px;
    margin-bottom: 55px;
  }

  .project-placeholder {
    min-height: 300px;
  }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}