/* ==========================================================================
   Brand identity case study: UWUD. A page that grows the way a tree does.
   One set of growth rings runs behind everything; the ground warms and pales around the words.
   ========================================================================== */
.uw { --be: #ffeacc; --wa: #5a3a2f; --wh: #f7f6f2; --f-display: "Italiana", Georgia, serif; --f-text: "Figtree", ui-sans-serif, system-ui, sans-serif; position: relative; isolation: isolate; font-family: var(--f-text); transition: background-color 0.9s, color 0.9s; }
.uw[data-tone="wa"] { background: var(--wa); color: var(--be); }
.uw[data-tone="be"] { background: var(--be); color: var(--wa); }
.uw[data-tone="wh"] { background: var(--wh); color: var(--wa); }
.uw > section { position: relative; z-index: 1; }
.uw ~ .sect { position: relative; z-index: 1; }
.uw ~ .sect:not(.closing-cta) { background: var(--bg); }
.uw-rings { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.uw-h { margin: 0; font: 400 clamp(2.8rem, 1.4rem + 3.8vw, 5.2rem)/1.04 var(--f-display); color: inherit; }
.uw-k { margin: 0 0 clamp(20px, 3vh, 36px); font: 500 15px/1.2 var(--f-text); letter-spacing: 0.04em; color: inherit; }

/* ---------- The logo ---------- */
.uw-logo { display: grid; justify-items: center; color: inherit; }
.uw-logo--ink { color: var(--wa); }
.uw-tree { display: block; width: auto; height: 30vh; fill: currentColor; overflow: visible; }
.uw-word { margin: 3.2vh 0 0; font: 400 clamp(3rem, 1.4rem + 4.8vw, 6.2rem)/0.9 var(--f-display); letter-spacing: 0.02em; }
.uw-love { margin: 1.4vh 0 0; font: 400 clamp(0.75rem, 0.6rem + 0.4vw, 1rem)/1 var(--f-text); letter-spacing: 0.52em; text-transform: uppercase; }

/* ---------- The opening ---------- */
.uw-open__wood img { display: block; }
.uw-open__wood::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(50, 28, 18, 0.5), transparent 26%, transparent 58%, rgba(50, 28, 18, 0.72)); pointer-events: none; }
.uw-open__in { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; align-content: stretch; padding-top: calc(var(--nav-h) + 28px); padding-bottom: clamp(32px, 6vh, 64px); color: #fff4e2; }
.uw-open__in > .container:last-child { align-self: end; }
.uw-open h1 { max-width: 25em; margin: 0; font: 400 clamp(1.3rem, 1rem + 1vw, 1.9rem)/1.3 var(--f-text); color: inherit; }

/* ---------- Why it exists ---------- */
.uw-why { padding-block: 16vh; }
.uw-why__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.uw-why p { margin: 20px 0 0; max-width: 26em; font-size: 20px; line-height: 1.5; }
.uw-why figure { margin: 0; }
.uw-why img { display: block; width: 100%; height: auto; }

/* ---------- The mission ---------- */
.uw-say { padding-block: 24vh; }
.uw-say blockquote { margin: 0; max-width: 21em; font: 400 clamp(2.6rem, 1rem + 4.4vw, 5.4rem)/1.12 var(--f-display); }
.uw-say blockquote span { opacity: 0.16; }

/* ---------- The offcuts ---------- */
.uw-planks { display: grid; gap: 6px; padding-bottom: 20vh; overflow: clip; }
.uw-plank { display: grid; grid-template-columns: 76px minmax(0, 5fr) minmax(0, 6fr); gap: clamp(16px, 3vw, 48px); align-items: center; width: 88%; padding: clamp(28px, 5vh, 52px) 6vw; background: var(--wa); color: var(--be); }
.uw-plank:nth-of-type(2) { width: 94%; justify-self: end; background: var(--wh); color: var(--wa); }
.uw-plank:nth-of-type(3) { width: 78%; }
.uw-plank span { font: 400 clamp(1.4rem, 1rem + 1vw, 2rem)/1 var(--f-display); }
.uw-plank h3 { margin: 0; font: 400 clamp(2rem, 1.2rem + 2.2vw, 3.6rem)/1.06 var(--f-display); color: inherit; }
.uw-plank p { margin: 0; font-size: 18px; line-height: 1.45; }

/* ---------- The logo, explained ---------- */
.uw-mark { padding-block: 16vh 10vh; }
.uw-mark__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 7vw; align-items: center; font-size: 19px; line-height: 1.5; }
.uw-mark__grid p { margin: 20px 0 0; max-width: 32em; }
.uw-mark__grid .uw-word, .uw-mark__grid .uw-love { max-width: none; }
.uw-mark__grid .uw-word { margin-top: 3.2vh; }
.uw-mark__grid .uw-love { margin-top: 1.4vh; }
.uw-mark ol { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 12px; max-width: 34em; }
.uw-vars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12vh; }
.uw-vars figure { background: #fff; display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 14px; min-height: clamp(260px, 24vw, 360px); margin: 0; padding: 22px 16px; border: 1px solid rgba(90, 58, 47, 0.42); text-align: center; font-size: 15px; }
.uw-vars figure > :first-child { align-self: center; }
.uw-logo--s .uw-tree { height: 92px; }
.uw-logo--s .uw-word { margin-top: 10px; font-size: 2.4rem; }
.uw-logo--s .uw-love { margin-top: 6px; font-size: 7px; }
.uw-vars__lock { width: 100%; height: auto; fill: var(--wa); }
.uw-tree--s { height: 150px; color: var(--wa); }
.uw-word--t { margin: 0; font-size: clamp(3rem, 5vw, 5rem); }

/* ---------- The colours ---------- */
.uw-tints { padding-block: 8vh; }
.uw-tints__note { margin: 0 0 clamp(24px, 4vh, 40px); max-width: 26em; font: 400 clamp(1.8rem, 1.1rem + 1.8vw, 3rem)/1.12 var(--f-display); }
.uw-pal { display: flex; height: 52vh; min-height: 340px; border: 1px solid rgba(90, 58, 47, 0.2); }
.uw-pal button { flex: 1 1 0; min-width: 0; display: grid; place-content: end start; gap: 8px; padding: 0 0 5vh 2.4vw; background: var(--c); color: var(--t); font: 400 18px/1.2 var(--f-text); text-align: left; cursor: pointer; transition: flex-grow 1s var(--ease-out); will-change: flex-grow; }
.uw-pal button:hover, .uw-pal button:focus-visible { flex-grow: 1.7; }
.uw-pal b { font: 400 clamp(1.8rem, 1rem + 2.4vw, 3.4rem)/1 var(--f-display); white-space: nowrap; }

/* ---------- The fonts ---------- */
.uw-fonts { --w: 500; padding-block: 10vh 16vh; }
.uw-fonts__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); align-items: start; }
.uw-font { display: grid; justify-items: start; gap: 10px; font-size: 17px; line-height: 1.5; }
.uw-font p { margin: 0; max-width: 30em; }
.uw-font__aa { font: 400 clamp(6rem, 2rem + 8vw, 11rem)/1 var(--f-text); font-weight: var(--w); }
.uw-font__aa--i { font-family: var(--f-display); font-weight: 400; }
.uw-font__n { margin: 0 0 12px; font: 500 clamp(2.6rem, 1.4rem + 3vw, 4.6rem)/1 var(--f-text); font-weight: var(--w); color: inherit; }
.uw-font__n--i { font-family: var(--f-display); font-weight: 400; }
.uw-font ul { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; }
.uw-font button { padding: 4px 0; font: 400 18px/1.2 var(--f-text); color: inherit; opacity: 0.6; cursor: pointer; border-bottom: 1px solid transparent; transition: opacity 0.3s, border-color 0.3s; }
.uw-font button.is-on, .uw-font button:hover { opacity: 1; border-color: currentColor; }

/* ---------- The table ---------- */
.uw-table { padding-block: 14vh 22vh; overflow: clip; }
.uw-table__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.uw-table__col { display: grid; gap: clamp(32px, 6vh, 72px); }
.uw-table__col:last-child { margin-top: 18vh; }
.uw-laid { margin: 0; }
.uw-laid img { display: block; width: 100%; height: auto; }

/* ---------- The voice ---------- */
.uw-voice { padding-block: 20vh 16vh; }
.uw-voice__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; font-size: 22px; line-height: 1.45; }
.uw-voice__head p { margin: 0; }
.uw-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); margin-top: 14vh; font-size: 16px; line-height: 1.5; }
.uw-next span { font: 400 clamp(2.4rem, 1.4rem + 2.4vw, 4rem)/1 var(--f-display); }
.uw-next h3 { margin: 14px 0 12px; font: 400 clamp(1.6rem, 1.1rem + 1.2vw, 2.4rem)/1.1 var(--f-display); color: inherit; }
.uw-next p { margin: 0; }

/* ---------- The end ---------- */
.uw-end .st-reel__stage { display: grid; place-items: center; background: transparent; }

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes uw-slow { from { transform: translateY(calc(var(--d) * 1vh)); } to { transform: translateY(calc(var(--d) * -1vh)); } }
    [data-uw-slow] { animation: uw-slow auto linear both; animation-timeline: view(); }
    @keyframes uw-in-l { from { transform: translateX(-46%); } }
    @keyframes uw-in-r { from { transform: translateX(46%); } }
    .uw-plank { animation: uw-in-l auto linear backwards; animation-timeline: view(); animation-range: entry 0% entry 100%; will-change: transform; }
    .uw-plank--r { animation-name: uw-in-r; }
    /* each piece comes down a little crooked, and straightens as it lands */
    @keyframes uw-lay { from { opacity: 0; transform: translateY(70px) rotate(var(--r)) scale(0.96); } to { opacity: 1; transform: none; } }
    .uw-laid { animation: uw-lay auto linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; will-change: transform; }
    @keyframes uw-col { from { transform: translateY(5vh); } to { transform: translateY(-5vh); } }
    .uw-table__col:last-child { animation: uw-col auto linear both; animation-timeline: view(); }
  }
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .uw-tree { height: 180px; }
  .uw-why__grid, .uw-mark__grid, .uw-vars, .uw-fonts__grid, .uw-table__grid, .uw-voice__head, .uw-next, .uw-plank { grid-template-columns: minmax(0, 1fr); }
  .uw-plank, .uw-plank:nth-of-type(2), .uw-plank:nth-of-type(3) { width: 100%; }
  .uw-table__col:last-child { margin-top: 0; }
  .uw-pal { flex-direction: column; height: auto; }
  .uw-pal button { padding: 24px; }
  .uw-say blockquote span { opacity: 1; }
}

/* the lockup names sit on white cards, so they take the walnut brown rather than the section's cream */
.uw-vars figcaption { color: #5a3a2f; }

/* scroll section heights, so they are in place before st-uwud.js runs (same numbers as its reel() calls) */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .uw-open { height: 320vh; } .uw-end { height: 240vh; }
}
