/* Meeno's own look on the page kit (public/assets): the look of the App Store frames.
   Flat grounds in the app's colours, big lowercase headlines in Bricolage Grotesque 800,
   plain ink phones holding real app screens, the halftone sun. Layout stays the kit's. */

/* ---------------------------------------------------------------- grounds
   Canvas is the page's own. Soft yellow and sun orange are the two brand grounds; ink is the kit's
   .ground-inverse. --em is the one emphasised phrase of a headline: the app's orange, a step darker
   on the light grounds and white on orange so large type keeps 3:1. */
:root { --soft: #f2df4a; --sun: #ec660a; --em: #d05408; }
.g-soft { --bg: var(--soft); --ink: #1a1714; --muted: #4a443d; --surface: #f7f5f0; --em: #d05408; background-color: var(--bg); color: var(--ink); }
.g-sun { --bg: var(--sun); --ink: #1a1714; --muted: #1a1714; --surface: #f7f5f0; --em: #fff; --accent: #fff; background-color: var(--bg); color: var(--ink); }
.ground-inverse { --em: var(--soft); }
main > section { overflow: clip; }
picture { display: contents; }
picture > source { display: none; }
:focus-visible { outline-color: var(--ink); }

/* the halftone sun as part of a ground: its middle sits on the far edge of the section's phone, so a
   slice of it shows. --sun-x is its middle from the left, --sun-b its foot above the section's foot. */
.hero, .score { background-image: url("/home/sun.webp"); background-repeat: no-repeat; background-size: var(--sun-w) var(--sun-w);
                background-position: left calc(var(--sun-x) - var(--sun-w) / 2) bottom var(--sun-b);
                --sun-x: calc(50vw + min(var(--container) / 2, 50vw - var(--gut))); }

/* ---------------------------------------------------------------- type */
h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em; line-height: .92; text-wrap: balance; }
.hero h1 { font-size: clamp(44px, 9vw, 132px); line-height: .92; letter-spacing: -0.045em; }
h2 { font-size: clamp(40px, 6vw, 88px); }
:is(h1, h2) em { font-style: normal; color: var(--em); }
.t-lead { max-width: 34ch; }

/* the small pill above a headline */
.kicker { width: fit-content; padding: 9px 16px 10px; border-radius: 20px; background: var(--ink); color: #f7f5f0;
          font: 600 16px/1.15 var(--font-display); letter-spacing: -0.01em; }
.g-sun .kicker { color: var(--soft); }
.ground-inverse .kicker { background: var(--soft); color: #1a1714; }

.head { display: grid; gap: var(--s-4); justify-items: start; margin-bottom: var(--head-gap); }

/* ---------------------------------------------------------------- nav: the bar stays canvas with its hairline over every ground */
.nav__logo { font-weight: 800; font-size: 24px; letter-spacing: -0.045em; }
.nav__logo .sun-mark { width: 28px; height: 28px; }

/* Apple's badge, unmodified: the link is as large as the badge and has its shape */
.store-link { display: inline-flex; flex: none; background: #000; border-radius: 5.5% / 16.5%;
              transition: transform 200ms ease, box-shadow 200ms ease; }
.store-link > img { display: block; }
@media (hover: hover) and (pointer: fine) {
  .store-link:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgb(26 23 20 / .55); }
}
.store-link:active { transform: scale(.97); }

/* ---------------------------------------------------------------- a phone
   The frame of the App Store frames: plain ink, no bezel art. --w is its width. In .art--cut it
   stands on the stage's foot and the screen is cut there; --r is its full height over its width,
   so a tall stage never stretches the screen. */
.art { display: flex; justify-content: flex-end; align-items: flex-end; min-height: 0; }
.phone { flex: none; width: var(--w); padding: calc(var(--w) * .022); background: #1a1714; border-radius: calc(var(--w) * .158);
         box-shadow: 0 60px 120px -30px rgb(26 23 20 / .45), 0 20px 40px -20px rgb(26 23 20 / .35); }
.phone img { display: block; width: 100%; height: auto; border-radius: calc(var(--w) * .136); }
.ground-inverse .phone { background: #3b352e; box-shadow: 0 60px 140px -20px rgb(0 0 0 / .7); }
.art--cut > .phone { display: flex; flex-direction: column; height: 100%; max-height: calc(var(--w) * var(--r, 1.73)); padding-bottom: 0;
                     border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.art--cut > .phone img { flex: 1 1 0; min-height: 0; object-fit: cover; object-position: 50% 0;
                           border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* ---------------------------------------------------------------- hero: the words, the badge under them, one phone rising from the foot */
/* --col5 is the phone's own five columns: on a tall window the phone stops there and never reaches the headline */
.hero { --col5: calc((min(100vw - 2 * var(--gut), var(--container)) - 11 * var(--gutter)) * 5 / 12 + 4 * var(--gutter));
        --w: min(clamp(250px, max(30vw, (100svh - var(--nav) - var(--hgap)) / 1.72), 35vw), var(--col5)); --sun-w: clamp(620px, 70vw, 1010px); --sun-b: calc(48svh - var(--sun-w) / 2); }
.hero.hero--split > .wrap { grid-template-rows: minmax(0, 1fr); }
.hero-split > .hero-visual.art { height: auto; align-self: stretch; margin-bottom: calc(-1 * (var(--hpadb) + var(--bar))); }
.hero-copy > .kicker + h1 { margin-top: var(--s-5); }
@media (prefers-reduced-motion: no-preference) { .hero .phone { animation: phone-rise 900ms cubic-bezier(.2, .8, .2, 1) both; } }
@keyframes phone-rise { from { transform: translateY(14%); } }

/* ---------------------------------------------------------------- three steps: phones standing on one ground line */
.steps__grid { border-bottom: 2px solid var(--ink); }
.step { display: flex; flex-direction: column; gap: var(--s-2); min-height: 0; }
.step__n { font: 800 clamp(24px, 2.2vw, 32px)/1 var(--font-display); color: var(--em); }
.step > h3 { font-size: clamp(24px, 2.2vw, 32px); }
.step > p:not(.step__n) { max-width: 30ch; }
.step > .art { --w: clamp(220px, 20vw, 290px); flex: 1 1 0; justify-content: center; min-height: 280px; margin-top: var(--s-5); overflow: clip; }

/* ---------------------------------------------------------------- the score, on ink: one whole phone */
.score { --w: min(26vw, (100svh - var(--padt) - var(--padb)) / 2.13); --sun-w: clamp(560px, 62vw, 900px); --sun-b: calc(45svh - var(--sun-w) / 2); }
.score__copy { display: grid; gap: var(--s-5); align-content: start; justify-items: start; }
.score .art { align-items: flex-start; }

/* ---------------------------------------------------------------- progress: two real pieces of the app */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: var(--card-gap); }
.bento__tile { --pad: var(--s-6); position: relative; min-height: 0; border-radius: 36px; overflow: clip; }
.bento__tile img { position: absolute; inset: var(--pad); margin: auto; width: auto; height: auto; border-radius: 22px;
                   max-width: min(100% - 2 * var(--pad), 440px); max-height: calc(100% - 2 * var(--pad)); }

/* ---------------------------------------------------------------- places: a few paintings as prints */
.prints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: var(--card-gap); }
.print-cell { display: grid; place-items: center; min-height: 0; padding: var(--s-4) clamp(30px, 2.6vw, 40px); }
.print { width: 100%; height: min(100%, 440px); min-height: 200px; object-fit: cover; border: 10px solid #fff; border-radius: 28px; background: #fff;
         box-shadow: 0 40px 80px -24px rgb(26 23 20 / .45), 0 10px 22px -10px rgb(26 23 20 / .3);
         transition: rotate 300ms cubic-bezier(.2, .8, .2, 1), translate 300ms cubic-bezier(.2, .8, .2, 1); }
.print-cell:nth-child(1) .print { rotate: -3deg; }
.print-cell:nth-child(2) .print { rotate: -1deg; }
.print-cell:nth-child(3) .print { rotate: -2deg; }
@media (hover: hover) and (pointer: fine) { .print:hover { rotate: 0deg; translate: 0 -8px; } }
@media (min-width: 1280px) { .print-cell { padding-inline: 44px; } .print { height: min(100%, 560px); } }

/* ---------------------------------------------------------------- the statement, a whole orange screen */
.statement > .wrap { justify-content: center; gap: var(--s-7); }
.statement .mo-wh__text { max-width: none; font-size: clamp(38px, 7vw, 100px); line-height: .92; letter-spacing: -0.045em; }
.statement .kicker { font-size: clamp(15px, 1.5vw, 22px); padding: .55em 1em .62em; border-radius: 999px; }
.statement .mo-w { color: color-mix(in oklab, var(--ink) 72%, var(--bg)); }
.statement .mo-w.is-on { color: var(--ink); }
.statement strong .mo-w.is-on { color: #fff; }
@media (prefers-reduced-motion: reduce) { .statement .mo-w { color: var(--ink); } .statement strong .mo-w { color: #fff; } }

/* ---------------------------------------------------------------- questions, the sun rising in the corner */
.questions__grid { grid-template-rows: auto minmax(0, 1fr); row-gap: var(--s-5); }
.questions__copy { display: grid; gap: var(--s-5); align-content: start; justify-items: start; }
.questions__sun { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: 0 100%; }
@media (min-width: 1024px) { .questions__grid > .faq { grid-row: 1 / span 2; } .questions__grid > .questions__sun { grid-row: 2; grid-column: 1 / span 6; } }
.faq { margin: 0; }
.faq dt { font: 500 var(--t-lead)/1.4 var(--font-text); }
.faq dd { margin: 0; max-width: 64ch; }

/* ---------------------------------------------------------------- the close: the words, the badge, the painted cafe */
.close--photo h2 { font-size: clamp(36px, 4.8vw, 70px); }
.close--photo > .close__media { --pos: 50% 62%; }
/* below 768px the close is its words and the badge: no painting, and one screen with the links */
@media (max-width: 767px) {
  .close--photo > .close__media { display: none; }
  .closing__cta.close--photo { justify-content: center; }
}
@media (max-width: 639px) {
  footer.closing:has(> .wrap > .closing__cta > .close__media) { --hm: 1; }
  footer.closing:has(> .wrap > .closing__cta > .close__media) > .wrap { grid-template-rows: minmax(0, 1fr) auto; row-gap: var(--s-7); }
  footer.closing:has(> .wrap > .closing__cta > .close__media) .closing__links { align-self: auto; }
  .close--photo h2 { font-size: 12vw; }
}
.close__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }

/* ---------------------------------------------------------------- tablet and phone */
/* a tablet keeps the three steps in a row and the score split side by side */
@media (min-width: 640px) and (max-width: 1023px) {
  .steps__grid > .step { grid-column: span 4; }
  .score .grid > .score__copy { grid-column: 1 / span 6; }
  .score .grid > .art { grid-column: 7 / span 6; }
  .score { --w: 40vw; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .score { --w: clamp(220px, 30vw, 320px); } }
@media (max-width: 1279px) {
  .bento { min-height: 440px; }
}
@media (max-width: 1023px) {
  .questions__grid { grid-template-rows: auto auto minmax(96px, 1fr); }
  .questions__sun { order: 1; height: 100%; max-height: 420px; }
  .hero { --w: clamp(230px, 34vw, 340px); --sun-x: calc(50vw + var(--w) / 2); --sun-b: calc(var(--sun-w) * -.3); }
  .hero-split > .hero-visual.art { justify-content: center; }
}
@media (max-width: 639px) {
  .kicker { font-size: 14px; padding: 7px 13px 8px; }
  .hero, .score { background-image: url("/home/sun-sm.webp"); }
  .hero { --w: 62vw; --sun-w: 170vw; }
  .steps__grid { row-gap: 0; border-bottom: 0; }
  .step { gap: var(--s-1); }
  .step > .art { --w: 60vw; flex: none; height: 300px; min-height: 0; margin-top: var(--s-4); margin-bottom: var(--s-6); }
  .step > .art { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .step:last-child > .art { margin-bottom: 0; }
  .score { --w: 64vw; --sun-w: 170vw; --sun-x: calc(50vw + var(--w) / 2); --sun-b: calc(var(--sun-w) * -.25); }
  .score .grid { grid-template-rows: auto minmax(0, 1fr); }
  .score .art { justify-content: center; margin-top: var(--s-6); clip-path: inset(-200px -200px 0 -200px); border-bottom: 2px solid var(--ink); }
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: 0; }
  .bento__tile { --pad: var(--s-4); border-radius: 28px; }
  .bento__tile img { border-radius: 14px; }
  .prints { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; align-content: center; }
  .print-cell { padding-block: var(--s-2); }
  .print { height: auto; min-height: 0; aspect-ratio: 2 / 1; }
  .print { border-width: 6px; border-radius: 18px; }
  .statement .mo-wh__text { font-size: 11.6vw; }
}
