/* ============================================================
   NORTHWEST CENTER FOR FINER THINGS.
   orange #E68A23 / pale pink #F8D1C2
   ============================================================ */

@font-face {
  font-family: "Anton";
  src: url("../assets/fonts/anton.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/ebgaramond-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #e68a23;
  --ink: #f8d1c2;
  --ink-bright: #fff3ec;
  /* HelveticaNeue-CondensedBlack matches the mockup exactly on macOS;
     Anton is the bundled fallback everywhere else. */
  --head: "HelveticaNeue-CondensedBlack", "Helvetica Neue Condensed Black",
          "Anton", "Arial Narrow", Impact, sans-serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --nav-size: clamp(22px, 2.7vw, 40px);
  --desc-size: clamp(13px, 1.25vw, 18px);
  --indent: clamp(1.6rem, 6vw, 5.6rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--head);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; }

/* ---------- tagline ---------- */

.tagline {
  position: absolute;
  top: clamp(14px, 2vw, 26px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 1.94vw, 26px);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ---------- logo ---------- */

.masthead {
  padding: clamp(12px, 1.6vw, 24px) 0 0 clamp(12px, 1.5vw, 22px);
}

.logo {
  font-family: var(--head);
  font-weight: 400;
  font-size: var(--nav-size);
  line-height: 0.88;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  width: max-content;
}

.logo span { display: block; }

/* ---------- layout ---------- */

.layout {
  flex: 1;
}

/* the menu paints over the frame (as in the mockup, long titles run
   across the images); only its buttons and links catch the mouse */
.layout > .menu {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.menu .node-btn,
.menu a { pointer-events: auto; }

/* ---------- cascading menu ---------- */

.menu {
  padding: 0.9em 0 4rem 0;
  font-size: var(--nav-size);
  line-height: 0.9;
}

.menu ul { list-style: none; }

.menu > ul > li { margin-left: var(--indent); }
.menu ul ul > li { margin-left: var(--indent); }

.menu li { margin-top: 0.08em; }

.node-btn {
  display: inline-block;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-transform: uppercase;
  text-align: left;
  line-height: inherit;
  letter-spacing: 0.005em;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.node-btn:hover,
.node-btn:focus-visible { color: var(--ink-bright); }

.node-btn:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; }

li.open > .node-btn,
li.selected > .node-btn { color: var(--ink-bright); }

/* static entries (client list) */
.node-static {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

/* children container — hidden until open */
.menu li > ul { display: none; }
.menu li.open > ul { display: block; }

/* ---------- project description line ---------- */

.desc {
  display: block;
  font-size: var(--desc-size);
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0.03em;
  margin: 0.35em 0 0.55em calc(var(--indent) * 1.6);
  max-width: 34em;
}

.desc a {
  color: var(--ink-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.desc a:hover { color: #ffffff; }

/* contact email */
.email { overflow-wrap: anywhere; }
.email a {
  text-decoration: none;
  text-transform: lowercase;
  white-space: normal;
}
.email a:hover { color: var(--ink-bright); text-decoration: underline; }

/* ---------- scrolling image column ---------- */

/* a fixed column on the right of the screen, like the mockup's
   image stack; it scrolls on its own, the page scrolls underneath */
.rail {
  position: fixed;
  top: clamp(44px, 4.6vw, 68px);   /* clears the tagline */
  right: 3vw;
  bottom: 0;
  width: 40vw;
  overflow-y: auto;
  z-index: 1;
  background: var(--bg);           /* hides the footer tree behind it */
  scrollbar-width: thin;
  scrollbar-color: rgba(248, 209, 194, 0.55) transparent;
}

.rail::-webkit-scrollbar { width: 6px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb {
  background: rgba(248, 209, 194, 0.55);
  border-radius: 3px;
}

.rail:empty { display: none; }

.column {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 26px);
  padding-bottom: 4vh;
}

.column img,
.column video {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- tree ---------- */

.tree {
  display: flex;
  justify-content: flex-end;
  padding: 0 clamp(10px, 1.5vw, 24px) clamp(6px, 1vw, 16px) 0;
  pointer-events: none;
}

.tree img {
  width: clamp(130px, 16vw, 240px);
  height: auto;
}

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  :root {
    --nav-size: clamp(22px, 6.4vw, 30px);
    --desc-size: 13px;
    --indent: clamp(1rem, 4.5vw, 1.8rem);
  }

  .tagline {
    position: static;
    transform: none;
    text-align: center;
    padding-top: 12px;
  }

  .layout {
    grid-template-columns: 1fr;
    padding-right: 4vw;
  }

  .rail {
    position: static;
    width: 100%;
    overflow-y: visible;
    padding: 0 0 1.5rem 0;
  }

  .node-btn { white-space: normal; }

  .desc { margin-left: var(--indent); }
}
