/* Plainfoot Realty. Yard-sign design: white page, sign-yellow bands, black type and bars. */

:root {
  --white: #ffffff;
  --yellow: #ffd60a;
  --black: #111111;
  --grey: #6b6b6b;
  --rule: 4px;
  --gutter: 16px;
  --pad: 4rem;
  --display: "Barlow Condensed", "Arial Narrow", Arial, Helvetica, sans-serif;
  --body: "Barlow", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
}

p { margin: 0 0 1.25rem; max-width: 56ch; }
p:last-child { margin-bottom: 0; }

dd, figcaption, .facts, .tile p { max-width: 56ch; }

.container {
  width: min(100% - (var(--gutter) * 2), 72rem);
  margin-inline: auto;
}

a { color: inherit; }

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}

svg text {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  fill: #111111;
}

/* Type */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 1.5rem;
  overflow-wrap: break-word;
}

h1 {
  font-weight: 800;
  font-size: clamp(2rem, 9vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.9rem, 7vw, 3.25rem);
  max-width: 18ch;
}

.pull {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 7vw, 3.25rem);
  line-height: 1.02;
  max-width: 20ch;
  margin: 2.5rem 0;
}

.lede {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
}

figure { margin: 0; }

figcaption {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--grey);
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 0.5rem 1.25rem;
  background: var(--black);
  color: var(--white);
  border: var(--rule) solid var(--black);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
}

.btn:hover { background: var(--yellow); color: var(--black); }

.btn--yellow { background: var(--yellow); color: var(--black); }
.btn--yellow:hover { background: var(--white); }

.btn--ghost { background: var(--white); color: var(--black); }
.btn--ghost:hover { background: var(--yellow); }

.btn--outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--black); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  text-decoration-color: var(--yellow);
}

.text-link:hover { text-decoration-color: var(--black); }

/* Header */

.site-header { border-bottom: var(--rule) solid var(--black); }

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 64px;
  padding-block: 0.5rem;
}

.site-header .btn {
  font-size: 1rem;
  padding: 0.4rem 0.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  white-space: nowrap;
}

.wordmark__mark {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  outline: 3px solid var(--black);
}

/* Sections and bands */

main > section {
  padding-block: var(--pad);
  border-top: var(--rule) solid var(--black);
}

main > section:first-child { border-top: 0; }

.band--yellow { background: var(--yellow); }

.band--black {
  background: var(--black);
  color: var(--white);
}

.band--black h2,
.band--black .pull { color: var(--yellow); }

.band--black figcaption { color: var(--white); }

.band--black a:focus-visible,
.band--black .btn:focus-visible { outline-color: var(--yellow); }

/* Split layouts: text beside a visual */

.split {
  display: grid;
  gap: 2.5rem;
}

.split__visual {
  order: -1;
  display: flex;
  flex-direction: column;
}

.split__text { align-self: center; }

/* Hero: the yard sign */

.sign-figure { max-width: 34rem; }

.sign {
  flex: 1;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 14px;
  grid-template-rows: 14px 32px auto 24px auto minmax(40px, 1fr);
  column-gap: 12px;
}

.sign__post {
  grid-row: 1 / -1;
  background: var(--black);
}

.sign__post--l { grid-column: 1; }
.sign__post--r { grid-column: 3; }

.sign__bar {
  grid-column: 1 / -1;
  grid-row: 1;
  background: var(--black);
}

.sign__hang {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  padding-inline: 14%;
}

.sign__hang span {
  display: block;
  width: 4px;
  background: var(--black);
}

.sign__hang--top { grid-row: 2; }
.sign__hang--rider { grid-row: 4; padding-inline: 26%; }

.sign__panel {
  grid-column: 2;
  grid-row: 3;
  background: var(--yellow);
  border: var(--rule) solid var(--black);
  padding: 1rem;
}

.sign__panel h1 { margin: 0; }

.sign__eyebrow {
  margin: 0 0 0.75rem;
  max-width: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--black);
  padding-bottom: 0.4rem;
}

.sign__rider {
  grid-column: 2;
  grid-row: 5;
  margin: 0 12%;
  max-width: none;
  background: var(--white);
  border: var(--rule) solid var(--black);
  padding: 0.35rem 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.sign__ground {
  grid-column: 1 / -1;
  grid-row: 6;
  align-self: end;
  height: var(--rule);
  background: var(--black);
}

.hero__copy .lede { margin-bottom: 0; }

/* Drawings */

.art svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Translator table */

.table-figure { max-width: 50rem; }

.table-wrap {
  overflow-x: auto;
  border: var(--rule) solid var(--black);
  background: var(--white);
}

.glossary {
  width: 100%;
  border-collapse: collapse;
}

.glossary thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.glossary tr, .glossary td { display: block; }

.glossary tr { border-top: 2px solid var(--black); }
.glossary tr:first-child { border-top: 0; }
.glossary tbody tr:nth-child(even) { background: var(--yellow); }

.glossary td { padding: 0.25rem 0.75rem; }
.glossary td:first-child {
  padding-top: 0.9rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.1;
  text-transform: uppercase;
}
.glossary td:last-child { padding-bottom: 0.9rem; }

.band--yellow figcaption { color: var(--black); }

/* Two listings */

.listings-figure { margin-top: 2.5rem; }

.listings {
  display: grid;
  gap: 1.5rem;
}

.card {
  border: var(--rule) solid var(--black);
  background: var(--white);
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.6rem 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.card--old .card__head { background: var(--black); color: var(--white); }
.card--new .card__head { background: var(--yellow); color: var(--black); border-bottom: var(--rule) solid var(--black); }

.card__body { padding: 1rem 0.75rem; }
.card--old .card__body { color: var(--grey); }

.plan { padding: 1rem 0.75rem 0.5rem; }

.plan svg {
  display: block;
  width: 100%;
  height: auto;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.75rem 0.75rem;
}

.facts li {
  padding: 0.5rem 0;
  border-top: 2px solid var(--black);
}

/* The fee */

.fee-figure { max-width: 34rem; }

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 16rem;
  background: var(--yellow);
  border: var(--rule) solid var(--black);
  padding: 1.25rem 1.5rem 1.5rem;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat strong {
  font-weight: 800;
  font-size: clamp(6rem, 32vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
}

/* Showing sheet on the black band */

.sheet-figure { margin-top: 2.5rem; }

.sheet { border: var(--rule) solid var(--white); }

.sheet__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.6rem 1rem;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sheet__items {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: item;
  display: grid;
}

.sheet__items li {
  counter-increment: item;
  padding: 1.1rem 1rem;
  border-top: 2px solid var(--white);
}

.sheet__items li::after { content: ""; display: block; clear: both; }

.sheet__items li::before {
  content: counter(item, decimal-leading-zero);
  float: left;
  min-width: 2.6rem;
  margin: 0.05rem 0.75rem 0.25rem 0;
  background: var(--yellow);
  color: var(--black);
  border: 3px solid var(--black);
  padding: 0.15rem 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
}

/* The town: stat tiles and the departures board */

.tiles {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: var(--rule) solid var(--black);
  padding: 1.5rem 1.25rem;
}

.tile--yellow { background: var(--yellow); }

.tile__big {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 9vw, 3.5rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.tile p { margin: 0; }

.tile--board {
  padding: 0;
  gap: 0;
  background: var(--black);
  color: var(--yellow);
}

.board__head {
  padding: 0.75rem 1.25rem;
  border-bottom: 3px solid var(--yellow);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.board {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem;
}

.board li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--grey);
}

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

.board li span:first-child {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
}

.board li span:last-child {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: right;
}

.board__foot {
  margin: 0;
  padding: 0.85rem 1.25rem;
  border-top: 3px solid var(--yellow);
  color: var(--white);
  font-size: 0.95rem;
}

/* Questions on the yellow band */

.qa {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
}

.qa__item {
  border-top: var(--rule) solid var(--black);
  padding-top: 1rem;
}

.qa dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.qa dd { margin: 0.6rem 0 0; }

/* Final call and the tape */

.cta .pull { margin-top: 0; }

.tape-figure { margin-top: 3.5rem; }

.tape {
  display: block;
  width: 100%;
  height: 64px;
}

/* Footer */

.site-footer {
  border-top: var(--rule) solid var(--black);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  max-width: 24rem;
  color: var(--grey);
}

.footer-col h3 {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--yellow);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--black);
  text-decoration: none;
}

.footer-col a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--black);
  font-size: 0.95rem;
  color: var(--grey);
}

.legal p { margin: 0; }

.legal a {
  display: inline-block;
  padding-block: 13px;
  margin-block: -13px;
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Wider phones and tablets */

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

  body { font-size: 1.0625rem; }

  .lede { font-size: 1.3rem; }

  .site-header__row { gap: 1rem; min-height: 72px; }
  .site-header .btn { font-size: 1.125rem; padding: 0.5rem 1.25rem; }
  .wordmark { font-size: 1.5rem; }
  .wordmark__mark { width: 28px; height: 28px; }

  .glossary thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .glossary tr { display: table-row; border-top: 0; }
  .glossary td { display: table-cell; }

  .glossary th {
    padding: 0.75rem 1rem;
    background: var(--black);
    color: var(--yellow);
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
  }

  .glossary td {
    padding: 0.9rem 1rem;
    vertical-align: top;
    border-top: 2px solid var(--black);
  }

  .glossary td:first-child {
    width: 34%;
    padding-top: 0.9rem;
  }

  .card__body { padding: 1.25rem 1rem; }
  .plan { padding: 1.25rem 1rem 0.5rem; }
  .facts { padding: 0.25rem 1rem 1rem; }

  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--board { grid-row: span 2; }

  .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* Desktop */

@media (min-width: 960px) {
  :root { --gutter: 32px; --pad: 7rem; }

  body { font-size: 1.125rem; }

  h2 { margin-bottom: 2rem; }

  .pull { margin: 3.5rem 0; }

  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
    align-items: stretch;
  }

  .split__visual { order: 0; }
  .hero .split__visual { order: -1; }

  .sign-figure, .fee-figure { max-width: none; }

  .listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
  }

  .sheet__items { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .sheet__items li {
    border-top: 0;
    border-left: 2px solid var(--white);
    padding: 1.5rem 1.25rem;
  }

  .sheet__items li:nth-child(3n + 1) { border-left: 0; }
  .sheet__items li:nth-child(n + 4) { border-top: 2px solid var(--white); }

  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }

  .tape { height: 80px; }
  .tape-figure { margin-top: 5rem; }

  .footer-grid { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}
