/* Pictures for the two landing pages (24.10.): bigger phones, a fanned hero, colour themes, a swipe film and crops of the real app.
   Nothing here is animated by the page itself: the only movement is the app's own, filmed on the virtual phone. */

/* ---------- bigger phones ---------- */
.phone { max-width: 300px; flex: 0 1 300px; }
.row .phone { max-width: 320px; }

/* ---------- hero: three phones, fanned ---------- */
.hero .shots { min-height: 0; }
.stage { position: relative; display: flex; justify-content: center; align-items: flex-end; width: 100%; }
.stage .phone { position: relative; margin-bottom: -90px; }
.stage .p-mid { width: 62%; max-width: 310px; z-index: 2; }
.stage .p-left,
.stage .p-right { position: absolute; bottom: 0; z-index: 1; }
.stage .p-left { left: 0; width: 50%; max-width: 262px; margin-bottom: -110px; transform: rotate(-10deg); }
/* the right one is a smaller phone, lower and tilted less, with another screen on it */
.stage .p-right { right: 2%; width: 36%; max-width: 190px; margin-bottom: -150px; transform: rotate(4deg); }
@media (min-width: 820px) {
  .stage .p-mid { width: 60%; }
  .stage .p-left { left: -9%; }
  .stage .p-right { right: -2%; }
}

/* ---------- colour themes ---------- */
.themes { display: grid; gap: 18px; grid-template-columns: repeat(5, 1fr); margin-top: 8px; }
.theme { text-align: center; margin: 0; }
.theme .phone { max-width: 100%; flex: none; margin: 0 auto; width: 100%; }
.theme figcaption { margin-top: 14px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.theme .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; }
.themes-note { color: var(--muted); max-width: 60ch; margin: 0 0 24px; }
@media (max-width: 719px) {
  .themes { grid-template-columns: repeat(5, 66%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; margin-right: -16px; padding-right: 16px; }
  .theme { scroll-snap-align: center; }
}

/* ---------- swipe film (the app's own movement) ---------- */
.swipe { display: grid; gap: 28px; align-items: center; padding: 8px 0; }
@media (min-width: 820px) { .swipe { grid-template-columns: 1fr 1fr; gap: 56px; } }
.swipe h2 { margin-bottom: 14px; }
.swipe p { color: var(--muted); margin: 0 0 12px; max-width: 46ch; }
.swipe-demo { display: flex; justify-content: center; }
.swipe-demo .phone { flex: 0 1 300px; max-width: 300px; }
.swipe-demo .phone video { width: 100%; height: 100%; display: block; object-fit: cover; }
.swipe-caption { text-align: center; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }

/* ---------- two phones side by side in a feature row ---------- */
.duo { position: relative; display: flex; justify-content: center; align-items: flex-start; width: 100%; }
.duo .phone { flex: 0 1 62%; max-width: 270px; }
.duo .back { transform: rotate(-5deg) translateX(14%); margin-top: 28px; }
.duo .front { transform: rotate(3deg) translateX(-14%); z-index: 2; }

/* ---------- a crop of a real screenshot (a chart with its ribbon) ---------- */
.crop { background: var(--bg); overflow: hidden; aspect-ratio: 1080 / var(--h); box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25); }
.crop img { display: block; width: 100%; height: auto; margin-top: calc(var(--top) / -1080 * 100%); }
.crop-note { margin: 10px 0 40px; }
.highlight.split { display: grid; gap: 26px; }
@media (min-width: 820px) { .highlight.split { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } }
.highlight .crop { box-shadow: none; border: 1px solid var(--line); }

/* ---------- the receipt picture (an illustration, labelled as one) ---------- */
.flow { display: grid; gap: 22px; align-items: center; margin: 6px 0 34px; }
@media (min-width: 820px) { .flow { grid-template-columns: 0.9fr auto 1.1fr; gap: 28px; } }
.receipt {
  background: #fffefb; color: #1e1d1b; padding: 20px 20px 22px; max-width: 320px; width: 100%; margin: 0 auto;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14); transform: rotate(-1.5deg); font-size: 14px; line-height: 1.9;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px), 75% 100%, 70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px), 55% 100%, 50% calc(100% - 8px), 45% 100%, 40% calc(100% - 8px), 35% 100%, 30% calc(100% - 8px), 25% 100%, 20% calc(100% - 8px), 15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px));
}
.receipt .shop { text-align: center; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; border-bottom: 1px dashed #bdb8ad; margin-bottom: 6px; padding-bottom: 6px; }
.receipt .line { display: flex; justify-content: space-between; padding: 0 4px; }
.receipt .sum { display: flex; justify-content: space-between; border-top: 1px dashed #bdb8ad; margin-top: 6px; padding-top: 6px; font-weight: 700; }
.flow .arrow { text-align: center; font-size: 40px; color: var(--accent); line-height: 1; }
.cats { display: grid; gap: 10px; }
.cat { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); padding: 12px 16px; border-left: 6px solid var(--c); }
.cat small { display: block; color: var(--muted); font-size: 12px; }
.cat b { font-weight: 400; font-size: 1.1rem; }

/* ---------- the receipt picture: the right side is a real screenshot ---------- */
.shot-cats { max-width: 440px; margin: 0 auto; }

/* ---------- a half phone standing in a box, so it does not end in the air ---------- */
.half { display: flex; justify-content: center; align-items: flex-end; width: 100%; padding: 30px 30px 0; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.half .half-phone { width: 100%; max-width: 330px; flex: none; aspect-ratio: 1080 / var(--h); border-bottom: 0; border-radius: 30px 30px 0 0; box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.16); }
.half .half-phone img { object-position: top; }
/* on the dark band the phone stands on the band's own edge: no box of its own */
.half.on-band { background: transparent; padding: 0 0 0; align-self: end; }
.band .half.on-band .half-phone { max-width: 470px; box-shadow: none; }
.band .inner { align-items: end; }
.band .inner > div:first-child { padding-bottom: 40px; }

/* ---------- the second pair of phones: upright, on a coloured panel, bleeding off its bottom ---------- */
.duo.alt { background: var(--card); padding: 34px 18px 0; overflow: hidden; align-items: flex-end; gap: 4%; }
.duo.alt .phone { transform: none; margin: 0 0 -70px; flex: 0 1 44%; max-width: 230px; }
.duo.alt .back { transform: translateY(-34px); }

.highlight .half { border: 0; }
.half-phone video { object-position: top; }
.swipe-demo .half { max-width: 420px; }

/* ---------- the half phone in the cheese section reaches the box's borders (top, right and bottom), not under the text ---------- */
.highlight.split .half { margin: 0 -22px -28px; }
@media (min-width: 820px) {
  .highlight.split { align-items: stretch; }
  .highlight.split .half { margin: -28px -22px -28px 0; align-self: stretch; height: auto; }
}
/* A different theme colour for each box: Metsä (green), Meri (blue) and Luumu (plum) next to the default accent. */
.half.tint-green { background: color-mix(in srgb, #33663b 24%, var(--bg)); }
.half.tint-blue { background: color-mix(in srgb, #457b9d 26%, var(--bg)); }
.half.tint-plum { background: color-mix(in srgb, #b8447d 22%, var(--bg)); }
.highlight.split .half { width: auto; }

/* ---------- bigger pictures on a computer: the screenshots must be readable ---------- */
@media (min-width: 820px) {
  .row { grid-template-columns: 1.35fr 1fr; gap: 48px; }
  .row.flip { grid-template-columns: 1fr 1.35fr; }
  .row .phone { max-width: 400px; }
  .duo .phone { max-width: 340px; }
  .duo.alt { padding-top: 40px; }
  .duo.alt .phone { flex: 0 1 48%; max-width: 330px; }
  .half .half-phone { max-width: 420px; }
  .highlight.split { grid-template-columns: 1fr 1.15fr; }
  .band .half.on-band .half-phone { max-width: 540px; }
  .swipe-demo .phone { max-width: 340px; }
}
.highlight.split.swipe { padding: 28px 22px; gap: 26px; }
@media (min-width: 820px) { .highlight.split.swipe { grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: stretch; } }
.highlight.split.swipe > div:first-child { align-self: center; }

/* ---------- the third feature row: a bordered box, the tint reaches its borders and is taller at the top ---------- */
.row.boxed { border: 2px solid var(--text); padding: 28px 22px; margin: 28px 0; }
.row.boxed .phone-col { margin: -28px -22px 0; }
.row.boxed .half { width: auto; padding-top: 70px; }
@media (min-width: 820px) {
  .row.boxed { align-items: stretch; }
  .row.boxed .phone-col { margin: -28px 0 -28px -22px; }
  .row.boxed .half { height: 100%; }
  .row.boxed > div:last-child { align-self: center; }
}

/* ---------- the top of the page: a theme colour (Meri) instead of orange, and air round the buttons ---------- */
.hero .block { --on-accent: #ffffff; background: #457b9d; color: #ffffff; }
.hero .button { background: #14202a; color: #ffffff; }
.hero .button.ghost { background: transparent; color: #ffffff; border: 2px solid #ffffff; }
.hero p { margin: 0 0 30px; }
.hero .actions { gap: 16px; margin-bottom: 26px; }
.hero .note { margin-top: 26px; line-height: 1.6; }

/* ---------- tap a picture to see it big (readable on a computer) ---------- */
.phone img, .half img, .crop img, .theme img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.82); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-height: 96vh; max-width: 96vw; width: auto; height: auto; display: block; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.lightbox button { position: absolute; top: 12px; right: 16px; background: transparent; border: 0; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }

/* ---------- the receipt picture: one tinted box under the receipt and the phone, the phone's lower part from under the ribbon ---------- */
.flow.tinted { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); padding: 36px 24px; }
@media (min-width: 820px) { .flow.tinted { padding: 40px 48px; } }
.flow.tinted .half { background: transparent; padding: 0; overflow: visible; }
.half .half-phone.bottom { border-top: 0; border-radius: 0 0 30px 30px; box-shadow: 0 8px 36px rgba(0, 0, 0, 0.16); }
.half .half-phone.bottom img { object-position: bottom; }

/* ---------- layout fixes: the phone runs down to the end of the colour, and the third row's tint reaches the left border ---------- */
.flow.tinted { padding-bottom: 0; align-items: end; }
.flow.tinted .receipt, .flow.tinted .arrow { align-self: center; margin-bottom: 40px; }
.flow.tinted .half { margin-bottom: 0; }
.row.boxed .phone-col { display: block; }
.row.boxed .phone-col .half { width: auto; }
/* the phone's lower part reaches the box's top edge (where it is cut) and has the full outline at the bottom */
.flow.tinted { padding-top: 0; }
.flow.tinted .receipt, .flow.tinted .arrow { margin-bottom: 0; }
.half .half-phone.bottom { border-bottom: 8px solid #1e1d1b; }
