/* ---------------------------------------------------------------
   Monty Liquidation Mart — single-page site
   Self-hosted fonts, no third-party requests anywhere on the page.
   Two surfaces only: a roasted dark field for the opening and the
   close, warm paper for the shelf in between. The wordmark is set
   like signage, because that is what it is.
   --------------------------------------------------------------- */

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --paper: #f4efe5;
  --roast: #221812;
  --roast-deep: #1a120e;
  --ink: #241a15;
  --ink-soft: rgba(36, 26, 21, 0.76);
  --ink-faint: rgba(36, 26, 21, 0.52);

  /* One amber, two mixes: the darker one carries text on paper, the lighter
     one carries it on the roast field. */
  --amber: #a9682a;
  --amber-light: #dda45f;

  --rule: rgba(36, 26, 21, 0.16);
  --rule-light: rgba(244, 239, 229, 0.2);

  --display: "Barlow Condensed", "Haettenschweiler", "Arial Narrow", sans-serif;
  --sans: "Barlow", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;

  --gutter: clamp(1.5rem, 6vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- shared type ------------------------------------------------- */

.eyebrow,
.label,
.brand__text {
  font-family: var(--sans);
  font-size: clamp(0.66rem, 1vw, 0.74rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  /* Tracking is applied to the right of every letter, including the last one,
     which leaves the whole line looking a step off-centre without this. */
  text-indent: 0.3em;
  text-transform: uppercase;
}

.label {
  margin: 0 0 1.5rem;
  color: var(--ink-faint);
}

.label--light { color: rgba(244, 239, 229, 0.55); }

/* --- opening ------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 4vw, 3rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--roast);
  color: var(--paper);
  overflow: hidden;
}

/* Two soft lights behind the type, so the field reads as a room rather than a
   flat swatch. Cheap, and it never has to load. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(110% 85% at 16% 10%, rgba(169, 104, 42, 0.30) 0%, rgba(34, 24, 18, 0) 60%),
    radial-gradient(90% 75% at 95% 102%, rgba(221, 164, 95, 0.16) 0%, rgba(34, 24, 18, 0) 58%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
}

/* The brand line sits at the top; the auto margin above the wordmark pushes
   everything else down to fill the screen. */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 6vh, 4rem);
}

.brand__mark {
  width: clamp(1.9rem, 3.2vw, 2.4rem);
  height: auto;
  flex: none;
  color: var(--amber);
}

.brand__text {
  color: rgba(244, 239, 229, 0.6);
  line-height: 1;
}

.wordmark {
  margin: auto 0 0;
  font-family: var(--display);
  font-weight: 700;
  /* Three stacked lines of signage have to fit the screen they open on, so the
     size answers to the shorter axis as well as the wider one. */
  font-size: clamp(2.9rem, min(14vw, 13vh), 8.5rem);
  line-height: 0.84;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.wordmark__line { display: block; }

/* The middle word is the long one; on a wide screen it sets the measure and
   the other two hang from the same left edge. */
.wordmark__line:nth-child(2) { color: var(--amber-light); }

.tagline {
  margin: clamp(1.2rem, 3vh, 1.8rem) 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.72);
}

/* The gag hotline, set like the number painted on the side of a van. It is
   deliberately one letter too long to dial, which is the joke and also the
   reason nobody's real phone rings. */
.hotline {
  margin: clamp(0.5rem, 1.5vh, 0.9rem) 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--amber-light);
}

/* The sign taped in the window. Nobody ever hangs one of these straight. */
.badge {
  align-self: flex-start;
  /* In the flow it sits above the wordmark, which has an auto top margin that
     collapses to nothing on a full screen — hence the explicit gap under it. */
  margin: 1.3rem 0 1.4rem;
  padding: 0.5rem 0.95rem 0.6rem;
  border: 2px solid var(--amber-light);
  border-radius: 2px;
  transform: rotate(-3.5deg);
  text-align: center;
  color: var(--amber-light);
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
}

/* Wide enough to have a margin to hang it in; above the wordmark, out of the
   way of the brand line. */
@media (min-width: 52em) {
  .badge {
    position: absolute;
    top: -0.25rem;
    right: 0;
    margin: 0;
  }
}

.badge__top,
.badge__bot {
  display: block;
  font-size: clamp(0.6rem, 0.9vw, 0.7rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  line-height: 1.4;
}

.badge__big {
  display: block;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

/* Last thing in the opening, so the auto bottom margin is what holds the
   "scroll" line down at the foot of the screen. */
.lede {
  margin: clamp(1.4rem, 3.5vh, 2.2rem) 0 auto;
  max-width: 44ch;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.68;
  color: rgba(244, 239, 229, 0.8);
}

.hero__scroll {
  position: relative;
  margin: 0;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.4);
}

/* --- bands --------------------------------------------------------- */

.band {
  padding: clamp(3rem, 8vh, 5.5rem) var(--gutter);
}

.band__inner {
  max-width: 68rem;
  margin-inline: auto;
}

.band--rule .band__inner {
  border-top: 1px solid var(--rule);
  padding-top: clamp(3rem, 8vh, 5.5rem);
}

/* The section label parks in the left margin on wide screens and simply sits
   above the text on narrow ones. */
@media (min-width: 62em) {
  .split {
    display: grid;
    grid-template-columns: 13rem 1fr;
    gap: clamp(2rem, 5vw, 5rem);
  }

  .split > .label {
    position: sticky;
    top: clamp(2rem, 8vh, 4rem);
    align-self: start;
    margin: 0.5rem 0 0;
  }
}

/* --- prose ---------------------------------------------------------- */

.prose > * { max-width: 58ch; }

.prose p {
  margin: 0 0 1.25em;
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.75;
  color: var(--ink-soft);
}

.prose p:last-child { margin-bottom: 0; }

.prose__opener {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.2rem) !important;
  line-height: 1.06 !important;
  letter-spacing: 0.004em;
  text-transform: uppercase;
  color: var(--ink) !important;
  margin-bottom: 0.7em !important;
  max-width: 23ch;
}

/* --- posted rules ------------------------------------------------------ */

/* The store policy, set the size of something printed and taped to a door
   rather than the size of body copy. */
.rules {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 40ch;
}

.rules li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rules li:first-child { border-top: 0; padding-top: 0; }

/* --- fine print --------------------------------------------------------- */

/* Actual fine print: small, tracked, and stacked like the back of a receipt.
   The joke is that it is where the shop is most honest. */
.fineprint {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 46ch;
  color: var(--ink-faint);
}

.fineprint li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
}

/* --- the shelf -------------------------------------------------------- */

.shelf {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shelf__item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 1.25rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}

.shelf__item:first-child { border-top: 0; padding-top: 0; }

.shelf__num {
  grid-row: 1 / span 2;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1;
  color: var(--amber);
}

/* "Lot" rides above the number in stencil-sized caps, the way a number gets
   written on the end of a crate. */
.shelf__lot {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.shelf__title {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shelf__item p {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(0.97rem, 1.2vw, 1.04rem);
  line-height: 1.72;
  color: var(--ink-soft);
}

@media (max-width: 30em) {
  .shelf__item { grid-template-columns: 1fr; gap: 0; }
  .shelf__num { grid-row: auto; display: block; margin-bottom: 0.3rem; }
}

/* --- close ------------------------------------------------------------- */

.closing {
  padding: clamp(4rem, 13vh, 9rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
  background: var(--roast-deep);
  color: var(--paper);
}

.closing__inner {
  max-width: 68rem;
  margin-inline: auto;
}

.closing__lead {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.06;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.72);
}

/* The number gets the last word, the way it would on the side of the van. */
.closing__hotline {
  margin: 0.35rem 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5.4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0.02em;
  color: var(--amber-light);
}

.legal {
  margin: clamp(2.5rem, 7vh, 4rem) 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule-light);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 229, 0.45);
}

/* --- links ------------------------------------------------------------- */

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
  transition: text-decoration-color 150ms ease;
}

.prose a,
.legal a { text-decoration-color: var(--amber-light); }

a:hover,
a:focus-visible { text-decoration-color: currentColor; }

:where(a):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 2;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  text-decoration: none;
}

/* --- reveal ------------------------------------------------------------- */

/* Visible by default. The script adds .is-armed to hide these only once it
   knows it can also reveal them, so a scripting failure leaves the page
   readable rather than blank. */
.reveal.is-armed {
  opacity: 0;
  transform: translateY(0.9rem);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-armed.is-in {
  opacity: 1;
  transform: none;
}

/* --- short landscape viewports ------------------------------------------ */

@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: auto; padding-block: clamp(2rem, 10vh, 3.5rem); }
  .brand { margin-bottom: 2rem; }
  .wordmark { font-size: clamp(2.6rem, 8vw, 4.5rem); }
  .hero__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
