/* Swoodie.com — shared stylesheet
   Palette: pitch #17130F · cedar #3A2C22 · wool #D9CFC0 · brass #C08A3E · lint #8A8175
   Type: Archivo Black (display) · Newsreader (body) · Archivo (care-label utility)
*/

:root {
  --pitch: #17130F;
  --cedar: #3A2C22;
  --cedar-lo: #241A13;
  --wool: #D9CFC0;
  --brass: #C08A3E;
  --lint: #8A8175;
  --glow: #F0D9A8;

  --display: "Archivo Black", "Arial Black", sans-serif;
  --body: "Newsreader", Georgia, serif;
  --label: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 34rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--pitch);
  color: var(--wool);
  font-family: var(--body);
  font-size: clamp(1rem, 0.97rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  font-weight: 300;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- care label: the site's utility voice ---------- */
.tag {
  font-family: var(--label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lint);
  display: block;
}

.tag--brass { color: var(--brass); }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem 0;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--wool);
}

.masthead nav {
  display: flex;
  gap: 1.5rem;
}

.masthead nav a {
  font-family: var(--label);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--lint);
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover,
.masthead nav a:focus-visible { color: var(--wool); border-bottom-color: var(--brass); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3rem, 9vw, 6rem) clamp(2rem, 6vw, 3.5rem); }

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 1.1rem + 4.4vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 1.1rem 0 0;
  max-width: 18ch;
}

.hero h1 em {
  font-family: var(--body);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--brass);
}

.lede {
  max-width: var(--measure);
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  color: #C6BCAC;
}

.disclosure {
  font-family: var(--label);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lint);
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(217, 207, 192, 0.14);
  max-width: var(--measure);
  line-height: 1.7;
}

/* ---------- section headings ---------- */
.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(217, 207, 192, 0.14);
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}

.section__head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- THE DOORS (entry hall) ---------- */
.hall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
  perspective: 1400px;
}

.door {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3.35;
  text-decoration: none;
  border-radius: 3px;
  background:
    radial-gradient(120% 90% at 50% 45%, var(--glow) 0%, #C79A55 42%, #6B4B22 100%);
  overflow: hidden;
  isolation: isolate;
}

/* warm light in the gap behind the leaf */
.door__light {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(240, 217, 168, 0.85) 0%, rgba(240, 217, 168, 0) 55%);
  opacity: 0;
  transition: opacity 500ms ease;
}

.door__leaf {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.16) 0 1px, rgba(0,0,0,0) 1px 7px),
    linear-gradient(96deg, var(--cedar) 0%, var(--cedar-lo) 78%);
  border-right: 1px solid rgba(0, 0, 0, 0.5);
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 620ms cubic-bezier(0.22, 0.8, 0.28, 1), box-shadow 620ms ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.15rem 1rem;
  box-shadow: inset -18px 0 34px -22px rgba(0,0,0,0.9);
}

/* inset panel moulding, drawn not decorated: it reads as a real door */
.door__leaf::before {
  content: "";
  position: absolute;
  inset: 0.9rem;
  border: 1px solid rgba(217, 207, 192, 0.13);
  border-radius: 2px;
  pointer-events: none;
}

.door__knob {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(192, 138, 62, 0.18);
}

.door__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1rem, 0.8rem + 0.75vw, 1.45rem);
  line-height: 1;
  color: var(--wool);
  margin-top: 0.5rem;
  position: relative;
}

.door__note {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #A79C8D;
  margin: 0.5rem 0 0;
  position: relative;
}

.door:hover .door__leaf,
.door:focus-visible .door__leaf { transform: rotateY(-26deg); }

.door:hover .door__light,
.door:focus-visible .door__light { opacity: 1; }

.door:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }

/* ---------- THE RAIL (inside a closet) ---------- */
.closet {
  position: relative;
  padding-block: clamp(2rem, 5vw, 3rem) clamp(3rem, 8vw, 5rem);
}

.rail {
  position: relative;
  padding-top: 3.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.2vw, 1.75rem);
}

/* the brass rod every garment hangs from */
.rail::before {
  content: "";
  position: absolute;
  top: 2.6rem;
  left: -0.5rem;
  right: -0.5rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--glow) 0%, var(--brass) 45%, #6B4B22 100%);
  box-shadow: 0 6px 18px -8px rgba(192, 138, 62, 0.6);
}

.hanger {
  position: relative;
  margin-top: -2.9rem;
  padding-top: 2.9rem;
  transform-origin: 50% 0.4rem;
  transition: transform 420ms cubic-bezier(0.22, 0.8, 0.28, 1);
}

/* garments never hang level in a real closet */
.rail > .hanger:nth-child(even) { margin-top: -2.1rem; }

.hook {
  position: absolute;
  top: 0.15rem;
  left: 50%;
  width: 20px;
  height: 26px;
  margin-left: -10px;
  border: 2px solid var(--brass);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  transform: rotate(-6deg);
}

.hook::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 50%;
  width: 2px;
  height: 0.75rem;
  margin-left: -1px;
  background: var(--brass);
  opacity: 0.75;
}

.garment {
  background: linear-gradient(168deg, #241C15 0%, #1B1611 100%);
  border: 1px solid rgba(217, 207, 192, 0.12);
  border-radius: 2px;
  padding: 1.15rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 15rem;
}

.garment h3 {
  font-family: var(--label);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0;
}

.garment__note {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #A79C8D;
  flex: 1;
}

.open {
  font-family: var(--label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--pitch);
  background: var(--brass);
  padding: 0.7rem 0.9rem;
  text-align: center;
  border-radius: 2px;
  transition: background 200ms ease, transform 200ms ease;
}

.open:hover, .open:focus-visible { background: var(--glow); }

.hanger:hover { transform: rotate(-1.1deg) translateY(-5px); }

.hanger:focus-within { transform: rotate(-1.1deg) translateY(-5px); }

.open:focus-visible { outline: 2px solid var(--wool); outline-offset: 3px; }

/* ---------- notes / articles ---------- */
.notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(217, 207, 192, 0.14); border-block: 1px solid rgba(217, 207, 192, 0.14); }

.note {
  background: var(--pitch);
  padding: 1.6rem 1.4rem;
  text-decoration: none;
  display: block;
  transition: background 240ms ease;
}

.note:hover, .note:focus-visible { background: #1E1913; }

.note h3 {
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0.6rem 0 0.4rem;
}

.note p { margin: 0; color: var(--lint); font-size: 0.9375rem; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid rgba(217, 207, 192, 0.14);
  margin-top: clamp(2rem, 6vw, 4rem);
  padding-block: 2.25rem 3rem;
  display: grid;
  gap: 1.25rem;
}

.foot p { margin: 0; font-size: 0.875rem; color: var(--lint); max-width: 46rem; }

.foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.foot nav a {
  font-family: var(--label);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--lint);
}

.foot nav a:hover, .foot nav a:focus-visible { color: var(--brass); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hall { grid-template-columns: repeat(2, 1fr); }
  .rail { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .rail { grid-template-columns: 1fr; }
  .rail::before { display: none; }
  .hanger, .rail > .hanger:nth-child(even) { margin-top: 0; padding-top: 2.4rem; }
  .notes { grid-template-columns: 1fr; }
  .masthead nav { gap: 1rem; }
  .garment { min-height: 0; }
}

/* ---------- quality floor ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .door .door__leaf { transform: rotateY(-26deg); }
  .door .door__light { opacity: 1; }
  .hanger:hover, .hanger:focus-within { transform: none; }
}

/* ---------- the flat: technical drawing ---------- */
.anatomy {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.flat {
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  overflow: visible;
}

/* tech-pack line hierarchy: outline > seam > topstitch > rib */
.flat .ol { fill: #221A14; stroke: var(--wool); stroke-width: 2.8; stroke-linejoin: round; }
.flat .sm { fill: none; stroke: var(--wool); stroke-width: 1.5; stroke-linecap: round; }
.flat .ts { fill: none; stroke: var(--lint); stroke-width: 1; stroke-dasharray: 5 4; }
.flat .rb { fill: none; stroke: var(--lint); stroke-width: 0.7; opacity: 0.75; }
.flat .hw { fill: var(--brass); }
.flat .sm-fill { fill: none; stroke: var(--lint); stroke-width: 1.2; }
.flat .pin { fill: var(--brass); }
.flat .pin-num { fill: var(--pitch); font-family: var(--label); font-size: 13px; font-weight: 600; text-anchor: middle; }
.flat .view-label {
  fill: var(--lint);
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-anchor: middle;
}

.legend {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: part;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3rem);
}

.legend li {
  counter-increment: part;
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0.75rem;
  padding-block: 0.7rem;
  border-top: 1px solid rgba(217, 207, 192, 0.14);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.legend li::before {
  content: counter(part);
  font-family: var(--label);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brass);
  border: 1px solid var(--brass);
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
}

.legend b { font-family: var(--label); font-weight: 600; font-size: 0.9375rem; display: block; }
.legend span { color: var(--lint); }

/* spectrum: where the garment sits between two known things */
.spectrum { margin-block: clamp(2rem, 5vw, 3rem); }

.spectrum__bar {
  height: 2px;
  background: linear-gradient(90deg, var(--lint) 0%, var(--brass) 50%, var(--lint) 100%);
  position: relative;
  margin: 2.75rem 0 0.9rem;
}

.spectrum__bar span {
  position: absolute;
  top: -0.55rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pitch);
  border: 2px solid var(--lint);
}

.spectrum__bar span:nth-child(1) { left: 0; }
.spectrum__bar span:nth-child(2) { left: calc(50% - 6px); border-color: var(--brass); background: var(--brass); }
.spectrum__bar span:nth-child(3) { right: 0; }

.spectrum__marks { display: flex; justify-content: space-between; }
.spectrum__marks span { flex: 1; }
.spectrum__marks span:nth-child(2) { text-align: center; color: var(--brass); }
.spectrum__marks span:nth-child(3) { text-align: right; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.15rem; }
.prose h3 { font-family: var(--label); font-weight: 600; font-size: 1.0625rem; margin: 2rem 0 0.6rem; }

@media (max-width: 780px) {
  .legend { grid-template-columns: 1fr; }
}
