/* www.sidecar.travel. Ink, with photographs to every edge that fade into it; ivory type on
   top; glass where something sits on a photograph. No shadows. Safari paints the strip
   behind the clock in the root colour, so the root is ink. */
:root{--ink:#121110;--ivory:#f3efe7;--dim:rgba(243,239,231,.66);--faint:rgba(243,239,231,.5);--line:rgba(243,239,231,.14);
  --serif:"Instrument Serif",Georgia,serif;--sans:Geist,-apple-system,system-ui,sans-serif;--pad:28px;--ease:cubic-bezier(.2,.9,.2,1)}
*{margin:0;padding:0;box-sizing:border-box}
html{background:var(--ink);color:var(--ivory);-webkit-text-size-adjust:100%}
body{font:16px/1.6 var(--sans);-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{display:block;max-width:100%;height:auto}
a{color:inherit}

/* The wordmark and the menu, over the photograph. The menu opens full screen, on glass. */
.bar{position:absolute;z-index:20;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:calc(env(safe-area-inset-top) + 16px) var(--pad) 0}
.mark{font:400 25px/1 var(--serif);text-decoration:none;letter-spacing:.005em;position:relative;z-index:31}
.menu summary{list-style:none;cursor:pointer;width:44px;height:44px;margin-right:-10px;display:grid;place-items:center;position:relative;z-index:31}
.menu summary::-webkit-details-marker{display:none}
.menu summary i{position:absolute;left:11px;right:11px;height:1.5px;background:currentColor;transition:transform .35s var(--ease)}
.menu summary i:first-child{transform:translateY(-4px)}.menu summary i:last-child{transform:translateY(4px)}
.menu[open] summary i:first-child{transform:rotate(45deg)}.menu[open] summary i:last-child{transform:rotate(-45deg)}
.menu nav{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;justify-content:flex-end;gap:2px;padding:0 var(--pad) calc(env(safe-area-inset-bottom) + 48px);
  background:rgba(18,17,16,.55);-webkit-backdrop-filter:blur(30px) saturate(1.4);backdrop-filter:blur(30px) saturate(1.4)}
.menu nav a{font:400 38px/1.18 var(--serif);text-decoration:none}
.menu nav a.small{font:400 15px/1.4 var(--sans);color:var(--dim);margin-top:18px}
.menu nav a.go{margin-top:28px;align-self:flex-start;font:500 15px/1 var(--sans)}
.menu[open] nav a{animation:up .5s var(--ease) both}
@keyframes up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* The opening: one photograph, taller than the screen, fading into ink at both ends. */
.open{position:relative;height:108svh;min-height:640px;display:flex;align-items:flex-end;overflow:hidden}
.open picture,.open>img{position:absolute;inset:0}
.open img{width:100%;height:100%;object-fit:cover;filter:saturate(1.08) contrast(1.04)}
.open:after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(18,17,16,.55) 0,rgba(18,17,16,0) 16%,rgba(18,17,16,0) 30%,rgba(18,17,16,.5) 46%,rgba(18,17,16,.86) 64%,var(--ink) 84%)}
.over{position:relative;z-index:2;width:100%;padding:0 var(--pad) calc(8svh + 24px)}
.page .open{height:78svh;min-height:520px}
.page .over{padding-bottom:calc(6svh + 8px)}
.lab{display:block;font-size:13px;font-weight:500;color:var(--dim);margin-bottom:12px}
h1{font:400 44px/1.02 var(--serif);letter-spacing:-.005em;max-width:12em}
h1 span{opacity:.62}
.page h1{font-size:42px;max-width:14em}

/* A text exchange, on glass over the photograph. It arrives once the photograph has:
   Safari draws glass laid over nothing as black. */
.demo{display:flex;flex-direction:column;gap:6px;margin-bottom:28px;max-width:400px}
.said{align-self:flex-start;max-width:86%;padding:9px 14px 10px;border-radius:19px 19px 19px 6px;font-size:15px;line-height:1.4;margin:0;letter-spacing:-.003em;
  background:rgba(18,17,16,.62);-webkit-backdrop-filter:blur(24px) saturate(1.6);backdrop-filter:blur(24px) saturate(1.6);border:1px solid rgba(255,255,255,.14)}
.said.you{align-self:flex-end;border-radius:19px 19px 6px 19px;background:var(--ivory);color:var(--ink);border-color:var(--ivory);-webkit-backdrop-filter:none;backdrop-filter:none}
.js .open .said{opacity:0}
.js .lit .said{animation:up .5s var(--ease) both}
.js .lit .said+.said{animation-delay:.45s}
@media (prefers-reduced-motion:reduce){.js .said{opacity:1;animation:none!important}}

/* The one button: it opens Messages with Sidecar's number and a first line written. */
.go{display:inline-flex;align-items:center;gap:10px;height:52px;padding:0 26px;border-radius:26px;background:var(--ivory);color:var(--ink);font:500 15px/1 var(--sans);text-decoration:none;margin-top:26px}
.go svg{width:17px;height:17px}
.fine{font-size:13px;color:var(--dim);margin-top:14px}
.qr{display:none}

/* Reading on ink. A page's first paragraph answers it. */
main{padding:0 var(--pad)}
.lede{font:400 24px/1.3 var(--serif);margin:0;max-width:22em}
section{margin-top:88px}
h2{font:400 34px/1.06 var(--serif);margin-bottom:18px;max-width:16em}
h3{font:500 16px/1.4 var(--sans);margin:28px 0 6px}
.prose{max-width:640px}
.prose p,.prose li{color:rgba(243,239,231,.84);margin-bottom:14px;font-size:17px;line-height:1.62}
.prose h2{margin-top:64px}
.prose .lede{font:400 24px/1.34 var(--serif);color:var(--ivory);margin-bottom:22px}
.prose ul,.prose ol{padding-left:20px}
.prose a,.faq a{text-underline-offset:3px;text-decoration-color:var(--faint)}
.prose b{font-weight:500;color:var(--ivory)}
.src{font-size:13px!important;color:var(--faint)!important}

/* Exchanges on ink, in the reading column. */
.chat{display:flex;flex-direction:column;gap:6px;margin:24px 0;max-width:400px}
.chat .said{background:rgba(243,239,231,.09);border-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;color:var(--ivory)}
.chat .said.you{background:var(--ivory);color:var(--ink);border-color:var(--ivory)}
.js .chat .said{opacity:1;animation:none}

/* How it works: a photograph, then the step, then the exchange it takes. */
.steps{display:grid;gap:64px;margin-top:32px}
.step figure{margin:0 calc(-1 * var(--pad));aspect-ratio:4/3;overflow:hidden}
.step figure img{width:100%;height:100%;object-fit:cover}
.step .n{font:500 12px/1 var(--sans);letter-spacing:.12em;color:var(--faint);margin-top:24px}
.step h3{font:400 30px/1.08 var(--serif);margin:10px 0 8px}
.step p{color:var(--dim);max-width:30em}
.step .chat{margin-bottom:0}

/* What else it does: a reel of photographs you swipe through. */
.reel{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 calc(-1 * var(--pad));padding:0 var(--pad);scrollbar-width:none}
.reel::-webkit-scrollbar{display:none}
.reel a{flex:0 0 76%;scroll-snap-align:start;position:relative;aspect-ratio:3/4;overflow:hidden;text-decoration:none;display:flex;align-items:flex-end}
.reel img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .8s var(--ease)}
.reel a:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(18,17,16,0) 45%,rgba(18,17,16,.82) 100%)}
.reel span{position:relative;z-index:2;padding:20px}
.reel b{display:block;font:400 27px/1.08 var(--serif);margin-bottom:6px}
.reel em{font-style:normal;font-size:14px;color:var(--dim);line-height:1.45;display:block}
.reel a:hover img{transform:scale(1.03)}

/* Questions open in place. */
.faq{max-width:680px}
.faq details{border-top:1px solid var(--line)}
.faq details:last-child{border-bottom:1px solid var(--line)}
.faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:20px;padding:20px 0;font:400 22px/1.25 var(--serif)}
.faq summary::-webkit-details-marker{display:none}
.faq summary:after{content:"";flex:none;width:11px;height:11px;margin-top:8px;border-right:1.5px solid var(--dim);border-bottom:1.5px solid var(--dim);transform:rotate(45deg);transition:transform .3s var(--ease)}
.faq details[open] summary:after{transform:rotate(225deg);margin-top:13px}
.faq p{color:var(--dim);padding:0 0 22px;max-width:36em}

/* Tables, for who can do what and the comparison. */
.table{overflow-x:auto;margin:22px calc(-1 * var(--pad));padding:0 var(--pad);scrollbar-width:none}
table{border-collapse:collapse;min-width:620px;width:100%;font-size:14.5px;line-height:1.42}
th,td{text-align:left;vertical-align:top;padding:12px 14px 12px 0;border-bottom:1px solid var(--line)}
thead th{font-weight:500;color:var(--faint);font-size:13px}
tbody th{font-weight:500;color:var(--ivory)}
td{color:var(--dim)}
td.us{color:var(--ivory)}

/* The close: a last photograph and the button. */
.close{position:relative;margin:96px calc(-1 * var(--pad)) 0;min-height:86svh;display:flex;align-items:flex-end;overflow:hidden}
.close img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.close:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,var(--ink) 0,rgba(18,17,16,0) 26%,rgba(18,17,16,0) 45%,rgba(18,17,16,.88) 86%,var(--ink) 100%)}
.close div{position:relative;z-index:2;padding:0 var(--pad) 56px}
.close h2{margin-bottom:0}
.close h2 span{opacity:.62}
.open.plain{height:auto;min-height:0}
.open.plain:after{display:none}
.open.plain .over{padding-top:calc(env(safe-area-inset-top) + 110px);padding-bottom:24px}
.menu nav a.small.tight{margin-top:4px}

/* On a phone the button follows you once the opening's has gone, until the close's arrives. */
.dock{position:fixed;z-index:15;left:0;right:0;bottom:0;padding:36px var(--pad) calc(env(safe-area-inset-bottom) + 14px);
  background:linear-gradient(180deg,rgba(18,17,16,0) 0,rgba(18,17,16,.82) 45%,var(--ink) 100%);
  opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .3s var(--ease),transform .3s var(--ease)}
.dock.on{opacity:1;transform:none;pointer-events:auto}
.dock .go{display:flex;justify-content:center;margin:0}
footer{padding:24px var(--pad) calc(env(safe-area-inset-bottom) + 32px);font-size:12.5px;line-height:1.55;color:var(--faint)}
footer nav{display:flex;flex-wrap:wrap;gap:8px 20px;margin-bottom:22px;font-size:14px;color:var(--dim)}
footer nav a{text-decoration:none}
footer p{margin-bottom:6px}
footer p a{text-decoration:none}

@media (min-width:900px){
  :root{--pad:max(56px,6vw)}
  .open{height:100vh}
  .open:after{background:linear-gradient(90deg,rgba(18,17,16,.9) 0,rgba(18,17,16,.72) 36%,rgba(18,17,16,0) 64%),linear-gradient(180deg,rgba(18,17,16,.5) 0,rgba(18,17,16,0) 20%,rgba(18,17,16,0) 70%,var(--ink) 100%)}
  .over{max-width:820px;padding-bottom:12vh}
  h1{font-size:68px;max-width:none}
  .page h1{font-size:60px}
  .lede{font-size:32px}
  h2{font-size:46px}
  .steps{grid-template-columns:repeat(3,1fr);gap:28px}
  .step figure{margin:0}
  .dock{display:none}
  .reel{display:grid;grid-template-columns:repeat(4,1fr);overflow:visible;margin:0;padding:0}
  .close{margin:120px calc(-1 * var(--pad)) 0;min-height:80vh}
  .qr{display:flex;align-items:center;gap:14px;margin-top:22px;font-size:14px;line-height:1.4;color:var(--dim)}
  .qr img{width:84px;height:84px;background:#fff;padding:6px}
}
@media (min-width:900px) and (hover:none){.qr{display:none}}
