/* Tray Table Studio, the public lookbook. The studio app's "Passport Stamps"
   look, adapted for customers: her cutting mat, stamp inks, luggage tags and
   boarding-pass stubs, with the photos doing the talking. No web fonts (fast on
   a phone, nothing fetched from anyone else) and no JavaScript. */

:root {
  --paper: #f6f2ea;
  --card: #ffffff;
  --ink: #1b2b4f;
  --muted: #5b6478;
  --line: #e2dbcd;
  --well: #eae3d4;
  --tag: #f1e6cf;
  --mat: #e4eef4;
  --mat-grid: rgb(27 43 79 / 0.07);
  --mat-grid-strong: rgb(27 43 79 / 0.12);
  --ink-navy: #1b2b4f;
  --ink-pink: #b0126a;
  --ink-red: #b3202f;
  --ink-grey: #5f5a52;
  --accent: #c8283a;
  --focus: #afd6ee;
  --button-bg: #1b2b4f;
  --button-fg: #ffffff;
  --navy: #1b2b4f;
  --sky: #afd6ee;
  --pink: #ff2e93;
  --red: #c8283a;
  --beige: #ebddc3;
  --display: "Bricolage Grotesque", ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1832;
    --card: #1b2b4f;
    --ink: #f6f2ea;
    --muted: #afc3d9;
    --line: #2d4069;
    --well: #16223f;
    --tag: #2a3a5f;
    --mat: #13213f;
    --mat-grid: rgb(175 214 238 / 0.07);
    --mat-grid-strong: rgb(175 214 238 / 0.13);
    --ink-navy: #afd6ee;
    --ink-pink: #ff7ab8;
    --ink-red: #ff6b7a;
    --ink-grey: #c9c3b8;
    --accent: #ff7ab8;
    --button-bg: #afd6ee;
    --button-fg: #1b2b4f;
    color-scheme: dark;
  }
}

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

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

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

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

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(30px, 7vw, 48px);
}

h2 {
  font-size: clamp(22px, 4.5vw, 30px);
  margin-top: 1.6em;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 1em;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--button-bg);
  color: var(--button-fg);
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 10;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

/* Ticket typography: the small mono caps used on stubs and labels. */
.ticket {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5em;
}

.small {
  font-size: 14px;
  color: var(--muted);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.empty {
  padding: 20px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}

/* Her cutting mat: a fine grid with a stronger line every fifth square. */
.mat {
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-grid) 1px, transparent 1px),
    linear-gradient(var(--mat-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-grid-strong) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 80px 80px, 80px 80px;
}

/* ---------------------------------------------------------------- frame */

.site-head,
main,
.site-foot {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 12px;
}

/* The logo's lettering is navy, so it always sits on paper, like a sticker. */
.brand {
  display: inline-block;
  background: #f6f2ea;
  border-radius: 14px;
  padding: 6px 10px;
}

.brand img {
  width: 180px;
  height: auto;
}

.site-head ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.site-head nav a[aria-current="page"] {
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

main {
  padding-bottom: 48px;
  outline: none;
}

.site-foot {
  border-top: 2px dashed var(--line);
  padding-top: 24px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------------------------------------------------------------- home */

.hero {
  border-radius: 20px;
  padding: 28px 20px;
  margin-top: 8px;
}

.hero h1 {
  max-width: 14em;
}

.lede {
  font-size: 19px;
  max-width: 34em;
}

.next-market {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  background: var(--card);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0;
  font-weight: 700;
}

.next-market .ticket {
  margin: 0;
  color: var(--accent);
}

.cta {
  margin-top: 40px;
  background: var(--card);
  border-radius: 20px;
  padding: 8px 20px 20px;
  border-left: 10px solid var(--red);
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--button-bg);
  color: var(--button-fg);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover {
  color: var(--button-fg);
  filter: brightness(1.15);
}

/* ---------------------------------------------------------------- passport stamps */

.stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 14px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 4.5px currentColor;
  background: var(--card);
  text-decoration: none;
  text-align: center;
  line-height: 1.05;
  padding: 8px;
}

.stamp:hover {
  color: inherit;
  filter: saturate(1.4);
}

.stamp-code {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.stamp-name {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
  max-width: 76px;
  overflow-wrap: anywhere;
}

.stamps.small .stamp {
  width: 76px;
  height: 76px;
}

.stamps.small .stamp-code {
  font-size: 18px;
}

.stamps.small .stamp-name {
  font-size: 9px;
  max-width: 60px;
}

.stamp.big {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  transform: rotate(-8deg);
}

.stamp.big .stamp-code {
  font-size: 24px;
}

.tilt-0 { transform: rotate(-8deg); }
.tilt-1 { transform: rotate(6deg); }
.tilt-2 { transform: rotate(-4deg); }
.tilt-3 { transform: rotate(9deg); }
.tilt-4 { transform: rotate(-6deg); }
.tilt-5 { transform: rotate(4deg); }

/* Stamp inks: readable on card and paper in both themes. */
.stamp.tone-red { color: var(--ink-red); }
.stamp.tone-navy,
.stamp.tone-sky { color: var(--ink-navy); }
.stamp.tone-pink { color: var(--ink-pink); }
.stamp.tone-beige { color: var(--ink-grey); }

/* Code chips, as on the studio's cards: each pair passes 4.5:1. */
.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 5px;
}

.chip.tone-red { background: var(--red); color: #fff; }
.chip.tone-navy { background: var(--navy); color: #fff; }
.chip.tone-pink { background: #8e1550; color: #fff; }
.chip.tone-sky { background: var(--sky); color: var(--navy); }
.chip.tone-beige { background: var(--beige); color: var(--navy); }

@media (prefers-color-scheme: dark) {
  .chip.tone-navy { background: var(--sky); color: var(--navy); }
}

/* ---------------------------------------------------------------- pieces as luggage tags */

.pieces {
  display: grid;
  /* Two across on a phone, like a page of a lookbook. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.piece a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 8px 20px rgb(27 43 79 / 0.07);
  transition: transform 160ms ease-out;
}

.piece a:hover {
  color: inherit;
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .piece a { transition: none; }
  .piece a:hover { transform: none; }
}

.piece-photo {
  display: block;
  aspect-ratio: 1;
  background: var(--well);
}

.piece-photo img,
.piece-photo .no-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.piece-tag {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px 14px 32px;
  border-top: 2px dashed var(--line);
  flex-grow: 1;
}

.piece-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.piece-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.piece-meta .ticket {
  margin: 0 4px 0 0;
}

/* A punched hole, as on a luggage tag. */
.punch {
  position: absolute;
  left: 11px;
  top: 19px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--well);
  color: var(--muted);
}

.no-photo span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  max-width: 85%;
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 6px 8px;
}

/* ---------------------------------------------------------------- page heads and crumbs */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  font-size: 15px;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
}

.crumbs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.crumbs li[aria-current] {
  display: inline-flex;
  align-items: center;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 12px 0 20px;
}

.page-head h1 {
  margin-bottom: 0.15em;
}

.page-head p:last-child {
  margin: 0;
  color: var(--muted);
}

/* ---------------------------------------------------------------- product */

.product {
  display: grid;
  gap: 24px;
}

.gallery-main {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--well);
  border: 6px solid #fff;
  box-shadow: 0 8px 24px rgb(27 43 79 / 0.12);
}

.gallery-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.gallery-more img {
  border-radius: 12px;
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

.product-text h1 {
  margin-bottom: 0.3em;
}

.story {
  font-size: 18px;
  max-width: 36em;
  margin-top: 12px;
}

/* A boarding-pass stub with a perforated edge. */
.boarding {
  position: relative;
  margin-top: 20px;
  background: var(--tag);
  border-radius: 14px;
  padding: 16px 16px 16px 40px;
  border-left: 3px dashed var(--line);
}

.boarding p {
  margin: 0;
}

.boarding .punch {
  top: 22px;
}

@media (min-width: 860px) {
  .product {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
    gap: 40px;
  }
}

/* ---------------------------------------------------------------- markets */

.tickets {
  display: grid;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 720px;
}

.ticket-row {
  display: flex;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 8px 20px rgb(27 43 79 / 0.06);
}

.ticket-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 14px 8px;
  background: var(--navy);
  color: #fff;
  border-right: 3px dashed var(--paper);
}

.ticket-date .ticket {
  color: #afd6ee;
  margin: 0;
}

.ticket-date strong {
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
}

.ticket-body {
  padding: 14px 16px;
  min-width: 0;
}

.ticket-body h3 {
  margin: 0 0 2px;
}

.ticket-when {
  color: var(--muted);
  margin: 0 0 6px;
}
.ticket-where {
  margin: 0 0 6px;
  font-weight: 600;
}

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

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

.prose {
  max-width: 38em;
  font-size: 18px;
}

.prose ul {
  padding-left: 1.2em;
}

.note {
  margin: 0 0 1.5em;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px dashed var(--accent);
  background: var(--card);
  font-size: 16px;
}

.note p {
  margin: 0;
}

/* ---------------------------------------------------------------- forms */

form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.field {
  display: grid;
  gap: 6px;
}

label,
legend {
  font-weight: 700;
  font-size: 16px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--ink);
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

legend {
  margin-bottom: 8px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check input {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--navy);
}

.check label {
  font-weight: 400;
}

.kinds .check label strong {
  display: inline;
}

.kinds .check label span:not(.optional) {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

.kinds .check {
  background: var(--card);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.kinds .check.secondary {
  background: transparent;
  box-shadow: none;
  border: 1.5px dashed var(--line);
}

/* The honeypot: hidden from people, there for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

form .small {
  margin: 0;
}

.signup {
  background: var(--card);
  border-radius: 20px;
  padding: 4px 20px 20px;
  margin-bottom: 20px;
}

.signup h2 {
  margin-top: 0.8em;
}

/* ---------------------------------------------------------------- thanks and 404 */

.thanks {
  border-radius: 20px;
  padding: 32px 20px;
  margin-top: 8px;
  text-align: center;
  display: grid;
  justify-items: center;
}

.thanks .stamp {
  margin-bottom: 16px;
}

.thanks p {
  max-width: 30em;
}

@media (min-width: 720px) {
  body {
    font-size: 18px;
  }

  .site-head,
  main,
  .site-foot {
    padding-left: 32px;
    padding-right: 32px;
  }

  .brand img {
    width: 220px;
  }

  .pieces {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .piece-name {
    font-size: 19px;
  }

  .hero {
    padding: 48px 44px;
  }

  .signup {
    padding: 8px 32px 28px;
  }
}

@media print {
  .site-head nav,
  .signup,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
