:root {
  --night: #131211;
  --night-2: #1d1b19;
  --sheet: #f0ece4;
  --ink: #161514;
  --ink-soft: #55514b;
  --red: #e2462f;
  --rule: #c9c3b8;
  --display: "Gloock", "Bodoni 72", Didot, Georgia, serif;
  --text: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }

.wrap { width: min(1180px, 100% - 48px); margin: 0 auto; }

/* Top bar */
.top { background: var(--night); color: var(--sheet); border-bottom: 1px solid #2b2926; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.wordmark { font: 400 26px/1 var(--display); text-decoration: none; letter-spacing: -.01em; }
.wordmark span { color: var(--red); }
.top-nav { display: flex; align-items: center; gap: 26px; font: 700 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.top-nav a { text-decoration: none; opacity: .82; }
.top-nav a:hover, .top-nav a:focus-visible { opacity: 1; color: #fff; }
.top-nav .gh { opacity: 1; border: 1px solid #4a4741; padding: 8px 12px; border-radius: 2px; }

/* Hero: menus laid on a dark table */
.hero {
  background:
    radial-gradient(80% 60% at 50% 100%, #2a2621 0%, rgba(19, 18, 17, 0) 70%),
    var(--night);
  color: var(--sheet);
  padding: 64px 0 40px;
  overflow: hidden;
}
.ticket-line { display: flex; align-items: baseline; gap: 12px; font: 400 14px/1 var(--mono); color: #a8a296; max-width: 560px; margin-bottom: 28px; }
.dots { flex: 1; border-bottom: 2px dotted currentColor; opacity: .5; transform: translateY(-3px); min-width: 24px; }
.hero h1 {
  font: 400 clamp(36px, 4.9vw, 70px)/1.02 var(--display);
  letter-spacing: -.015em;
  max-width: 16.5em;
  text-wrap: balance;
}
.lede { max-width: 600px; margin-top: 24px; font-size: 19px; color: #cfc9bd; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block; padding: 14px 22px; background: var(--red); color: #fff;
  font: 700 14px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none; border-radius: 2px;
}
.btn:hover, .btn:focus-visible { background: #f05a42; }
.btn-ghost { background: transparent; border: 1px solid #5b574f; color: var(--sheet); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: #2a2825; }

.table { position: relative; height: 640px; width: min(1180px, 100%); margin: 56px auto 0; }
.shot, .phone { position: absolute; display: block; transition: transform .35s ease; }
.shot img, .phone img { width: 100%; }
.shot { width: 360px; box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4); }
.shot-a { left: calc(50% - 560px); top: 70px; transform: rotate(-7deg); }
.shot-b { left: calc(50% - 220px); top: 0; transform: rotate(1.5deg); z-index: 2; }
.shot-c { left: calc(50% + 150px); top: 80px; transform: rotate(6deg); }
.phone {
  width: 220px; left: calc(50% + 330px); top: 230px; z-index: 3;
  border: 9px solid #050505; border-radius: 34px; overflow: hidden; background: #050505;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 0 1px #3a3833;
  height: 440px;
}
.phone img { object-fit: cover; object-position: top; height: 100%; }
.shot:hover, .shot:focus-visible { transform: rotate(0deg) translateY(-8px); z-index: 4; }
.caption { margin-top: 28px; font: 400 14px/1.4 var(--mono); color: #9b958a; text-align: center; text-wrap: balance; }

/* Section shared */
section h2 { font: 400 clamp(34px, 4vw, 52px)/1.05 var(--display); letter-spacing: -.01em; }
.section-lede { margin-top: 12px; max-width: 620px; color: var(--ink-soft); font-size: 18px; }

/* How it works: an order ticket */
.how { padding: 96px 0; }
.steps { margin-top: 40px; border-top: 2px solid var(--ink); }
.steps li { padding: 26px 0 28px; border-bottom: 1px dashed var(--rule); }
.step-head { display: flex; align-items: baseline; gap: 16px; }
.num { font: 400 44px/1 var(--display); color: var(--red); width: 44px; flex: none; }
.step-head h3 { font: 600 clamp(20px, 2.2vw, 26px)/1.2 var(--text); letter-spacing: -.01em; }
.step-head .dots { color: var(--ink); opacity: .35; }
.price { font: 700 15px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.steps p { margin: 10px 0 0 60px; max-width: 640px; color: var(--ink-soft); }
.facts { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.facts li { padding: 16px 20px 18px 0; font-size: 15px; color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
.facts li::before { content: "✓"; color: var(--red); font-weight: 700; margin-right: 8px; }

/* Install */
.install { background: var(--night-2); color: var(--sheet); padding: 88px 0; }
.install-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
.install p { color: #cfc9bd; margin-top: 14px; max-width: 420px; }
.codes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.code { min-width: 0; position: relative; background: #0d0c0b; border: 1px solid #34312c; border-radius: 3px; padding: 18px 20px; }
.code .code-label { margin: 0 0 10px; font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: #9b958a; }
.code pre { margin: 0; overflow-x: auto; }
.code code { font: 400 16px/1.6 var(--mono); color: #f4efe6; }
.copy {
  position: absolute; top: 12px; right: 12px; font: 700 11px/1 var(--mono); text-transform: uppercase;
  letter-spacing: .08em; padding: 7px 10px; background: transparent; color: #cfc9bd;
  border: 1px solid #45423c; border-radius: 2px; cursor: pointer;
}
.copy:hover, .copy:focus-visible { color: #fff; border-color: #8a857b; }

/* Themes */
.themes { padding: 96px 0 72px; }
.theme-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.theme-grid img { box-shadow: 0 14px 28px rgba(22, 21, 20, .18), 0 1px 3px rgba(22, 21, 20, .2); transition: transform .25s ease; }
.theme-grid a:hover img, .theme-grid a:focus-visible img { transform: translateY(-6px); }
.theme-grid figcaption { margin-top: 16px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.theme-grid figcaption b { display: block; font: 400 24px/1.1 var(--display); color: var(--ink); margin-bottom: 4px; }

/* Examples */
.examples { padding: 72px 0 104px; border-top: 2px solid var(--ink); }
.example-list { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 40px; }
.example-list li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: start; padding: 22px 0; border-bottom: 1px dashed var(--rule); }
.example-list img { box-shadow: 0 6px 16px rgba(22, 21, 20, .2); }
.example-list h3 { font: 400 24px/1.15 var(--display); }
.example-list p { margin-top: 6px; font-size: 15px; color: var(--ink-soft); }
.links { display: flex; gap: 10px; margin-top: 12px !important; }
.links a {
  font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; text-decoration: none;
  color: var(--ink); border: 1px solid var(--ink); padding: 8px 11px; border-radius: 2px;
}
.links a:hover, .links a:focus-visible { background: var(--ink); color: var(--sheet); }

/* Footer */
.foot { background: var(--night); color: #cfc9bd; padding: 44px 0 52px; }
.foot-row { display: grid; grid-template-columns: auto 1fr 1fr; gap: 32px; align-items: baseline; font-size: 15px; }
.foot .wordmark { color: var(--sheet); }
.foot a { color: #fff; text-underline-offset: 3px; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

@media (max-width: 1100px) {
  .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .table { height: 560px; }
  .shot { width: 300px; }
  .shot-a { left: calc(50% - 450px); }
  .shot-b { left: calc(50% - 170px); }
  .shot-c { left: calc(50% + 120px); }
  .phone { left: calc(50% + 230px); width: 190px; height: 380px; top: 210px; }
}

/* Tablet: keep every menu on the table inside the viewport. */
@media (max-width: 960px) {
  .table { height: 500px; }
  .shot { width: 260px; }
  .shot-a { left: calc(50% - 330px); top: 50px; }
  .shot-b { left: calc(50% - 140px); top: 0; }
  .shot-c { display: none; }
  .phone { left: calc(50% + 160px); width: 170px; height: 340px; top: 150px; }
  .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 36px); }
  .top-nav a:not(.gh) { display: none; }
  .hero { padding: 44px 0 28px; }
  .lede { font-size: 17px; }
  .table { height: 400px; margin-top: 40px; }
  .shot { width: 190px; }
  .shot-a { left: calc(50% - 190px); top: 40px; }
  .shot-b { left: calc(50% - 90px); top: 0; }
  .shot-c { display: none; }
  .phone { width: 130px; height: 262px; left: calc(50% + 50px); top: 120px; border-width: 6px; border-radius: 22px; }
  .how, .themes { padding: 64px 0; }
  .steps p { margin-left: 0; }
  .num { font-size: 34px; width: 30px; }
  .step-head .dots, .step-head .price { display: none; }
  .install { padding: 64px 0; }
  .install-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .code { padding: 16px 14px; }
  .code code { font-size: 12.5px; }
  .code .code-label { padding-right: 64px; line-height: 1.3; }
  .code-ask code { white-space: pre-wrap; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .example-list { grid-template-columns: 1fr; }
  .example-list li { grid-template-columns: 88px 1fr; gap: 16px; }
  .foot-row { grid-template-columns: 1fr; gap: 12px; }
}

/* 404 page */
.page-404 { display: flex; flex-direction: column; min-height: 100vh; background: var(--night); }
.page-404 main { flex: 1; }
.lost { padding: 96px 0 120px; }
.lost .ticket-line { color: #a8a296; }
.lost h1 { font: 400 clamp(40px, 6vw, 76px)/1.02 var(--display); letter-spacing: -.015em; max-width: 12em; text-wrap: balance; }
.lost .lede { max-width: 520px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot, .phone, .theme-grid img { transition: none; }
}
