/* Newark Coworks
   Palette comes from the place itself: the November sky over Broad Street,
   the amber light in the ceiling coves, and plain white walls. */

@font-face {
  font-family: "Besley";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/besley-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/libre-franklin-latin-wght-normal.woff2") format("woff2");
}

:root {
  --blue: #1d43a6;        /* Broad Street sky */
  --night: #0d1b40;       /* evening sky, used for text */
  --amber: #ffb52e;       /* cove lighting */
  --amber-deep: #e89a0c;
  --tint: #eaf0fb;        /* pale sky */
  --white: #ffffff;
  --rule: rgba(13, 27, 64, 0.16);

  --display: "Besley", "Rockwell", "Georgia", serif;
  --text: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --band: clamp(4rem, 9vw, 7.5rem);
}

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

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

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

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

h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 4.6vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }

p { margin: 0 0 1em; max-width: 34em; text-wrap: pretty; }
address { font-style: normal; }
figure { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--amber);
  color: var(--night);
  padding: 0.6rem 1rem;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Buttons and links */

.btn {
  display: inline-block;
  font-family: var(--text);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.95em 1.5em;
  border-radius: 4px;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-small { font-size: 0.95rem; padding: 0.7em 1.1em; }

.btn-amber { background: var(--amber); color: var(--night); }
.btn-amber:hover { background: #ffc452; }

.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: #17378b; }

.btn-night { background: var(--night); color: var(--white); }
.btn-night:hover { background: #1a2c61; }

.btn-ghost { border-color: rgba(255, 255, 255, 0.75); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn-outline { border-color: var(--night); color: var(--night); }
.btn-outline:hover { background: rgba(13, 27, 64, 0.08); }

.link-quiet,
.link-light {
  font-weight: 600;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 2px;
}
.link-quiet { color: var(--white); }
.link-light { color: var(--amber); }

/* Masthead and hero share one blue field */

.top {
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 1.5rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  margin: 0 auto 0 0;
}

.mainnav { display: flex; gap: 2rem; }
.mainnav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}
.mainnav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(2rem, 5vw, 4.5rem);
  padding-bottom: clamp(6rem, 11vw, 9rem);
}

.lede {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  margin-top: 1.5rem;
  max-width: 22em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  margin: 2.25rem 0 0;
}

.hero-visual { position: relative; }

.hero-photo {
  /* the photo runs off the right edge of the screen */
  --bleed: max(var(--gutter), calc((100vw - 78rem) / 2 + var(--gutter)));
  width: calc(100% + var(--bleed));
  max-width: none;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  object-position: 35% 50%;
  border-radius: 6px 0 0 6px;
}

/* The desk pass: the one loud thing on the page */

.pass {
  position: absolute;
  left: clamp(-2.75rem, -3vw, -1rem);
  bottom: clamp(-5.5rem, -6vw, -3.5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  width: min(27rem, 80%);
  color: var(--night);
  font-family: var(--display);
  transform: rotate(-4deg);
  filter: drop-shadow(8px 10px 0 rgba(13, 27, 64, 0.55));
  animation: pass-land 700ms cubic-bezier(0.2, 1.3, 0.4, 1) 250ms both;
}

.pass p { margin: 0; max-width: none; }

.pass-main,
.pass-stub { background: var(--amber); }

.pass-main {
  padding: 1.25rem 1.5rem 1.35rem;
  border-radius: 10px 0 0 10px;
  /* half-circle bites where the stub tears off */
  -webkit-mask: radial-gradient(circle at 100% 0, transparent 9px, #000 9.5px) top right / 100% 51% no-repeat,
                radial-gradient(circle at 100% 100%, transparent 9px, #000 9.5px) bottom right / 100% 51% no-repeat;
          mask: radial-gradient(circle at 100% 0, transparent 9px, #000 9.5px) top right / 100% 51% no-repeat,
                radial-gradient(circle at 100% 100%, transparent 9px, #000 9.5px) bottom right / 100% 51% no-repeat;
}

.pass-stub {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1.35rem 1.4rem;
  border-radius: 0 10px 10px 0;
  border-left: 2px dashed rgba(13, 27, 64, 0.45);
  -webkit-mask: radial-gradient(circle at 0 0, transparent 9px, #000 9.5px) top left / 100% 51% no-repeat,
                radial-gradient(circle at 0 100%, transparent 9px, #000 9.5px) bottom left / 100% 51% no-repeat;
          mask: radial-gradient(circle at 0 0, transparent 9px, #000 9.5px) top left / 100% 51% no-repeat,
                radial-gradient(circle at 0 100%, transparent 9px, #000 9.5px) bottom left / 100% 51% no-repeat;
}

.pass-kind {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.pass-price { line-height: 1; white-space: nowrap; }
.pass-kind + .pass-price { margin-top: 0.35rem; }
.pass-amount {
  font-weight: 900;
  font-size: clamp(3.2rem, 5.2vw, 4.25rem);
  letter-spacing: -0.03em;
}
.pass-per { font-weight: 600; font-size: 1.15rem; }

.pass-facts {
  margin: 0.9rem 0 0;
  font-family: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
}
.pass-facts div { display: flex; gap: 0.75rem; }
.pass-facts div + div { margin-top: 0.2rem; }
.pass-facts dt { width: 3.2rem; flex: none; opacity: 0.7; }
.pass-facts dd { margin: 0; font-weight: 600; }

.pass-issuer {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
  width: 5.2rem;
}
.pass-where {
  white-space: nowrap;
  font-family: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.35;
}

@keyframes pass-land {
  from { opacity: 0; transform: translateY(-2.5rem) rotate(-11deg); }
  to   { opacity: 1; transform: translateY(0) rotate(-4deg); }
}

@keyframes pass-land-small {
  from { opacity: 0; transform: translateY(-2rem) rotate(-9deg); }
  to   { opacity: 1; transform: translateY(0) rotate(-3deg); }
}

/* Bands */

.band { padding-block: var(--band); }
.band-tint { background: var(--tint); }
.band-night { background: var(--night); color: var(--white); }
.band-amber { background: var(--amber); }
.band-blue { background: var(--blue); color: var(--white); }

.band-amber :focus-visible { outline-color: var(--night); }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.intro p { margin: 0; font-size: 1.2rem; }

/* Gallery: rows of photos that share one height */

.gallery { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); }

.gallery-row {
  display: flex;
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: flex-start;
}
.gallery-row figure { flex: var(--ratio) 1 0; min-width: 0; }

.gallery img,
.hosts img,
.place-photo img { width: 100%; border-radius: 6px; }

figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 32em;
  opacity: 0.82;
}

/* What the price covers */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.split-head { position: sticky; top: 2.5rem; }
.split-head p { margin: 1.5rem 0 0; }
.split-head .price-line {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.3;
}
.split-head .fine { margin-top: 0.9rem; }

.fine {
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0.8;
  max-width: 26em;
}

.covers { margin: 0; border-top: 2px solid var(--night); }
.covers div {
  padding: 1.4rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.covers dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.2;
}
.covers dd { margin: 0.4rem 0 0; max-width: 32em; }

/* Scholarship */

.callout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}
.callout-lede {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.3;
  margin: 0 0 1.75rem;
  max-width: 22em;
}
.callout .fine { margin: 1rem 0 0; }

/* Getting here */

.place {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.place-address {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.35;
  margin: 1.75rem 0 0.6rem;
}

.routes {
  margin: 2.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}
.routes div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}
.routes dt { font-family: var(--display); font-weight: 700; }
.routes dd { margin: 0; max-width: 30em; }

/* Hosts */

.hosts-copy p { margin: 1.5rem 0 0; }

/* Book a tour */

.tour h2 { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 14em; }
.tour-lede { font-size: 1.25rem; margin: 1.5rem 0 0; }
.tour-lede a { font-weight: 600; text-underline-offset: 0.2em; }
.tour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}
.tour-plain {
  margin: 1.5rem 0 0;
  font-size: 1rem;
  font-weight: 500;
  max-width: none;
}

/* Footer */

.foot {
  background: var(--night);
  color: var(--white);
  padding-block: 3.5rem;
  font-size: 1rem;
}
.foot p { margin: 0; }
.foot a { text-underline-offset: 0.2em; }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 2rem 3rem;
}
.foot .wordmark-foot { margin-bottom: 0.25rem; }
.foot-legal { grid-column: 1 / -1; opacity: 0.65; font-size: 0.9rem; }

/* Narrow screens */

@media (max-width: 899px) {
  .mainnav { display: none; }

  .hero,
  .intro,
  .split,
  .callout,
  .place { grid-template-columns: minmax(0, 1fr); }

  .masthead { gap: 1rem; }

  .hero { padding-bottom: 4rem; }
  .hero-photo { width: 100%; aspect-ratio: 5 / 3; border-radius: 6px; }

  /* the pass sits under the photo, overlapping its bottom edge */
  .pass {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(25rem, 96%);
    margin: -2.75rem auto 0;
    transform: rotate(-3deg);
    animation-name: pass-land-small;
  }

  .split-head { position: static; }

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

@media (max-width: 759px) {
  .gallery-row { flex-direction: column; }
  .gallery-row figure { flex: none; width: 100%; }
  /* portrait photos get a square crop so they don't fill the whole screen */
  .gallery-row .tall img { aspect-ratio: 1; object-fit: cover; object-position: var(--focus, center); }
  .routes div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

@media (max-width: 420px) {
  body { font-size: 1.0625rem; }
  .wordmark { font-size: 1.2rem; }
  .pass-main { padding: 1rem 1rem 1.1rem 1.1rem; }
  .pass-stub { padding: 1rem 0.85rem 1.1rem 0.95rem; }
  .pass-facts { font-size: 0.8rem; }
  .pass-facts dt { width: 2.6rem; }
  .pass-issuer { font-size: 0.85rem; width: 4.6rem; }
  .pass-where { font-size: 0.76rem; }
}

@media (max-width: 360px) {
  .wordmark { font-size: 1.05rem; }
  .btn-small { font-size: 0.85rem; padding: 0.6em 0.8em; }
  .pass-amount { font-size: 2.9rem; }
  .pass-per { display: block; margin-top: 0.3rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pass { animation: none; }
  .btn { transition: none; }
}
