/* =========================================================================
   The Professional Wardrobe — environments as full-height panels
   ========================================================================= */

/* ---------- opening ---------- */
.wd-open { padding: clamp(24px, 4vw, 56px) 0 clamp(56px, 8vw, 112px); }
.wd-open__grid { display: grid; gap: clamp(24px, 4vw, 48px); }
.wd-open__title { font-size: var(--t-xl); line-height: .98; letter-spacing: -0.03em; max-width: 13ch; margin: 0 0 .5em; }
.wd-open__head .lede { margin: 0; }
.wd-open__mega {
  font-family: var(--f-cond); font-weight: 800; text-transform: uppercase; line-height: .8;
  font-size: clamp(5rem, 30vw, 15rem); letter-spacing: -0.01em; margin: 0;
  display: grid; grid-template-columns: auto auto; justify-content: start; color: var(--ultra);
}
.wd-open__mega span:first-child { grid-column: 1; grid-row: 1; }
.wd-open__slash { grid-column: 2; grid-row: 1 / span 2; color: var(--verm); align-self: center; font-size: 1.3em; margin-left: .04em; }
.wd-open__mega span:last-child { grid-column: 1; grid-row: 2; color: transparent; -webkit-text-stroke: 2px var(--carbon); }
.wd-open__intro p { max-width: 58ch; }
@media (min-width: 960px) {
  .wd-open__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "head mega" "head intro"; column-gap: clamp(40px, 6vw, 96px); align-items: start; }
  .wd-open__head { grid-area: head; padding-top: clamp(8px, 2vw, 32px); }
  .wd-open__mega { grid-area: mega; justify-content: start; font-size: clamp(8rem, 15vw, 15rem); }
  .wd-open__intro { grid-area: intro; }
}

/* dress-code spectrum */
.spectrum { margin-top: clamp(48px, 7vw, 104px); }
.spectrum__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.spectrum__head .label { margin: 0 0 12px; font-weight: 700; }
.spectrum__ends { display: none; margin: 0; font-family: var(--f-display); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.spectrum__bar { height: 14px; background: linear-gradient(90deg, var(--carbon), var(--ultra) 45%, var(--lav) 78%, var(--verm)); }
.spectrum__list { list-style: none; display: grid; gap: 0; }
.spectrum__list a {
  display: grid; grid-template-columns: 5.2rem 1fr; gap: 2px 14px; align-items: baseline;
  padding: 14px 0; min-height: 44px; text-decoration: none; border-bottom: 1px solid rgba(32,33,36,.18);
  transition: background .25s, padding .3s var(--ease);
}
.spectrum__no { font-family: var(--f-cond); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--ultra); grid-row: span 2; }
.spectrum__name { font-family: var(--f-display); font-weight: 500; font-size: 1.15rem; line-height: 1.15; }
.spectrum__hint { font-size: .85rem; color: var(--ink-soft); }
.spectrum__list a:hover { background: var(--mist); padding-left: 10px; }
.spectrum__foot { margin: 20px 0 0; }
@media (max-width: 759px) {
  /* vertical spectrum: bar runs down the left */
  .spectrum__body { position: relative; }
  .spectrum__bar { display: none; }
  .spectrum__list { border-left: 10px solid; border-image: linear-gradient(180deg, var(--carbon), var(--ultra) 45%, var(--lav) 78%, var(--verm)) 1; padding-left: 14px; }
}
@media (min-width: 760px) {
  .spectrum__ends { display: flex; gap: 24px; }
  .spectrum__ends span:first-child::before { content: "← "; }
  .spectrum__ends span:last-child::after { content: " →"; }
  .spectrum__ends { justify-content: space-between; flex: 1 0 100%; margin-bottom: 8px; color: var(--ink-soft); }
  .spectrum__list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .spectrum__list li { border-left: 1px solid rgba(32,33,36,.25); }
  .spectrum__list li:last-child { border-right: 1px solid rgba(32,33,36,.25); }
  .spectrum__list a { display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 22px; height: 100%; border-bottom: 0; position: relative; }
  .spectrum__list a::before { content: ""; position: absolute; left: -1px; top: 0; width: 1px; height: 26px; background: var(--carbon); }
  .spectrum__no { font-size: clamp(1.6rem, 2.4vw, 2.4rem); }
  .spectrum__name { font-size: clamp(.95rem, 1.2vw, 1.15rem); }
}

/* ---------- environment panels ---------- */
.env { position: relative; padding-block: clamp(64px, 9vw, 136px); }
.env__grid { display: grid; gap: clamp(28px, 4vw, 56px); }
.env__no {
  display: block; font-family: var(--f-cond); font-weight: 800; text-transform: uppercase;
  font-size: clamp(4.4rem, 13vw, 12rem); line-height: .8; letter-spacing: -0.01em; margin-bottom: .14em;
  color: var(--ultra);
}
.env__title { display: block; font-size: var(--t-l); line-height: 1.02; letter-spacing: -0.025em; max-width: 16ch; }
.env__id h2 { margin: 0 0 22px; }
.env__id .lede { max-width: 36ch; margin: 0; }
.env__sub { font-family: var(--f-display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 2.2em 0 .9em; line-height: 1.4; }
.env__body > p:first-child, .env__left > p.lede + p { max-width: 60ch; }
.env__plate { align-self: start; }

/* formality meter */
.meter { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-family: var(--f-display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.meter__dots { display: inline-flex; gap: 5px; }
.meter__dots i { display: block; width: 26px; height: 8px; border: 1.5px solid currentColor; }
.meter__dots i.on { background: currentColor; }

/* spec sheet */
.spec { margin: 0; border-top: 2px solid currentColor; }
.spec > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(32,33,36,.2); }
.spec dt { font-family: var(--f-display); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.spec dd { margin: 0; }
.t-carbon .spec > div, .t-ultra .spec > div { border-bottom-color: rgba(242,239,229,.22); }
@media (max-width: 400px) { .spec > div { grid-template-columns: 1fr; gap: 2px; } }

.notes { list-style: none; display: grid; gap: 10px; }
.notes li { position: relative; padding-left: 26px; }
.notes li::before { content: ""; position: absolute; left: 0; top: .62em; width: 14px; height: 2px; background: var(--verm-ink); }
.t-carbon .notes li::before, .t-ultra .notes li::before { background: var(--verm); }
.t-ultra .notes li::before { background: #FFB8A8; }

.checks { list-style: none; counter-reset: chk; display: grid; gap: 0; border-top: 2px solid currentColor; }
.checks li { counter-increment: chk; position: relative; padding: 14px 0 14px 3.2rem; border-bottom: 1px solid rgba(32,33,36,.2); }
.checks li::before { content: counter(chk, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-family: var(--f-cond); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.t-carbon .checks li { border-bottom-color: rgba(242,239,229,.22); }
.t-carbon .checks li::before { color: var(--verm); }
.checks strong { font-family: var(--f-display); font-weight: 700; }

/* --- ENV 01: mist, large near-square plate on the right --- */
.env--01 .env__plate { max-width: 640px; }
@media (min-width: 960px) {
  .env--01 .env__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); grid-template-areas: "id plate" "body plate"; column-gap: clamp(48px, 6vw, 112px); }
  .env--01 .env__id { grid-area: id; }
  .env--01 .env__plate { grid-area: plate; position: sticky; top: calc(var(--mast-h) + 24px); }
  .env--01 .env__body { grid-area: body; }
}

/* --- ENV 02: carbon, narrow ultra plate left, text right --- */
.env--02 .env__no { color: var(--verm); }
.env--02 .env__plate { max-width: 420px; }
@media (min-width: 960px) {
  .env--02 .env__grid { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); grid-template-areas: "plate id" "plate body"; column-gap: clamp(48px, 7vw, 128px); align-items: start; }
  .env--02 .env__plate { grid-area: plate; max-width: none; margin-top: clamp(40px, 8vw, 140px); position: sticky; top: calc(var(--mast-h) + 24px); }
  .env--02 .env__id { grid-area: id; }
  .env--02 .env__body { grid-area: body; max-width: 680px; }
}

/* --- ENV 03: ivory, tall height-controlled plate, two-column body --- */
.env--03 .env__plate { max-width: 440px; }
.env__cols { display: grid; gap: 8px 40px; }
@media (min-width: 700px) { .env__cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .env--03 .env__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); grid-template-areas: "id plate" "body plate"; column-gap: clamp(40px, 5vw, 88px); }
  .env--03 .env__id { grid-area: id; }
  .env--03 .env__plate { grid-area: plate; max-width: none; position: sticky; top: calc(var(--mast-h) + 24px); }
  .env--03 .env__body { grid-area: body; }
}

/* --- ENV 04: ultra, centred composition around the plate --- */
.env--04 .env__no { color: var(--ivory); }
.env--04 .env__id { text-align: left; }
.env--04 .env__id .meter { color: #FFB8A8; }
.env--04 .env__plate { max-width: 460px; width: 100%; }
.t-ultra .spec { border-top-color: var(--ivory); }
@media (min-width: 1000px) {
  .env--04 { min-height: min(100svh, 1080px); }
  .env--04 .env__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); grid-template-areas: "id id id" "left plate right"; column-gap: clamp(32px, 4vw, 72px); align-items: start; }
  .env--04 .env__id { grid-area: id; text-align: center; }
  .env--04 .env__id h2 { display: flex; flex-direction: column; align-items: center; }
  .env--04 .env__id .meter { justify-content: center; }
  .env--04 .env__no { font-size: clamp(6rem, 16vw, 15rem); }
  .env--04 .env__title { max-width: none; }
  .env--04 .env__left { grid-area: left; }
  .env--04 .env__plate { grid-area: plate; justify-self: center; }
  .env--04 .env__right { grid-area: right; padding-top: clamp(0px, 8vw, 120px); }
}

/* --- ENV 05: lav, wide plate left spanning two rows --- */
.env--05 .env__no { color: var(--carbon); }
.env--05 .env__plate .plate__frame { background: var(--ivory); }
.spec--wide { margin-top: 1.6em; }
.swap { width: 100%; border-collapse: collapse; font-size: .95rem; }
.swap th { text-align: left; font-family: var(--f-display); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; padding: 0 12px 8px 0; border-bottom: 2px solid currentColor; }
.swap td { padding: 12px 12px 12px 0; border-bottom: 1px solid rgba(32,33,36,.25); vertical-align: top; }
.swap td:first-child { font-family: var(--f-display); font-weight: 500; width: 42%; }
@media (min-width: 960px) {
  .env--05 .env__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "plate id" "plate body"; column-gap: clamp(48px, 6vw, 112px); align-items: start; }
  .env--05 .env__plate { grid-area: plate; position: sticky; top: calc(var(--mast-h) + 24px); }
  .env--05 .env__id { grid-area: id; }
  .env--05 .env__body { grid-area: body; }
}

/* --- ENV 06: vermilion (carbon text only) --- */
.env--06 .env__no { color: var(--carbon); }
.env--06 .notes li::before { background: var(--carbon); }
.env--06 .spec > div, .env--06 .checks li { border-bottom-color: rgba(32,33,36,.3); }
.env--06 .env__plate { max-width: 400px; }
.env--06 .env__plate .plate__frame { background: var(--ivory); }
.env--06 .env__body > p:first-child { font-size: 1.05rem; }
@media (min-width: 960px) {
  .env--06 .env__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); grid-template-areas: "id body" "plate body"; column-gap: clamp(48px, 7vw, 128px); align-items: start; }
  .env--06 .env__id { grid-area: id; }
  .env--06 .env__plate { grid-area: plate; }
  .env--06 .env__body { grid-area: body; padding-top: clamp(0px, 6vw, 96px); }
}

/* full-height feel on large screens */
@media (min-width: 1000px) and (min-height: 700px) {
  .env--01, .env--02, .env--03, .env--05, .env--06 { min-height: min(100svh, 1040px); display: flex; align-items: center; }
  .env > .wrap { width: 100%; }
}

/* ---------- ENV 07: capsule ---------- */
.capsule { padding-block: clamp(72px, 10vw, 160px); }
.capsule__head { display: grid; gap: clamp(20px, 4vw, 64px); margin-bottom: clamp(40px, 6vw, 80px); }
.capsule__head h2 { margin: 0; }
.capsule__head .env__no { color: var(--verm); }
.capsule__intro p:not(.lede) { max-width: 60ch; }
@media (min-width: 960px) { .capsule__head { grid-template-columns: 1fr 1fr; align-items: end; } }

.rail-five { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; padding-top: 22px; border-top: 6px solid var(--ultra); }
.rail-five li:last-child { grid-column: 1 / -1; max-width: calc(50% - 7px); justify-self: center; }
.rail-five .plate__frame { background: var(--mist); padding: 10px; }
.rail-five figcaption { display: grid; gap: 4px; padding-top: 12px; font-size: .9rem; line-height: 1.45; }
.rail-five figcaption strong { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
.rail-five__no { font-family: var(--f-cond); font-weight: 800; font-size: 2.4rem; line-height: .9; color: var(--ultra); }
@media (min-width: 640px) {
  .rail-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail-five li:last-child { grid-column: auto; max-width: none; justify-self: stretch; }
}
@media (min-width: 1040px) {
  .rail-five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; align-items: start; padding-bottom: 48px; }
  /* stepped rail: alternating heights like garments on a rack */
  .rail-five li:nth-child(even) { transform: translateY(48px); }
}

.matrix { margin-top: clamp(72px, 9vw, 140px); }
.matrix__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; margin-bottom: 18px; }
.matrix__head h3 { margin: 0; }
.matrix__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; }
.matrix__legend li { display: inline-flex; align-items: center; gap: 8px; }
.matrix__scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 2px solid var(--carbon); }
.matrix__scroll:focus-visible { outline-offset: 2px; }
.matrix__table { width: 100%; min-width: 640px; border-collapse: collapse; }
.matrix__table th, .matrix__table td { padding: 14px 10px; border-bottom: 1px solid rgba(32,33,36,.2); text-align: center; }
.matrix__table thead th { font-family: var(--f-display); font-size: .74rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; vertical-align: bottom; line-height: 1.3; }
.matrix__table thead th span { display: block; font-family: var(--f-cond); font-weight: 800; font-size: 1.6rem; letter-spacing: 0; color: var(--ultra); }
.matrix__table thead th:first-child, .matrix__table tbody th { text-align: left; }
.matrix__table tbody th { font-family: var(--f-display); font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.matrix__table tbody tr:hover { background: var(--mist); }
.sw { width: 14px; height: 30px; flex: none; }
.sw--navy { background: #1f2a44; }
.sw--slate { background: #55657d; }
.sw--taupe { background: #a89a88; }
.sw--brown { background: #6b5444; }
.sw--grey { background: #8d918e; }
.mk { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; }
.mk--core { background: var(--ultra); }
.mk--ok { border: 2px solid var(--ultra); background: linear-gradient(90deg, var(--ultra) 50%, transparent 50%); }
.mk--no { width: 16px; height: 2px; border-radius: 0; background: var(--ink-soft); }
.matrix__gap { margin: 20px 0 0; max-width: 70ch; padding: 16px 20px; background: var(--verm); color: var(--carbon); }
.matrix__gap a { font-weight: 700; }

.rules { margin-top: clamp(72px, 9vw, 140px); }
.rules__list { list-style: none; counter-reset: rule; display: grid; gap: 36px clamp(24px, 4vw, 64px); }
.rules__list li { counter-increment: rule; padding-top: 18px; border-top: 1px solid rgba(32,33,36,.3); }
.rules__list li::before { content: counter(rule, decimal-leading-zero); display: block; font-family: var(--f-cond); font-weight: 800; font-size: clamp(3.4rem, 6vw, 5.5rem); line-height: .85; color: var(--ultra); margin-bottom: 14px; }
.rules__list h4 { font-size: var(--t-s); font-weight: 700; letter-spacing: 0; margin-bottom: .5em; }
.rules__list p { margin: 0; font-size: .97rem; }
@media (min-width: 700px) { .rules__list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .rules__list { grid-template-columns: repeat(4, 1fr); } .rules__list li:nth-child(even) { margin-top: 64px; } }

/* ---------- next ---------- */
.wd-next { padding-block: clamp(72px, 10vw, 144px); }
.wd-next__grid { display: grid; gap: clamp(32px, 5vw, 72px); }
.wd-next h2 { max-width: 12ch; }
.wd-next__links { list-style: none; border-top: 1px solid rgba(242,239,229,.35); }
.wd-next__links a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; min-height: 48px; text-decoration: none; border-bottom: 1px solid rgba(242,239,229,.2); font-family: var(--f-display); font-size: clamp(1.05rem, 1.6vw, 1.35rem); transition: padding .3s var(--ease), color .2s; }
.wd-next__links a span { font-size: .72rem; letter-spacing: .1em; color: var(--verm); min-width: 2.8em; }
.wd-next__links a:hover { padding-left: 12px; color: #FFB8A8; }
.wd-next__visit p { max-width: 32ch; font-family: var(--f-display); font-size: var(--t-s); }
@media (min-width: 1000px) { .wd-next__grid { grid-template-columns: 1.1fr 1fr .7fr; align-items: start; } }

/* caption numbers on coloured grounds: keep contrast */
.env--05 .plate__no, .env--06 .plate__no { color: var(--carbon); font-weight: 700; }
