/* Can We Go? — marketing site.
   Display face: PP Neue Gstaad (Condensed), as in the app's titles.
   Everything else: the system face, as in the app's chrome.
   Colours: the app's (ios/CanWeGo/Views/AppBackground.swift). */

@font-face {
  font-family: "Gstaad";
  src: url("/fonts/gstaad-condensedbold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Gstaad";
  src: url("/fonts/gstaad-condensedregular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gstaad Wide";
  src: url("/fonts/gstaad-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #F7F3EB;
  --text: #1C1913;
  --muted: #6F675C;
  --line: #DDD4C4;

  --midnight: #0A127E;
  --cream: #F6E2B6;
  --periwinkle: #97A4FF;

  --display: "Gstaad", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, video, svg { display: block; max-width: 100%; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Pills ---------- */

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px;
  font: 600 15px/1 var(--body);
  text-decoration: none;
  transition: transform .2s ease, background-color .45s ease, opacity .45s ease;
}
.pill:active { transform: scale(.97); }
.pill-small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.pill-ink { background: var(--midnight); color: var(--cream); }
.pill-ink:hover { background: #121c9c; }
.pill-cream { background: var(--cream); color: var(--midnight); }
.pill-cream:hover { background: #fff1d2; }

/* ---------- Top bar (text pages) ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, env(safe-area-inset-left)) 14px max(20px, env(safe-area-inset-right));
  color: var(--midnight);
  background: rgba(247, 243, 235, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
  box-shadow: 0 1px 0 rgba(28, 25, 19, .06);
}
.bar-mark svg { height: 22px; width: auto; }

/* ---------- Home page colours: one of the app's themes ---------- */

.home {
  --bg: var(--paper);
  --ink: var(--midnight);
  --copy: #4a443a;
  --quiet: var(--muted);
  --rule: var(--line);
  --shadow: rgba(28, 25, 19, .32);
  background: var(--bg);
  color: var(--copy);
}
.home[data-bg="midnight"] {
  --bg: #0C169D; --ink: #F6E2B6;
  --copy: rgba(246, 226, 182, .82); --quiet: rgba(246, 226, 182, .6); --rule: rgba(246, 226, 182, .2);
  --shadow: rgba(2, 4, 40, .6);
}
.home[data-bg="petrol"] {
  --bg: #0F4C4F; --ink: #F6E2B6;
  --copy: rgba(246, 226, 182, .82); --quiet: rgba(246, 226, 182, .6); --rule: rgba(246, 226, 182, .2);
  --shadow: rgba(0, 20, 22, .6);
}
.home[data-bg="terracotta"] {
  --bg: #7C3520; --ink: #FBEFE3;
  --copy: rgba(251, 239, 227, .84); --quiet: rgba(251, 239, 227, .62); --rule: rgba(251, 239, 227, .2);
  --shadow: rgba(40, 10, 2, .55);
}
.home[data-bg="oat"] {
  --bg: #E3DDCF; --ink: #3E2C14;
  --copy: rgba(62, 44, 20, .82); --quiet: rgba(62, 44, 20, .6); --rule: rgba(62, 44, 20, .16);
  --shadow: rgba(62, 44, 20, .35);
}
.home[data-bg="blush"] {
  --bg: #EBDAD3; --ink: #43201D;
  --copy: rgba(67, 32, 29, .82); --quiet: rgba(67, 32, 29, .6); --rule: rgba(67, 32, 29, .16);
  --shadow: rgba(67, 32, 29, .35);
}

.home .lede h1 { color: var(--ink); }
.home .lede p { color: var(--copy); }
.home .pill-ink { background: var(--ink); color: var(--bg); }
.home .pill-ink:hover { background: var(--ink); opacity: .88; }
.home .foot { color: var(--quiet); }
.home .foot-links { border-top-color: var(--rule); }
.home .foot-links a:hover { color: var(--ink); }

/* ---------- The fan: seven phones, the middle one in front ---------- */

.fan {
  --w: clamp(150px, 19vw, 290px);
  --step: calc(var(--w) * .66);
  position: relative;
  height: calc(var(--w) * 2.42);
  margin-top: clamp(32px, 5vw, 72px);
  overflow-x: clip;
}
@media (max-width: 640px) {
  .fan { --w: 46vw; --step: calc(var(--w) * .56); }
  .device.far { display: none; }
}

.device {
  --a: max(var(--i), calc(var(--i) * -1));
  position: absolute; left: 50%; top: 50%;
  z-index: calc(10 - var(--a));
  width: var(--w);
  margin: 0;
  padding: calc(var(--w) * .034);
  border-radius: calc(var(--w) * .17);
  background: #0b0b0c;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .07),
    0 0 0 calc(var(--w) * .007) #77787d,
    0 0 0 calc(var(--w) * .012) #2e2e31,
    0 calc(var(--w) * .12) calc(var(--w) * .2) calc(var(--w) * -.06) var(--shadow, rgba(28, 25, 19, .32));
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--i) * var(--step)))
    scale(calc(1 - var(--a) * .075));
}
.device img, .device video {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--w) * .136);
}
/* Side buttons: action and volume on the left, side button and camera
   control on the right. */
.device::before, .device::after {
  content: "";
  position: absolute;
  width: calc(var(--w) * .012);
  background: #4d4e52;
}
.device::before {
  left: calc(var(--w) * -.02);
  top: 18%; height: 27%;
  border-radius: 2px 0 0 2px;
  -webkit-mask: linear-gradient(#000 0 15%, transparent 15% 28%, #000 28% 60%, transparent 60% 68%, #000 68%);
  mask: linear-gradient(#000 0 15%, transparent 15% 28%, #000 28% 60%, transparent 60% 68%, #000 68%);
}
.device::after {
  right: calc(var(--w) * -.02);
  top: 27%; height: 36%;
  border-radius: 0 2px 2px 0;
  -webkit-mask: linear-gradient(#000 0 34%, transparent 34% 72%, #000 72%);
  mask: linear-gradient(#000 0 34%, transparent 34% 72%, #000 72%);
}

/* ---------- The words ---------- */

.lede {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) 24px clamp(56px, 8vw, 88px);
  text-align: center;
  display: grid; justify-items: center;
}
/* The logo, written in as the app does at launch (js/logo.js). */
.lede .logo { width: clamp(240px, 72vw, 380px); height: auto; color: var(--ink, var(--midnight)); }
.lede h1 {
  margin: 24px 0 20px;
  font: 700 clamp(32px, 4vw, 44px)/1.02 var(--display);
  color: var(--midnight);
  text-wrap: balance;
}
.lede p { margin: 0 0 16px; color: #4a443a; text-wrap: pretty; }
.lede .pill { margin-top: 20px; }

/* ---------- Footer ---------- */

.foot {
  max-width: 600px; margin: 0 auto;
  padding: 0 24px 72px;
  color: var(--muted); font-size: 14px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }
.foot-note { margin: 18px 0 0; }

/* ---------- Text pages: support, privacy, terms ---------- */

.doc { max-width: 640px; margin: 0 auto; padding: 56px 24px 72px; }
.doc h1 { font: 700 clamp(40px, 6vw, 56px)/1 var(--display); color: var(--midnight); margin: 0 0 28px; }
.doc h2 { font: 700 26px/1.1 var(--display); color: var(--midnight); margin: 44px 0 10px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 8px 0; }
.doc-page .foot { max-width: 640px; }
