@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/Archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ground: #0C0C0D;
  --ground-deep: #17171A;
  --ink: #FFFFFF;
  --line: #C9C7C1;
  --rule: #4B4A47;
  --grid: rgba(255, 255, 255, 0.045);
  --lens: #D8A21E;
  --haze: rgba(216, 162, 30, 0.5);
  --paper: #F4F3EF;
  --paper-ink: #0C0C0D;
  --paper-rule: #BDBBB4;
  --face: "Archivo", Arial, sans-serif;
  --logo-wide: 125%;
  --logo-ink: var(--ink);
  --wide: 125%;
  --page: 72rem;
  --pad: clamp(1.1rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--ground);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 2rem 2rem;
  color: var(--ink);
  font-family: var(--face);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: inherit; }

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

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad);
}

h1, h2 {
  font-stretch: var(--wide);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 2.1rem); }

p { margin: 0 0 1rem; max-width: 38rem; }

/* Preview notice: removed at launch */

.draft {
  margin: 0;
  max-width: none;
  padding: 0.5rem var(--pad);
  background: var(--lens);
  color: var(--ground);
  font-weight: 600;
}

/* Header */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.name {
  font-stretch: var(--wide);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.phone {
  font-weight: 600;
  text-decoration-color: var(--lens);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* First screen: the sentence and the job sheet */

.job {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-top: clamp(1.75rem, 5vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.job-say p {
  margin-top: 1.25rem;
  font-size: 1.15rem;
  color: var(--ink);
}

.sheet {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--line);
  background: var(--ground-deep);
}

.sheet th,
.sheet td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--rule);
}

.sheet th {
  width: 7.5rem;
  font-weight: 400;
  color: var(--line);
  border-right: 1px solid var(--rule);
}

.sheet td { font-weight: 600; }

.sheet .price td { font-size: 1.6rem; font-stretch: var(--wide); font-weight: 700; padding-top: 1rem; padding-bottom: 1rem; }
.sheet .price a, .sheet .price .was { font-size: 1rem; font-stretch: 100%; font-weight: 400; }
.sheet .price .now { color: var(--lens); }
.sheet .price th { box-shadow: inset 6px 0 0 var(--lens); }

.sheet caption {
  caption-side: bottom;
  text-align: left;
  padding: 0.5rem 1rem 0 0;
}

.sheet tr:last-child th,
.sheet tr:last-child td { border-bottom: 0; }

.todo {
  display: inline-block;
  font-weight: 400;
  color: var(--ground);
  background: var(--lens);
  padding: 0 0.4rem;
}

.book {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  color: var(--ground);
  background: var(--lens);
  padding: 0.7rem 1.3rem;
  text-decoration: none;
  border-bottom: 4px solid var(--ink);
}

.book:hover { background: var(--ink); border-bottom-color: var(--lens); }

.ticket .todo { color: var(--paper-ink); }

.book:active {
  transform: translateY(2px);
  border-bottom-width: 0;
  margin-bottom: 4px;
}

/* The hour: the lens drawing */

.hour {
  border-top: 1px solid var(--rule);
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hour p { margin-top: 1rem; }

.drawing {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1.5rem;
}

.drawing .outline { fill: none; stroke: var(--ink); stroke-width: 3; }
.drawing .thin { fill: none; stroke: var(--line); stroke-width: 1.5; }
.drawing .dash { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 6 6; }
.drawing .haze { fill: var(--haze); stroke: none; }
.drawing .ray { fill: none; stroke: var(--lens); stroke-width: 2; }
.drawing .dot { fill: var(--lens); }
.drawing text { fill: var(--ink); font-family: var(--face); font-size: 19px; font-weight: 600; }
.drawing .note { fill: var(--line); font-weight: 400; font-size: 16px; }

.drawing-narrow { display: none; }
.drawing-narrow .note { font-size: 30px; }

.steps {
  display: none;
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.2rem;
}

.steps li { margin-bottom: 0.4rem; }

/* The ticket: prices and booking on paper */

.ticket {
  background: var(--paper);
  color: var(--paper-ink);
}

.ticket .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.prices {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.25rem;
}

.prices th,
.prices td {
  text-align: left;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--paper-rule);
  font-weight: 400;
}

.prices td { text-align: right; font-weight: 700; white-space: nowrap; }

.ticket .note { font-size: 0.95rem; margin-top: 1rem; }

.slot {
  margin-top: 1.25rem;
  border: 2px solid var(--paper-ink);
  padding: 1.25rem;
}

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

.ticket a:focus-visible { outline-color: var(--paper-ink); }

/* Photographs */

.photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: 1rem;
}

.photo {
  margin: 0;
  min-height: 15rem;
  border: 1px dashed var(--line);
  background: var(--ground-deep);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.photo figcaption { color: var(--line); max-width: 24rem; }

.photo.has-img { display: block; padding: 0; border-style: solid; min-height: 0; }
.photo.has-img img { display: block; width: 100%; height: auto; }
.photo.has-img figcaption { padding: 0.7rem 1rem; max-width: none; color: var(--ink); }
.photo .todo { display: table; margin-bottom: 0.4rem; }

/* Reading sections */

.plain {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.plain h2 { margin-bottom: 1rem; }

.towns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  max-width: 44rem;
}

.towns li {
  flex: 1 0 33.333%;
  padding: 0.7rem 1rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
}

.said { margin: 0 0 1.5rem; max-width: 40rem; }
.said p { font-size: 1.2rem; margin-bottom: 0.35rem; }
.said footer { color: var(--line); }

.last {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

.last p { font-size: 1.2rem; max-width: none; }

.small { font-size: 0.95rem; color: var(--line); }

.tel { white-space: nowrap; }

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}

.pair .plain { padding-left: 0; padding-right: 0; }

/* Logo: redrawn from the client's flyer */

.logo { display: block; width: 9.5rem; height: auto; }
.logo text { font-family: var(--face); }
.logo .l-big { font-size: 92px; font-weight: 900; font-stretch: var(--logo-wide); }
.logo .l-mid { font-size: 27px; font-weight: 800; }
.logo .l-small { font-size: 16px; font-weight: 700; }
.logo .l-ink { fill: var(--logo-ink); }
.logo .l-gold { fill: var(--lens); }
.logo .l-rule { fill: none; stroke: var(--lens); stroke-width: 2; }

@media (max-width: 52rem) {
  .job { grid-template-columns: minmax(0, 1fr); }
  .pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .photo { min-height: 9rem; }
  .ticket .wrap { grid-template-columns: minmax(0, 1fr); }
  .photos { grid-template-columns: minmax(0, 1fr); }
  .drawing-wide { display: none; }
  .drawing-narrow { display: block; }
  .steps { display: block; }
  .towns li { flex-basis: 50%; }
  .sheet th { width: 5.5rem; }
  .sheet th, .sheet td { padding: 0.6rem 0.7rem; }
  .sheet .price td { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .book:active { transform: none; }
}
