/* =========================================================================
   Design Warehouse — components.css
   Buttons, links, line-art, cards, marquee, swatches, stats, specs, form.
   ========================================================================= */

/* ================================================================
   1. BUTTONS
   Filled from the left on hover — fast, no bounce.
   ================================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  isolation: isolate;
  overflow: hidden;
  transition: color var(--dur-2) var(--ease-out-quart),
              border-color var(--dur-2) var(--ease-out-quart);
}

/* The wipe is the section's ink, not currentColor — otherwise the fill would
   take the hovered text colour and swallow the label. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-3) var(--ease-out-expo);
}

.btn__label { position: relative; }

.btn__arrow {
  position: relative;
  display: inline-block;
  transition: transform var(--dur-2) var(--ease-out-expo);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Outline button — inherits the ink of its section. */
.btn--line {
  border: 1px solid var(--hair-strong);
  color: var(--fg);
}
.btn--line:hover {
  color: var(--bg);
  border-color: var(--fg);
}
.btn--line:hover::before { transform: scaleX(1); }

/* Solid button — reversed out of the section, filling with the accent on
   hover. Ink on clay measures 4.7:1, which is why the hover label is dark
   rather than paper. */
.btn--solid {
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
}
.btn--solid::before { background: var(--clay); }
.btn--solid:hover { color: var(--ink); border-color: var(--clay); }
.btn--solid:hover::before { transform: scaleX(1); }

.btn--sm { padding: 11px 20px; }
.btn--block { width: 100%; }

/* ================================================================
   2. LINK WITH A SWEEPING UNDERLINE
   ================================================================ */
.link-sweep {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--dur-2) var(--ease-out-expo),
              color var(--dur-1) linear;
  /* The underline is drawn at the padding edge, so the 2px at the bottom is
     what holds it off the descenders. The 6px at the top buys the hit area:
     an inline box's vertical padding does not move the line it sits on, so a
     16px link becomes a 24px target and nothing on the page shifts. */
  padding: 6px 0 2px;
}
.link-sweep:hover { background-size: 100% 1px; }

.link-sweep--accent { color: var(--accent-text); }

/* "Start a brief →" is the one link-sweep that is also an .eyebrow: 11px type
   on a 1.4 line box, so the shared padding leaves it a pixel or two under the
   24px a target needs. It stands alone rather than inside a sentence, so it
   has to carry a control's height. Inline padding does not move the line. */
.link-sweep.eyebrow { padding-top: 9px; }

/* ================================================================
   3. LINE ART
   Everything visual on this site is drawn, not photographed.
   ================================================================ */
.art {
  width: 100%;
  height: 100%;
  display: block;
}

.art .ln {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art .soft {
  fill: currentColor;
  opacity: 0.07;
  stroke: none;
}

.art .accent { stroke: var(--clay); opacity: 0.9; }

/* ================================================================
   3b. STAGE PLATES
   The eight delivery stages, each drawn rather than photographed, so
   the section needs no imagery that does not exist yet.
   ================================================================ */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s-5);
}

.stage__frame {
  display: block;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--hair);
  background: var(--bg-alt);
  color: var(--fg);
  padding: clamp(10px, 14%, 22px);
  transition: border-color var(--dur-3) var(--ease-out-quart),
              transform var(--dur-3) var(--ease-out-expo);
}
.stage:hover .stage__frame { border-color: var(--hair-strong); transform: translateY(-4px); }

.stage__num {
  display: block;
  margin-top: var(--s-3);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.stage__name {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-small);
  font-weight: 500;
}

/* ================================================================
   4. WORK / SERIES CARDS
   ================================================================ */
.work-card { display: block; }

.work-card__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  border: 1px solid var(--hair);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5%, 64px);
  transition: border-color var(--dur-3) var(--ease-out-quart);
}

.work-card:hover .work-card__frame { border-color: var(--hair-strong); }

/* Parallax lives on the media wrapper, the hover scale on the art inside it,
   so the two transforms never fight over the same element. */
.work-card__media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.work-card__frame .art {
  color: var(--fg);
  transition: transform 1200ms var(--ease-out-expo);
}
.work-card:hover .work-card__frame .art { transform: scale(1.03); }

/* Photography variant: the plate loses its padding so the image runs to the
   frame edges, and the image takes the same hover scale as the line art. */
.work-card__frame--photo { padding: 0; }

.work-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: transform 1200ms var(--ease-out-expo), opacity var(--dur-4) linear;
}

.work-card__img.is-loaded { opacity: 1; }
.work-card:hover .work-card__img { transform: scale(1.03); }

/* Corner registration marks — the "archive plate" detail. */
.work-card__frame::before,
.work-card__frame::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--hair-strong);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out-quart);
}
.work-card__frame::before {
  top: 14px; left: 14px;
  border-right: 0; border-bottom: 0;
}
.work-card__frame::after {
  bottom: 14px; right: 14px;
  border-left: 0; border-top: 0;
}
.work-card:hover .work-card__frame::before,
.work-card:hover .work-card__frame::after { opacity: 1; }

.work-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  margin-top: var(--s-5);
}

.work-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.work-card__no {
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.work-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--s-5);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--hair);
}

.work-card__specs div { display: flex; gap: 8px; align-items: baseline; }
.work-card__specs dt {
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--muted);
}
.work-card__specs dd { font-size: var(--fs-small); color: var(--fg); }

/* ================================================================
   5. MARQUEE
   Two identical sets; -50% loops seamlessly because each set carries
   its own trailing padding.
   ================================================================ */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: clamp(20px, 4vh, 40px);
  border-block: 1px solid var(--hair);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 48s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee__set {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-right: var(--s-8);
  gap: var(--s-8);
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-5);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.marquee__item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--clay);
  flex: 0 0 auto;
  opacity: 0.8;
}

/* The rhythm in the marquee comes from style, not from contrast: outlined
   type at this size renders as a hairline that antialiases down to ~2.9:1.
   Italic in the muted ink keeps the alternation and stays legible. */
.marquee__item--ghost {
  font-style: italic;
  color: var(--muted);
}
.marquee__item--ghost::after { background: var(--brass); }

/* ================================================================
   6. SWATCHES
   ================================================================ */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: var(--s-5);
}

.swatch__chip {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--sw, #999);
  border: 1px solid var(--hair);
  transition: transform var(--dur-3) var(--ease-out-expo);
}
.swatch:hover .swatch__chip { transform: translateY(-5px); }

.swatch__name {
  display: block;
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  font-weight: 500;
}

.swatch__code {
  display: block;
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

/* ================================================================
   7. STATS / COUNTERS
   ================================================================ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-7) var(--s-5);
  border-top: 1px solid var(--hair);
  padding-top: var(--s-6);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  display: inline-block;
}

.stat__unit {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  color: var(--accent-text);
  margin-left: 2px;
}

.stat__label {
  display: block;
  margin-top: var(--s-3);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--muted);
}

/* ================================================================
   8. SPEC ROWS (trade programme)
   ================================================================ */
.spec-rows { border-top: 1px solid var(--hair); }

.spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: var(--s-4) var(--s-6);
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
}

.spec-row dt {
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--muted);
}

.spec-row dd {
  font-size: var(--fs-body);
  line-height: 1.55;
}

.spec-row dd strong {
  font-weight: 500;
  color: var(--accent-text);
}

@media (max-width: 620px) {
  .spec-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Certification badges. */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-pill);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color var(--dur-2) var(--ease-out-quart),
              color var(--dur-2) linear;
}
.badge:hover { border-color: var(--hair-strong); color: var(--fg); }

.badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
  flex: 0 0 auto;
}

/* ================================================================
   9. PROCESS STEPS
   ================================================================ */
.steps { border-top: 1px solid var(--hair); }

.step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--s-5);
  padding-block: clamp(24px, 4vh, 44px);
  border-bottom: 1px solid var(--hair);
}

.step__num {
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding-top: 5px;
  transition: color var(--dur-2) linear;
}

.step__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-3);
  transition: color var(--dur-4) var(--ease-out-quart);
}

/* The "currently reading" state is carried by colour, not by element opacity:
   fading the whole block would drop the body copy far below AA on the dark
   ground, and only one step is ever active. */
.js .step__title { color: var(--muted); }
.step.is-active .step__title { color: var(--fg); }
.step.is-active .step__num { color: var(--accent-text); }

.step__body { font-size: var(--fs-small); color: var(--muted); max-width: 58ch; }

.step__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--s-4);
}

.tag {
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hair);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
}

@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* ================================================================
   10. FORM
   ================================================================ */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6) var(--s-6);
}

.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--muted);
}

.field label .req { color: var(--accent-text); margin-left: 3px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  padding: 10px 0;
  font-size: var(--fs-body);
  font-family: var(--font-text);
  border-radius: 0;
  transition: border-color var(--dur-2) var(--ease-out-quart);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.6;
  padding-top: 12px;
}

.field input:hover,
.field select:hover,
.field textarea:hover { border-bottom-color: var(--fg); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--clay);
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }

/* Custom caret for the native select. */
.field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% + 1px),
                       calc(100% - 7px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.field select option { background: var(--ink); color: var(--paper); }

.field__err {
  font-size: var(--fs-meta);
  letter-spacing: 0.04em;
  color: var(--accent-text);
  min-height: 0;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity var(--dur-2) linear, transform var(--dur-2) var(--ease-out-quart);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-bottom-color: var(--clay); }

.field.has-error .field__err { opacity: 1; transform: translateY(0); }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.55;
}

.checkbox input {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 1px solid var(--hair-strong);
  cursor: pointer;
  position: relative;
  transition: border-color var(--dur-1) linear, background var(--dur-1) linear;
}
.checkbox input:checked { border-color: var(--clay); background: var(--clay); }
.checkbox input:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--paper);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg);
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5);
  margin-top: var(--s-2);
}

.form__note { font-size: var(--fs-meta); letter-spacing: 0.04em; color: var(--muted); }

.form-status {
  grid-column: 1 / -1;
  border: 1px solid var(--hair-strong);
  border-left: 2px solid var(--clay);
  padding: var(--s-4) var(--s-5);
  font-size: var(--fs-small);
  color: var(--fg);
  display: none;
}
.form-status.is-shown { display: block; }

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

/* ================================================================
   11. CONTACT ASIDE
   ================================================================ */
.aside-block + .aside-block {
  margin-top: var(--s-7);
  padding-top: var(--s-7);
  border-top: 1px solid var(--hair);
}

.aside-block__title {
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-4);
}

.aside-block address {
  font-style: normal;
  font-size: var(--fs-small);
  line-height: 1.75;
}

.aside-block a { color: var(--fg); }

.office-list { display: flex; flex-direction: column; gap: var(--s-4); }

.office {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: var(--s-4);
  font-size: var(--fs-small);
  line-height: 1.6;
}

.office__city {
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  padding-top: 2px;
}

/* ================================================================
   12. SMALL SHARED PIECES
   ================================================================ */
.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  font-size: var(--fs-small);
  color: var(--muted);
}

.big-index {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--accent-text);
}

.callout {
  border-left: 2px solid var(--clay);
  padding-left: var(--s-5);
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 40ch;
}
