/* book.omarali.xyz. Tokens from brand.omarali.xyz/assets/brand.css. Light only, square corners, pills and dots are the
   only round things, one poppy pill per screen, the lift shadow and no other. */

@font-face { font-family: "Archivo"; src: url("fonts/Archivo-wdth.woff2") format("woff2"); font-weight: 400; font-stretch: 100% 125%; font-style: normal; font-display: block; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-wght.woff2") format("woff2"); font-weight: 400 500; font-stretch: 100%; font-style: normal; font-display: swap; }

:root {
  --paper: #f6f6f2; --white: #fff; --ink: #17171b; --ink-soft: #4a4a52;
  --poppy: #ef4a24; --poppy-fill: #d63a12; --poppy-text: #b02a10;
  --sky: #cfe3f4; --blush: #f9d6dd; --lilac: #dcd6f7;
  --rule: rgba(23, 23, 27, .2);
  --lift: 3px 4px 0 rgba(23, 23, 27, .12);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gap: 11px; --ease: cubic-bezier(.19, 1, .22, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--text); font-synthesis: none; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p { margin: 0; max-width: 60ch; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.soft { color: var(--ink-soft); }

.d { font-family: var(--display); font-stretch: 125%; font-weight: 400; text-transform: uppercase; letter-spacing: -.035em; line-height: .9; margin: 0; }
.stop { display: inline-block; width: .19em; height: .19em; margin-left: .05em; border-radius: 50%; background: var(--poppy); vertical-align: baseline; }
.label { font-size: 15px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }

/* page */
.page { max-width: 1080px; margin: 0 auto; padding: 0 16px 40px; }
.bar { display: flex; align-items: center; height: 84px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .name { font-size: 26px; white-space: nowrap; }
.brand .sign { width: 40px; height: 40px; }
.sign { display: block; flex: none; overflow: visible; }
.sign .p { transform-box: fill-box; transform-origin: center; transition: transform .6s var(--ease); }
.brand:hover .sign .p { transform: scale(1.25); }

.hero { padding: 56px 0 8px; }
main > .hero, main > .panels, main > .notice { max-width: 720px; }
.h1 { font-size: clamp(2.3rem, 9.5vw, 4.4rem); line-height: .88; margin-left: -.04em; text-wrap: balance; overflow-wrap: anywhere; }
.lead { font-size: clamp(1.15rem, 3.4vw, 1.4rem); line-height: 1.3; max-width: 40ch; margin-top: 22px; text-wrap: balance; }
.hero > p:not(.lead) { margin-top: 12px; }
.hero > p:last-child .pill { margin-top: 6px; }

/* buttons */
.pill { --c: var(--ink); --on: var(--paper); display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .4em 1.5em .36em; border: 1px solid var(--c); border-radius: 999px; background: transparent; color: var(--c); font-size: 15px; line-height: 1.1; text-decoration: none; cursor: pointer; transition: background-color .35s var(--ease), color .35s var(--ease); }
.pill:hover { background: var(--c); color: var(--on); }
.pill--poppy { --c: var(--poppy-fill); --on: var(--white); background: var(--c); color: var(--on); }
.pill--poppy:hover { background: transparent; color: var(--c); }

/* home: three panels */
.panels { display: grid; gap: var(--gap); margin-top: 44px; }
.panel { display: grid; justify-items: start; align-content: start; gap: 12px; padding: 24px 22px 22px; color: var(--ink); box-shadow: var(--lift); }
.panel--sky { background: var(--sky); }
.panel--blush { background: var(--blush); }
.panel--lilac { background: var(--lilac); }
.panel .h2 { font-size: 1.5rem; line-height: .95; }
.panel p:not(.label) { max-width: 44ch; }
.panel .pill { margin-top: 8px; }

/* type page */
.type-hero .h1 { font-size: clamp(2.3rem, 11vw, 4.4rem); }
.hero .what { font-size: clamp(1.15rem, 3.4vw, 1.45rem); line-height: 1.3; max-width: 46ch; margin-top: 24px; text-wrap: pretty; }
.hero .what + .lead { margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--ink-soft); max-width: 56ch; text-wrap: pretty; }
.swap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; margin-top: 26px; }
.swap .label { margin-right: 6px; color: var(--ink-soft); font-size: 13px; }
.swap .pill { min-height: 38px; padding-inline: 1.15em; }
.form { margin-top: 44px; display: grid; gap: 0; align-items: start; }
.pick { display: grid; gap: 14px; min-width: 0; }
.tz { color: var(--ink-soft); font-size: 15px; }
.notice { max-width: none; padding: 12px 14px; background: var(--white); border: 1px solid var(--ink); }
.err { color: var(--poppy-text); font-size: 15px; }
.cap { min-height: 1.5em; font-size: 15px; }
.form--picker .cap:empty { display: none; }
.form--picker .tz { order: 5; font-size: 14px; }
.form--picker .notice, .form--picker .err { order: -2; }
.form--picker .days { order: -1; }
.form--picker .cap { order: 4; color: var(--poppy-text); }

/* the full list: what no-JS visitors use, and the real inputs behind the picker */
.days { display: grid; gap: 22px; margin: 6px 0 0; }
.form--picker .day:not(.day--alt) { display: none; }
.form--picker .days { margin: 0; gap: 0; border: 0; }
.day { min-width: 0; margin: 0; padding: 0; border: 0; }
.day legend { padding: 0 0 8px; margin-bottom: 10px; width: 100%; border-bottom: 1px solid var(--ink); }
.day--alt legend { color: var(--poppy-text); border-bottom-color: var(--poppy-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip label { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; min-width: 76px; justify-content: center; padding: 0 14px; border: 1px solid var(--ink); border-radius: 0; background: transparent; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease); }
.chip:hover label { background: rgba(23, 23, 27, .07); }
.chip input:checked + label { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + label { outline: 2px solid var(--poppy-fill); outline-offset: 3px; }
.chip-day { font-size: 13px; letter-spacing: .03em; text-transform: uppercase; opacity: .8; }

/* the week picker (book.js builds it) */
.picker { display: grid; gap: 14px; min-width: 0; }
.wk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.wk-label { font-size: 15px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }
.wk-arrows { display: flex; gap: 8px; }
.wk-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease); }
.wk-arrow:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.wk-arrow:disabled { border-color: var(--rule); color: rgba(23, 23, 27, .3); cursor: default; }
.wk-arrow:focus-visible { outline: 2px solid var(--poppy-fill); outline-offset: 3px; }

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(68px, 1fr); gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 5px 6px 2px; margin: -2px -5px -6px -2px; }
.strip::-webkit-scrollbar { display: none; }
.dt { position: relative; display: grid; justify-items: start; gap: 2px; padding: 12px 12px 11px; border: 1px solid var(--rule); border-radius: 0; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; scroll-snap-align: start; transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.dt:hover { border-color: var(--ink); }
.dt[aria-selected="true"] { background: var(--blush); border-color: var(--ink); box-shadow: var(--lift); }
.dt:focus-visible { outline: 2px solid var(--poppy-fill); outline-offset: 3px; }
.dt-wd { font-size: 13px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }
.dt-num { font-family: var(--display); font-stretch: 125%; font-size: 2.15rem; line-height: 1; letter-spacing: -.035em; margin: 4px 0 2px -.04em; font-variant-numeric: tabular-nums; }
.dt-count { font-size: 13px; line-height: 1.2; color: var(--ink-soft); white-space: nowrap; }
.dt-mark { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--poppy); transform: scale(0); transition: transform .45s var(--ease); }
.dt--picked .dt-mark { transform: scale(1); }
.dt--none { background: transparent; border-style: dashed; cursor: default; }
.dt--none:hover { border-color: var(--rule); }
.dt--none .dt-wd, .dt--none .dt-num, .dt--none .dt-count { color: rgba(23, 23, 27, .38); }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 8px; }
.times--in { animation: times-in .45s var(--ease) both; }
@keyframes times-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tm { min-height: 48px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 0; background: var(--white); color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease); }
.tm:hover { background: var(--sky); }
.tm[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tm:focus-visible { outline: 2px solid var(--poppy-fill); outline-offset: 3px; }

/* the side: summary and the short form, on a sky panel */
.side, .send { background: var(--sky); box-shadow: var(--lift); }
.side { display: grid; gap: 20px; padding: 24px 22px 6px; margin-top: 36px; }
.summary { display: flex; align-items: baseline; gap: 10px; font-size: 1.15rem; line-height: 1.35; text-wrap: balance; color: var(--ink-soft); padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.summary::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink-soft); transform: translateY(-1px); }
.summary--set { color: var(--ink); }
.sum-when { display: block; font-weight: 500; }
.sum-rest { display: block; font-size: 15px; color: var(--ink-soft); }
.summary--set::before { background: var(--poppy); border-color: var(--poppy); }
.fields, .field-pair { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }
.field input, .field textarea { display: block; width: 100%; padding: 11px 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--white); font-size: 17px; line-height: 1.35; }
.field textarea { resize: vertical; min-height: 3.4em; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--poppy-fill); outline-offset: 2px; }
.hp { display: none; }
.send { padding: 18px 22px 22px; }
.send .pill { width: 100%; min-height: 50px; font-size: 16px; }

.foot { display: flex; align-items: center; gap: 14px; margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-soft); }
.foot .oa { flex: none; color: var(--ink); }
.foot a { margin-left: auto; }

@media (min-width: 640px) {
  /* no-JS list: a day is one row, its heading on the left, its times beside it */
  .days { gap: 0; border-top: 1px solid var(--ink); }
  .day { display: flow-root; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .day legend { float: left; width: 6.5rem; padding: 0; margin: 0; border: 0; line-height: 44px; }
  .day > .chips { margin-left: calc(6.5rem + 12px); }
  .day--alt legend { width: 100%; float: none; display: block; margin-bottom: 8px; line-height: 1.2; }
  .day--alt > .chips { margin-left: 0; }
  .form--picker .days { border: 0; }
  .panels { margin-top: 56px; }
  .panel { padding: 28px 28px 26px; }
  .panel .h2 { font-size: 1.75rem; }
  .hero { padding-top: 80px; }
  .side { padding: 28px 28px 8px; }
  .send { padding: 20px 28px 28px; }
  .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (min-width: 900px) {
  .form:has(.side) { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); column-gap: 56px; }
  .form:has(.side) { grid-template-rows: auto auto 1fr; }
  .pick { grid-column: 1; grid-row: 1 / span 3; }
  .side { grid-column: 2; grid-row: 1; margin-top: 0; }
  .send { grid-column: 2; grid-row: 2; }
  .top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); grid-template-rows: auto auto auto 1fr; column-gap: 56px; align-items: start; }
  .top .type-hero { display: contents; }
  .top .h1 { grid-column: 1 / -1; padding-top: 44px; }
  .top .what, .top .lead { grid-column: 1; }
  .top .swap { grid-column: 2; grid-row: 2 / span 3; display: grid; justify-items: start; gap: 10px; margin: 24px 0 0; padding: 4px 0 4px 22px; border-left: 1px solid var(--rule); }
  .top .swap .label { margin: 0 0 2px; }
  .type-hero .h1 { font-size: clamp(3.6rem, 6vw, 5.2rem); }
  .type-hero .what { margin-top: 20px; }
  .form { margin-top: 36px; }
  .field-pair { grid-template-columns: 1fr; gap: 16px; }
  main > .panels { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel { grid-template-rows: auto auto 1fr auto; }
}
@media (max-width: 639px) {
  /* once a time is chosen the single poppy pill sticks to the bottom edge */
  .form[data-chosen] .send { position: sticky; bottom: -1px; z-index: 5; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .form[data-chosen] .send.send--stuck { background: var(--paper); box-shadow: none; border-top: 1px solid var(--rule); margin-inline: -16px; padding-inline: 16px; }
  /* the week strip runs to the screen edges and scrolls inside itself */
  .strip { grid-auto-columns: minmax(74px, 1fr); margin: -2px -16px -6px; padding: 2px 16px 6px; scroll-padding-inline: 16px; }
  .chip label { min-width: 72px; }
}
/* the panel inside an intro page: the panel's own colour shows through, no phone bar, no sticky pill */
html[data-embed], html[data-embed] body { background: transparent; }
html[data-embed] .page { max-width: none; padding: 0 0 8px; min-height: 120px; }
html[data-embed] .lead { margin-top: 0; font-size: 1.15rem; max-width: 46ch; }
html[data-embed] .swap { margin-top: 16px; }
html[data-embed] .swap .pill { min-height: 38px; }
html[data-embed] .pill--on { background: var(--ink); color: var(--paper); cursor: default; }
html[data-embed] .form { margin-top: 22px; }
html[data-embed] .hero { padding: 0; }
html[data-embed] .embed-head { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: .95; margin-bottom: 14px; }
html[data-embed] .hero > p:not(.lead) { margin-top: 10px; }
html[data-embed] .notice { background: var(--white); }
html[data-embed] .field input, html[data-embed] .field textarea { background: var(--white); }
@media (max-width: 639px) {
  html[data-embed] .form[data-chosen] .send { position: static; margin: 14px 0 0; padding: 0; background: none; border: 0; }
  html[data-embed] .form[data-chosen] .send .pill { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
