/* ==========================================================================
   Kaleyá P. Langley — styles
   Layout: a two-wall gallery plan. The name hangs on the left wall; the
   conversation and the directory hang on the right. Stacks on phones.
   ========================================================================== */

:root {
  --ivory:     #F8F2EC;  /* page */
  --cream:     #EFE6DA;  /* frames, passe-partout */
  --ink:       #2B2826;  /* deep charcoal type */
  --ink-soft:  #6B625B;  /* supporting text (5.6:1 on ivory) */
  --rule:      #DCD0C3;  /* hairlines */
  --rouge:     #8C3A4A;  /* the single accent: lipstick oxblood */
  --blush:     #EBD5D3;  /* text selection */

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans:  "Jost", "Avenir Next", "Avenir", "Segoe UI", system-ui, sans-serif;
  --ease:  cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ivory); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--blush); color: var(--ink); }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rouge); outline-offset: 4px; border-radius: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--ivory); padding: 8px 14px; text-decoration: none; font-size: .85rem;
}
.skip:focus { top: 12px; }

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ------------------------------------------------------------------ welcome */

.welcome {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-block: env(safe-area-inset-top, 0px) 36px;
}

.topbar {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-block: 18px;
}
.monogram { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
.topbar__all {
  font-size: .85rem; letter-spacing: .02em; text-decoration: none;
  border-bottom: 1px solid var(--rule); padding-bottom: 2px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.topbar__all:hover { border-color: var(--rouge); color: var(--rouge); }

.welcome__grid {
  flex: 1;
  display: grid;
  gap: 44px;
  align-content: center;
  padding-block: 4vh 2vh;
}

.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.3rem, 15vw, 7.6rem);
  line-height: .9;
  letter-spacing: -.015em;
}
.name span { display: block; }
.name span + span { padding-left: .55em; }

.descriptor { margin: 22px 0 0; color: var(--ink-soft); font-size: .95rem; letter-spacing: .02em; }

.talk { min-width: 0; }
.talk__hello {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 2.75rem); line-height: 1.1;
}
.talk__thanks {
  margin: .3em 0 0;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.3;
  color: var(--ink-soft);
}
.talk__ask {
  margin: 36px 0 14px;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.45rem, 2.8vw, 1.75rem); line-height: 1.2;
}

.choices { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.choices li { border-bottom: 1px solid var(--rule); }
.choice {
  position: relative;
  width: 100%;
  min-height: 56px;
  display: flex; align-items: center; gap: .4em;
  padding: 14px 4px 14px 2px;
  text-align: left;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.5rem); line-height: 1.25;
  transition: padding-left .45s var(--ease), color .35s var(--ease), opacity .45s var(--ease);
}
.choice::before {
  content: "";
  position: absolute; left: 2px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--rouge);
  transform: scale(0); transition: transform .45s var(--ease);
}
.choice:hover, .choice:focus-visible, .choice.is-chosen { padding-left: 24px; }
.choice:hover::before, .choice:focus-visible::before, .choice.is-chosen::before { transform: scale(1); }
.choice.is-chosen { color: var(--rouge); }
.choices.has-choice .choice:not(.is-chosen) { opacity: .25; }
.eyes { font-style: normal; font-size: .85em; }

@media (min-width: 900px) {
  .welcome__grid { grid-template-columns: 1.2fr 1fr; gap: 0; align-items: center; }
  .welcome__name { padding-right: 56px; border-right: 1px solid var(--rule); padding-block: 24px; }
  .talk { padding-left: 56px; }
  .name span + span { padding-left: .9em; }
}

/* The one orchestrated moment: the welcome arrives line by line. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.is-playing .name span,
.is-playing .descriptor,
.is-playing .talk > * {
  animation: rise .9s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
.welcome.is-leaving { opacity: 0; transition: opacity .35s var(--ease); }

/* -------------------------------------------------------------------- rooms */

.rooms {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-block: calc(env(safe-area-inset-top, 0px) + 24px) 0;
}
.rooms.is-entering { animation: rise .6s var(--ease) both; }

/* Phones: the aside dissolves so the nav can stick to the top while scrolling */
.rooms__aside { display: contents; }

.masthead {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 9vw, 3.2rem); line-height: .95; letter-spacing: -.01em;
}
.descriptor--small { margin-top: 10px; font-size: .88rem; }

.dir-nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3;
  margin-top: 22px;
  background: var(--ivory);
  border-bottom: 1px solid var(--rule);
}
.dir-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
}
.dir-nav ul::-webkit-scrollbar { display: none; }
.dir-nav a {
  display: flex; align-items: baseline; gap: 8px;
  padding: 14px 0 12px;
  text-decoration: none; white-space: nowrap;
  font-size: .95rem; letter-spacing: .02em;
  transition: color .3s var(--ease), box-shadow .3s var(--ease);
}
.dir-nav a:hover { color: var(--rouge); }
.dir-nav a[aria-current="page"] { color: var(--rouge); box-shadow: inset 0 -1px 0 var(--rouge); }
.dir-nav .count { display: none; color: var(--ink-soft); font-size: .8rem; font-variant-numeric: tabular-nums; }

.restart {
  font-size: .85rem; color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid var(--rule); padding-bottom: 1px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.restart:hover { color: var(--rouge); border-color: var(--rouge); }
.restart--aside { display: none; }

.room { min-width: 0; padding-block: 40px 64px; }
.room.is-switching { animation: rise .5s var(--ease) both; }
.room__line {
  margin: 0 0 8px; min-height: 1.3em;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.3;
  color: var(--rouge);
}
.room__title {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1; letter-spacing: -.01em;
}
.room__title:focus { outline: none; }
.room__intro { margin: 16px 0 0; max-width: 54ch; color: var(--ink-soft); }

/* Gallery wall labels */
.works { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.work__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.work__title {
  grid-column: 1;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.65rem, 3.6vw, 2.15rem); line-height: 1.1;
  transition: transform .45s var(--ease), color .35s var(--ease);
}
.work__desc { grid-column: 1; margin-top: 8px; max-width: 52ch; font-size: .98rem; line-height: 1.5; }
.work__meta { grid-column: 1; margin-top: 4px; font-size: .8rem; letter-spacing: .03em; color: var(--ink-soft); }
.work__go {
  grid-column: 2; grid-row: 1 / span 3;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.work__go svg { width: 16px; height: 16px; transition: transform .45s var(--ease); }
a.work__link:hover .work__title,
a.work__link:focus-visible .work__title { transform: translateX(6px); }
a.work__link:hover .work__go,
a.work__link:focus-visible .work__go { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
a.work__link:hover .work__go svg { transform: rotate(45deg); }
.is-pending .work__meta { font-style: italic; }

/* A venture with brands beneath it */
.work--family { border-bottom: 1px solid var(--rule); }
.work--family > .work__link { border-bottom: 0; padding-bottom: 14px; }
.family { padding: 0 0 24px 22px; border-left: 1px solid var(--rule); margin-left: 2px; }
.family__label { margin: 0 0 4px; font-size: .8rem; letter-spacing: .03em; color: var(--ink-soft); }
.family__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.family__link { display: grid; text-decoration: none; }
.family__name {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.5rem); line-height: 1.2;
  transition: color .3s var(--ease);
}
a.family__link:hover .family__name, a.family__link:focus-visible .family__name { color: var(--rouge); }
.family__desc { margin-top: 2px; font-size: .92rem; line-height: 1.5; }
.family__link .work__meta { margin-top: 2px; }
.family__link.is-pending .work__meta { font-style: italic; }

/* The empty frame, waiting for the next venture */
.work--frame { padding-block: 24px; border-bottom: 1px solid var(--rule); }
.frame {
  position: relative;
  padding: 34px 28px;
  background: var(--cream);
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 10px var(--ivory), inset 0 0 0 11px var(--rule);
}
.frame::before {   /* picture wire */
  content: ""; position: absolute; left: 50%; top: -14px;
  width: 1px; height: 14px; background: var(--rule);
}
.frame__title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.5rem; line-height: 1.2; }
.frame__desc { margin-top: 4px; font-size: .92rem; color: var(--ink-soft); }

/* Everything: one wing per room */
.wing + .wing { margin-top: 48px; }
.wing__title {
  margin: 44px 0 0;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.45rem; line-height: 1.2;
}
.wing__title a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.wing__title a:hover { border-color: var(--rouge); }
.wing .works { margin-top: 14px; }

/* Footer */
.foot {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px 28px;
  padding-block: 22px calc(env(safe-area-inset-bottom, 0px) + 32px);
  border-top: 1px solid var(--rule);
  font-size: .82rem; color: var(--ink-soft);
}
.foot__sign { margin: 0; }
.foot__elsewhere { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.foot__elsewhere a { text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--rule); }
.foot__elsewhere a:hover { color: var(--rouge); border-color: var(--rouge); }

/* Desktop: the aside becomes a fixed left wall */
@media (min-width: 900px) {
  .rooms { grid-template-columns: 300px minmax(0, 1fr); column-gap: 80px; padding-block: 64px 0; }
  .rooms__aside { display: block; position: sticky; top: 48px; align-self: start; padding-bottom: 48px; }
  .masthead span { display: block; }
  .masthead span + span { padding-left: .55em; }
  .dir-nav { position: static; margin-top: 36px; border-bottom: 0; background: none; }
  .dir-nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--rule); overflow: visible; }
  .dir-nav li { border-bottom: 1px solid var(--rule); }
  .dir-nav a { justify-content: space-between; padding: 13px 0; font-size: 1rem; }
  .dir-nav a[aria-current="page"] { box-shadow: none; }
  .dir-nav a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rouge); margin-right: -4px; align-self: center; order: -1; }
  .dir-nav a .label { margin-right: auto; }
  .dir-nav .count { display: inline; }
  .restart--aside { display: inline-block; margin-top: 26px; }
  .restart--foot { display: none; }
  .room { padding-block: 4px 96px; }
}

.noscript { max-width: 40ch; margin: 40vh auto 0; padding: 0 20px; font-family: var(--serif); font-size: 1.4rem; }

/* 404 */
.lost { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; gap: 18px; padding-block: 48px; }
.lost h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 8vw, 4.5rem); line-height: 1; }
.lost p { margin: 0; color: var(--ink-soft); max-width: 46ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
