/* ==========================================================================
   rF Backpack — groplot.com
   Single-page site. Mobile-first. No JS, no frameworks, no webfonts.
   Palette sampled directly from private/website_comp.png.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Colour — sampled from the comp */
  --bg:            #000;
  --fg:            #d2d4d2;  /* body copy                                   */
  --fg-strong:     #fff;     /* labels, pull-quote line 1                   */
  --fg-muted:      #9a9c9a;  /* secondary / supporting copy                 */
  --accent:        #73ac18;  /* comp green, 7.6:1 on black                  */
  --accent-bright: #96d523;  /* hover / focus only                          */
  --rule:          #3d3f3d;  /* hairline section rules                      */
  --border-accent: #6a9016;  /* contact panel border                        */

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;
  /* The comp is set in a condensed grotesque. No local condensed face is
     guaranteed, and a webfont is not worth the bytes on con wifi, so display
     text uses a narrow face where the OS has one and degrades to the system
     UI face everywhere else. */
  --font-display: "Roboto Condensed", "Helvetica Neue Condensed",
                  "Arial Narrow", var(--font);

  /* Rhythm */
  --pad: 1.25rem;             /* page gutter                                */
  --measure: 68ch;            /* readable line length                       */
  --gap-section: 2.75rem;
}

/* --------------------------------------------------------------- reset -- */

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  /* Belt and braces against any single long token forcing a sideways scroll. */
  overflow-wrap: break-word;
}

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

img { height: auto; }

h1, h2, h3, p, ul, figure, blockquote { margin: 0; }

ul { padding: 0; list-style: none; }

a { color: inherit; }

/* Links are underlined, so they never rely on colour alone. */
a:hover { color: var(--accent-bright); }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------- layout --- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

main { display: block; }

/* Hairline that separates the major sections, as in the comp. Drawn as a
   pseudo-element so it stops at the gutter instead of running edge to edge.
   Absolutely positioned, so it never becomes a stray grid item. */
.ruled {
  position: relative;
  padding-top: var(--gap-section);
  margin-top: var(--gap-section);
}

.ruled::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--rule);
}

/* ----------------------------------------------------------- masthead --- */

.masthead {
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.9rem;
  padding-top: 1.6rem;
  padding-bottom: 1.4rem;
}

.masthead__logo {
  grid-column: 1;
  grid-row: 1;
  width: 66px;
}

.masthead__logo img { width: 100%; }

.masthead__rule {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  height: 52px;
  background: #dddcdb;
}

.masthead__title {
  grid-column: 3;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8.6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--accent);
}

/* On phones the tagline gets the full width so it stays on one line. */
.masthead__tagline {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 0.75rem;
  /* Sized to stay on one line down to ~360px. */
  font-size: clamp(0.72rem, 3.05vw, 1.24rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-strong);
}

/* --------------------------------------------------------------- hero --- */

.hero img {
  width: 100%;
  /* The source photo is 746x432; lock the box so nothing shifts on load. */
  aspect-ratio: 746 / 432;
  object-fit: cover;
}

/* Reads as an introduction tied to the photograph above it, not a stray
   paragraph — hence the short measure and the tight gap to the image. */
.deck {
  margin-top: 1rem;
  max-width: 58ch;
  font-size: clamp(1.03rem, 3.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--fg-strong);
}

/* ---------------------------------------------------- section headings --- */

.h2 {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5.6vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--accent);
  text-wrap: balance;
}

.h2 .ico {
  flex: none;
  width: 1.12em;
  height: 1.12em;
}

.ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* -------------------------------------------------------------- about --- */

.about p + p,
.about .list { margin-top: 1rem; }

.about .prose { max-width: var(--measure); }

.about__figure img {
  width: 100%;
  aspect-ratio: 370 / 494;
  object-fit: cover;
}

/* Stacked, this photo would otherwise stretch to the full column and blow a
   370px source up past 2x. Cap it near its native width and centre it. */
.about__figure {
  max-width: 440px;
  margin: 1.75rem auto;
}

/* Headings are uppercased in CSS, but the "rF" wordmark keeps its lowercase r. */
.nocaps { text-transform: none; }

/* The page's loudest typographic moment. */
.pull {
  margin: 2rem 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.06;
  text-wrap: balance;
}

.pull__a {
  display: block;
  font-size: clamp(1.12rem, 4.5vw, 1.72rem);
  letter-spacing: 0.015em;
  color: var(--fg-strong);
}

.pull__b {
  display: block;
  margin-top: 0.15em;
  font-size: clamp(1.65rem, 7.4vw, 2.95rem);
  letter-spacing: 0.005em;
  color: var(--accent);
}

/* ------------------------------------------------------ bulleted lists --- */

.list li {
  position: relative;
  padding-left: 1.15rem;
  margin-top: 0.5rem;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0.05rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.list li:first-child { margin-top: 0; }

/* ------------------------------------------------------------ how to play */

.play__intro { max-width: var(--measure); }

.play__steps {
  margin-top: 1.9rem;
  display: grid;
  gap: 1.6rem;
}

.step__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.4rem;
}

.step__head .ico {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.step__title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--fg-strong);
}

/* Body copy hangs under the label, not the icon — keeps the labels scannable. */
.step__body {
  padding-left: calc(28px + 0.7rem);
  max-width: 62ch;
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--fg-muted);
}

.play__outro {
  margin-top: 1.9rem;
  max-width: var(--measure);
  color: var(--fg-muted);
}

/* ------------------------------------------- features + ground rules --- */

.cols { display: grid; gap: var(--gap-section); }

/* Keeps a readable measure while these are stacked; does not bind once they
   sit side by side. */
.cols > * { max-width: var(--measure); }

/* The one line that matters most on the page. The qualifier stays quiet and
   the hard rule itself carries the accent — noticeable, but not a callout. */
.rules__lead {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-size: 0.95em;
  line-height: 1.5;
  color: var(--fg-muted);
}

.rules__lead strong {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.3em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--accent);
}

.rules__note {
  margin-top: 1.1rem;
  color: var(--fg-muted);
}

/* ------------------------------------------------------------ contact --- */

.contact-section { margin-top: var(--gap-section); }

.contact {
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  padding: 1.6rem 1.15rem 0.6rem;
  text-align: center;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  text-wrap: balance;
}

.contact__body {
  margin: 0.8rem auto 0;
  max-width: 62ch;
  font-size: 0.97rem;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.contact__list { margin-top: 1.1rem; }

.contact__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 54px;          /* comfortable one-handed tap target */
  padding: 0.35rem 0.15rem;
  text-align: left;
  border-top: 1px solid rgba(115, 172, 24, 0.26);
}

.contact__item:first-child { border-top: 0; }

.contact__item .ico {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.contact__label {
  /* Visible on wide screens only — on phones the icon plus value is enough. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact__value {
  font-size: 1.02rem;
  color: var(--fg-strong);
}

a.contact__value {
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

/* ----------------------------------------------------------- colophon --- */

.colophon {
  margin-top: var(--gap-section);
  padding-bottom: 2.6rem;
}

.colophon__mark {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--rule);
}

.colophon__mark::before,
.colophon__mark::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #5f605f;
}

.colophon__skull {
  flex: none;
  width: 26px;
  height: auto;
  opacity: 0.92;
}

/* ==========================================================================
   Tablet — 640px and up
   ========================================================================== */

@media (min-width: 640px) {
  :root { --pad: 2rem; }

  .masthead {
    column-gap: 1.5rem;
    padding-top: 2.4rem;
    padding-bottom: 2rem;
  }

  .masthead__logo { width: 100px; }
  .masthead__rule { height: 76px; }

  .contact { padding: 1.75rem 2rem 1.6rem; }

  /* Two contact methods sit comfortably on one line from here up. */
  .contact__list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 1.75rem;
  }

  .contact__item {
    min-height: 0;
    border-top: 0;
    border-left: 1px solid rgba(115, 172, 24, 0.3);
    padding-left: 1.75rem;
  }

  .contact__item:first-child { border-left: 0; padding-left: 0; }
}

/* ==========================================================================
   Wide tablet — 760px and up
   The tagline only moves up beside the title once column three is wide enough
   to hold it on one line; below this it keeps the full-width phone position.
   ========================================================================== */

@media (min-width: 760px) {
  .masthead__logo { grid-row: 1 / span 2; }
  .masthead__rule { grid-row: 1 / span 2; height: 90px; }
  .masthead__title { grid-column: 3; grid-row: 1; }

  .masthead__tagline {
    grid-column: 3;
    grid-row: 2;
    margin-top: 0.55rem;
  }
}

/* ==========================================================================
   Desktop — 900px and up
   ========================================================================== */

@media (min-width: 900px) {
  :root { --gap-section: 3.6rem; }

  /* A touch more air in the reading copy on a laptop screen. */
  body { font-size: 1.05rem; }

  /* The masthead should read as the project's identity, not a nav bar. */
  .masthead {
    column-gap: 1.75rem;
    padding-top: 2.75rem;
    padding-bottom: 2.25rem;
  }

  .masthead__logo { width: 124px; }
  .masthead__rule { height: 106px; }
  .masthead__tagline { margin-top: 0.6rem; }

  .deck { margin-top: 1.15rem; }

  .step__title { font-size: 1.18rem; }

  .step__body {
    font-size: 1em;
    line-height: 1.6;
  }

  /* About: copy left, internals photo right — the comp's arrangement.
     Roughly 57/43 so the text keeps a full measure and the photo still
     carries its half of the section. */
  .about {
    display: grid;
    grid-template-columns: minmax(0, 57fr) minmax(0, 43fr);
    column-gap: 3.5rem;
    align-items: start;
  }

  .about > .h2,
  .about > .prose,
  .about > .pull { grid-column: 1; }

  .about__figure {
    grid-column: 2;
    grid-row: 1 / span 4;
    max-width: none;
    margin-top: 0.4rem;
    margin-bottom: 0;
  }

  /* Features | Ground Rules, split by a hairline on the centre line. */
  .cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0;
  }

  .cols > :first-child { padding-right: 3rem; }

  .cols > * + * {
    border-left: 1px solid var(--rule);
    padding-left: 3rem;
  }

  .contact__body { font-size: 1em; }
  .contact__value { font-size: 1.02em; }
}

/* ==========================================================================
   Wide desktop — 1000px and up
   Three across, as in the comp. Held back to here so each column carries a
   sensible line length instead of a narrow ribbon of text.
   ========================================================================== */

@media (min-width: 1000px) {
  .play__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ==========================================================================
   Full width — 1120px and up, where the container stops growing
   ========================================================================== */

@media (min-width: 1120px) {
  /* Space is no longer contested here, so the tagline can carry its proper
     weight under the enlarged title. */
  .masthead__tagline { font-size: 1.45rem; }
}

/* ==========================================================================
   Motion / print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
