/* Cheip OS site. The colours of the system's own wallpaper: deep sea teal
   where the phones are, pale foam where there is reading. One family, the
   system's font. The phones are photographs (Blender renders of the real
   Lumia 735), never drawings. */
:root {
  --deep: #062126;
  --deep2: #0b3135;
  --sea: #1d5a55;
  --foam: #9fe0cf;
  --mist: #d9efe8;
  --paper: #eef5f2;
  --ink: #0b2420;
  --ink2: #4a625c;
  --line: #c6d7d0;
  --ok: #17803f;
  --wip: #9a5a00;
  --plan: #5a6c66;
  --font: "Google Sans Flex", system-ui, sans-serif;
  --w: 1180px;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--deep); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font: 400 18px/1.55 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--foam); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; line-height: 1.05; font-variation-settings: "ROND" 100; }
h2 { font-size: clamp(34px, 5vw, 60px); }
.lede { margin-top: 18px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink2); max-width: 54ch; }
.dark { background: var(--deep); color: #eaf6f2; }
.dark .lede { color: #a9cbc3; }
section { padding: clamp(72px, 10vw, 128px) 0; }

/* header */
.top { position: absolute; inset: 0 0 auto; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; color: #eaf6f2; font-variation-settings: "ROND" 100; }
.brand svg { width: 26px; height: 26px; }
.top nav { margin-left: auto; display: flex; gap: 22px; align-items: center; font-size: 15px; }
.top nav a { color: #cfe5df; text-decoration: none; }
.top nav a:hover { color: #fff; }
.top .lang { padding: 6px 12px; border-radius: 99px; box-shadow: inset 0 0 0 1px #2c5a56; }
.top.light .brand, .top.light nav a { color: var(--ink); }
.top.light .lang { box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 760px) { .top nav a.opt { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 99px; font: 650 17px var(--font); text-decoration: none; border: 0; cursor: pointer; }
.btn.solid { background: var(--foam); color: var(--deep); }
.btn.solid:hover { background: #b8eede; }
.btn.ghost { color: #eaf6f2; box-shadow: inset 0 0 0 1.5px #3b6f6a; background: none; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--foam); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* hero: the two phones, front and back, like a product photo */
.hero { position: relative; overflow: hidden; padding: 120px 0 40px; min-height: min(100svh, 980px);
  background: radial-gradient(1100px 720px at 78% 40%, #145049 0%, rgba(20, 80, 73, 0) 70%), var(--deep); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; }
.hero h1 { font-size: clamp(54px, 8.6vw, 118px); letter-spacing: -0.035em; color: #f2fbf8; }
.hero h1 span { display: block; }
.hero .meta { margin-top: 26px; font-size: 14px; color: #87aaa2; }
.pair { position: relative; display: flex; align-items: center; justify-content: center; }
.pair img { position: relative; width: 100%; max-width: 640px; height: auto; }
.pair .front { z-index: 2; }
.pair .back { right: -14%; top: 7%; height: 86%; opacity: .96; }
@media (max-width: 900px) {
  .hero { padding-top: 96px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .pair { margin-top: 12px; }
}

/* screens: a row of phones, one per look */
.looks { overflow: hidden; }
.strip { display: flex; gap: 8px; margin-top: 54px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 max(24px, calc((100vw - var(--w)) / 2 + 24px)) 12px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.strip img { height: clamp(300px, 40vw, 440px); width: auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .4)); }
.strip figcaption { margin-top: 10px; font-size: 15px; color: #a9cbc3; }

/* apps */
.apps .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.apps .duo { display: flex; justify-content: center; }
.apps .duo img { height: clamp(360px, 44vw, 560px); width: auto; filter: drop-shadow(0 26px 30px rgba(6, 33, 38, .28)); }
.apps .duo img + img { margin-left: -6%; margin-top: 8%; }
.facts { list-style: none; padding: 0; margin-top: 30px; border-top: 1.5px solid var(--ink); }
.facts li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts b { display: block; font-size: 19px; font-variation-settings: "ROND" 100; }
.facts span { color: var(--ink2); font-size: 16px; }
@media (max-width: 900px) { .apps .wrap { grid-template-columns: 1fr; } }

/* devices */
.devs { list-style: none; padding: 0; margin-top: 44px; border-top: 1.5px solid var(--ink); }
.devs li { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: clamp(19px, 2vw, 24px); font-weight: 650; font-variation-settings: "ROND" 100; }
.devs li .m { color: var(--ink2); font-size: 14px; font-weight: 500; }
.devs li .st { margin-left: auto; font-size: 13px; font-weight: 650; padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.st.ready { background: #d4f0dc; color: var(--ok); }
.st.preview { background: #e3ecff; color: #2b5ea7; }
.st.next { background: #fbe9cf; color: var(--wip); }
.st.planned { background: #e3ebe8; color: var(--plan); }
.devnote { margin-top: 24px; color: var(--ink2); max-width: 62ch; }

/* shop */
.shop .intro .lede { max-width: 62ch; }
.shop .eds { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.ed { padding: 28px; border-radius: 32px; background: rgba(159, 224, 207, .06); box-shadow: inset 0 0 0 1.5px #1f4744; }
.ed img { display: block; height: clamp(260px, 28vw, 360px); width: auto; margin: 0 auto 18px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .5)); }
.ed h3 { font-size: 26px; color: #f2fbf8; margin: 0; }
.edsub { margin: 6px 0 0; color: #a9cbc3; font-size: 15px; }
.ed.vip { box-shadow: inset 0 0 0 1.5px #3fbf3a; }
.price { margin-top: 22px; font-size: 48px; font-weight: 700; color: #f2fbf8; font-variation-settings: "ROND" 100; }
.price small { display: block; font-size: 15px; font-weight: 500; color: #a9cbc3; }
.sd { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sdlabel { margin-top: 20px; font-size: 14px; color: #a9cbc3; }
.sd button { font: 650 15px var(--font); padding: 10px 16px; border-radius: 99px; border: 0; background: none; color: #cfe5df; box-shadow: inset 0 0 0 1.5px #2c5a56; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sd button.on { background: var(--foam); color: var(--deep); box-shadow: none; }
.sd button i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.fine { margin-top: 24px; font-size: 14px; color: #87aaa2; max-width: 70ch; }
.specs { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.specs li { padding: 11px 12px; border-radius: 16px; background: rgba(159, 224, 207, .07); }
.specs b { display: block; font-size: 16px; color: #f2fbf8; }
.specs span { display: block; font-size: 12.5px; line-height: 1.35; color: #a9cbc3; margin-top: 2px; }
@media (max-width: 900px) {
  .shop .eds { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 8px; }
  .ed { flex: 0 0 86%; scroll-snap-align: center; padding: 22px; }
}

/* build with us */
.ways { list-style: none; padding: 0; margin-top: 44px; border-top: 1.5px solid var(--ink); }
.ways a { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 6px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.ways b { font-size: clamp(20px, 2vw, 26px); font-variation-settings: "ROND" 100; }
.ways span { color: var(--ink2); align-self: center; }
.ways a:hover b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.coffee { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.coffee a { background: #ffdd00; color: #000; }
@media (max-width: 640px) { .ways a { grid-template-columns: 1fr; } }

footer { background: var(--deep); color: #87aaa2; font-size: 14px; padding: 40px 0 56px; }
footer p + p { margin-top: 8px; }

dialog { border: 0; border-radius: 28px; padding: 28px; max-width: 460px; width: calc(100% - 32px); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(6, 33, 38, .6); }
dialog h3 { font-size: 24px; margin-bottom: 8px; }
dialog label { display: block; font-size: 14px; font-weight: 650; margin-top: 12px; }
dialog input { display: block; width: 100%; margin-top: 6px; font: 16px var(--font); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dialog .small { font-size: 13px; color: var(--ink2); margin-top: 14px; }
dialog .btns { margin-top: 18px; }
dialog .btn { height: 46px; font-size: 15px; }
dialog .btn.solid { background: var(--ink); color: var(--paper); }
dialog .btn.ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }

/* install page: find the phone */
.finder { padding: 128px 0 64px; background: radial-gradient(900px 600px at 80% 0%, #145049 0%, rgba(20, 80, 73, 0) 70%), var(--deep); }
.finder h1 { font-size: clamp(44px, 6.4vw, 84px); color: #f2fbf8; }
.detect { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.found { margin-top: 28px; padding: 22px 24px; border-radius: 24px; background: var(--deep2); max-width: 720px; display: none; }
.found.on { display: block; }
.found h3 { font-size: 26px; color: #f2fbf8; }
.found p { margin-top: 6px; color: #a9cbc3; }
.found .st { display: inline-block; margin-top: 12px; }
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.picker button { font: 600 15px var(--font); padding: 10px 16px; border-radius: 99px; border: 0; background: none; color: #cfe5df; box-shadow: inset 0 0 0 1.5px #2c5a56; cursor: pointer; }
.picker button.on { background: var(--foam); color: var(--deep); box-shadow: none; }
.devpanel { padding: 64px 0; }
.devpanel[hidden] { display: none; }
.devpanel .lists { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 28px; max-width: 900px; }
.devpanel .lists h3 { font-size: 15px; color: var(--ink2); margin-bottom: 6px; }
@media (max-width: 700px) { .devpanel .lists { grid-template-columns: 1fr; } }

/* the installer inside the install page */
#install { padding-top: 24px; }
#model, #devlist { display: none; }
.devpanel + section { border-top: 0; }

/* landscape and what works */
.strip.land img { height: auto; width: clamp(320px, 62vw, 760px); }
.works .wgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 44px; border-top: 1.5px solid var(--ink); padding-top: 26px; }
.works h3 { font-size: 20px; font-weight: 650; font-variation-settings: "ROND" 100; }
.works ul { list-style: none; padding: 0; margin-top: 12px; }
.works li { padding: 9px 0 9px 28px; border-bottom: 1px solid var(--line); font-size: 16px; position: relative; }
.works .wgrid li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 14px; height: 8px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.works .soon { margin-top: 44px; padding: 26px 28px; border-radius: 28px; background: var(--mist); }
.works .soon ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.works .soon li { border: 0; padding: 7px 16px; background: #fff; border-radius: 99px; font-weight: 600; color: var(--wip); }
.works .soon p { color: var(--ink2); font-size: 16px; max-width: 62ch; }
@media (max-width: 1000px) { .works .wgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .works .wgrid { grid-template-columns: 1fr; } }

/* motion: one entrance in the hero, then each thing arrives as it scrolls in */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(70px) rotate(5deg) scale(.96); } }
  @keyframes slidein { from { opacity: 0; transform: translateX(90px) rotate(-6deg); } }
  @keyframes float { to { transform: translateY(-10px); } }
  @keyframes word { from { opacity: 0; transform: translateY(.5em); } }
  .hero h1 span { animation: word .9s cubic-bezier(.2, .8, .2, 1) both; }
  .hero h1 span:nth-child(2) { animation-delay: .12s; }
  .hero h1 span:nth-child(3) { animation-delay: .24s; }
  .hero .lede, .hero .btns, .hero .meta { animation: word .9s .4s cubic-bezier(.2, .8, .2, 1) both; }
  .pair { transform: translateY(var(--py, 0)); }
  .pair .front { animation: rise 1.3s .15s cubic-bezier(.2, .8, .2, 1) both, float 6s 1.5s ease-in-out infinite alternate; }
  .pair .back { animation: slidein 1.3s .35s cubic-bezier(.2, .8, .2, 1) both; }
  .mo section h2, .mo section .lede, .mo .wgrid > div, .mo .soon, .mo .ways li, .mo .ed, .mo .devs li, .mo .facts li, .mo .specs li, .mo .strip figure, .mo .duo img {
    opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
  .mo .hero h1, .mo .hero .lede { opacity: 1; transform: none; }
  .mo .in { opacity: 1 !important; transform: none !important; }
  .mo .wgrid > div:nth-child(2), .mo .ways li:nth-child(2), .mo .ed + .ed, .mo .specs li:nth-child(2), .mo .duo img + img { transition-delay: .1s; }
  .mo .wgrid > div:nth-child(3), .mo .ways li:nth-child(3), .mo .specs li:nth-child(3) { transition-delay: .2s; }
  .mo .wgrid > div:nth-child(4), .mo .ways li:nth-child(4), .mo .specs li:nth-child(4) { transition-delay: .3s; }
  .mo .duo img + img.in { transform: none !important; }
  /* the turned phones turn as they arrive */
  .mo .strip.land figure img { transform: rotate(-90deg) scale(.55); transition: transform 1.2s .1s cubic-bezier(.3, 1.25, .4, 1); }
  .mo .strip.land figure.in img { transform: none; }
  /* ticks pop in one after the other */
  .mo .wgrid li::before { transform: rotate(-45deg) scale(0) !important; transition: transform .45s cubic-bezier(.3, 1.8, .5, 1); }
  .mo .wgrid > div.in li::before { transform: rotate(-45deg) scale(1) !important; }
  .mo .wgrid li:nth-child(2)::before { transition-delay: .06s; } .mo .wgrid li:nth-child(3)::before { transition-delay: .12s; }
  .mo .wgrid li:nth-child(4)::before { transition-delay: .18s; } .mo .wgrid li:nth-child(5)::before { transition-delay: .24s; }
  .mo .wgrid li:nth-child(6)::before { transition-delay: .3s; } .mo .wgrid li:nth-child(7)::before { transition-delay: .36s; }
  .mo .wgrid li:nth-child(8)::before { transition-delay: .42s; } .mo .wgrid li:nth-child(9)::before { transition-delay: .48s; }
  .strip figure img, .ed img { transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .22s ease; }
  .strip figure:hover img { transform: translateY(-10px) rotate(-1.5deg); }
  .ed img.swap { opacity: 0; transform: translateY(12px) rotate(3deg); }
}
.ed img.swap { opacity: 0; }
