/* The Helmsman page, proof 3. Product frames stay untouched and show at exactly 2:1 on a Retina screen. */
:root {
  --orange: #ff5619;
  --w: min(1056px, calc(100vw - 2 * var(--m)));
  --baseline: max(30svh, calc(11.4vw + 96px));
}

html, body { background: var(--paper); }
img { display: block; width: 100%; height: auto; }

.paper { background: var(--paper) url(a/paper.webp) 0 0 / 540px 600px repeat; color: var(--blue); }
.blue { background: var(--blue); color: var(--paper); }
.band { padding: clamp(64px, 8vw, 128px) var(--m); position: relative; }
.label { font-size: 18px; font-weight: 750; margin: 0 0 14px; }
.story { font-size: clamp(26px, 2.9vw, 42px); line-height: 1.14; font-weight: 560; letter-spacing: -.01em; margin: 0; text-wrap: pretty; }
.story.m { font-size: clamp(22px, 2.3vw, 34px); line-height: 1.16; }
.statement { margin: 0; font-size: clamp(min(46px, 12.4vw), 6.2vw, 96px); font-weight: 800; line-height: .98; letter-spacing: -.025em; text-wrap: balance; }
.statement .sent { display: inline-block; }
.statement.s { font-size: clamp(34px, 3.7vw, 58px); line-height: 1.02; }
.facts { margin: clamp(28px, 3vw, 44px) 0 0; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.42; font-weight: 450; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.row > * { min-width: 0; }
.c { margin: 14px 0 0; font-size: 16px; line-height: 1.4; }

/* A real window: the frame untouched, a macOS corner, a hairline and a soft shadow. */
.win { position: relative; width: var(--w); margin-inline: auto; border-radius: 12px; overflow: hidden; background: #181818; box-shadow: 0 0 0 1px #000000b3, 0 2px 4px #2a1d0a4d, 0 18px 36px #2a1d0a47, 0 56px 110px #2a1d0a59; }
.win::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #ffffff29; pointer-events: none; }
/* The three buttons that macOS draws at x 20, y 14. A hidden capture window leaves them out. */
.lights { position: absolute; left: 1.894%; top: 2.265%; width: 4.924%; display: flex; justify-content: space-between; z-index: 1; }
.lights i { display: block; width: 23.08%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 .5px #0000002e; }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

/* The opening */
.opening { overflow: hidden; z-index: 1; height: min(100svh, calc(var(--baseline) + 96px + 40vw)); }
.opening h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
html[data-press="lost"] .press { visibility: hidden; }
html[data-press="lost"] .opening h1 { width: auto; height: auto; overflow: visible; clip-path: none; left: var(--m); top: calc(var(--baseline) - 13.8vw); font-size: 16vw; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--blue); z-index: 2; }
.sea-w { position: absolute; inset: 0; overflow: hidden; mix-blend-mode: multiply; --edge: 18.05vw; -webkit-mask: url(a/ragged.webp) left bottom / 100% var(--edge) no-repeat, linear-gradient(#000, #000) left top / 100% calc(100% - var(--edge) + 1px) no-repeat; mask: url(a/ragged.webp) left bottom / 100% var(--edge) no-repeat, linear-gradient(#000, #000) left top / 100% calc(100% - var(--edge) + 1px) no-repeat; }
.sea-w img { position: absolute; left: 0; width: 100%; top: calc(var(--baseline) + 96px - 26.7vw); }
.hero-line { position: absolute; left: var(--m); right: var(--m); top: calc(var(--baseline) + clamp(16px, 2.2vw, 30px)); z-index: 2; margin: 0; color: var(--blue); font-size: clamp(18px, 1.8vw, 28px); line-height: 1.2; font-weight: 560; letter-spacing: -.005em; text-wrap: balance; }
@media (min-width: 761px) { .lead-block .actions { justify-content: flex-end; } }
.hero-win { position: relative; z-index: 2; padding-top: 1px; padding-bottom: 8px; }
.hero-win .win { margin-top: calc(var(--w) * -.186); }

.lead-block { padding: clamp(64px, 7vw, 112px) var(--m) clamp(56px, 6vw, 96px); }
.tag-line { margin: 0 0 .4em; text-wrap: balance; font-size: clamp(min(46px, 12.4vw), 6.2vw, 96px); font-weight: 800; line-height: .98; letter-spacing: -.025em; }
.lead-text { font-size: clamp(26px, 2.9vw, 42px); line-height: 1.14; font-weight: 560; letter-spacing: -.01em; margin: 0; text-wrap: pretty; }

.action--primary:focus-visible { outline-color: var(--blue); }

/* The film */
.filmbox { position: relative; width: var(--w); margin-inline: auto; }
#film { scroll-margin-top: calc(24px - clamp(32px, 4vw, 64px)); }
#film .label { width: var(--w); margin-inline: auto; }
/* The film's title under the picture is the button. The size is computed so the line runs from the left edge of the window to the right edge, and the triangle stands at the cap height. The whole film box presses it. */
.play { display: flex; align-items: baseline; width: 100%; margin: .2em 0 0; padding: 0 0 .17em; border: 0; background: none; color: var(--blue); font: 800 calc(var(--w) / 6.44)/1 'Schibsted Grotesk', Arial, sans-serif; letter-spacing: -.03em; text-align: left; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .16s ease-out; }
.play::after { content: ""; position: absolute; inset: 0; }
.play svg { flex: none; width: .6em; height: .73em; margin-right: .1em; fill: currentColor; position: relative; top: .014em; transition: transform .16s ease-out; }
.play .w { transition: transform .06s ease-out; }
.play:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (hover: hover) { .play:hover { color: var(--blue-deep); } .play:hover svg { transform: translateX(.05em); } }
.play:active { color: #04167f; }
.play:active .w { transform: translateY(2px); }
.play:active svg { transform: translateY(2px); transition-duration: .06s; }
@media (prefers-reduced-motion: reduce) { .play, .play svg, .play .w { transition: none; } }
/* The film waits out of sight. It fills the screen while it plays. */
.reel { display: none; }
.reel.on { display: block; position: fixed; inset: 0; z-index: 100; width: 100vw; height: 100vh; height: 100dvh; background: #000; object-fit: contain; }

/* Why */
.why { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); align-items: center; column-gap: 32px; padding: clamp(24px, 3vw, 48px) var(--m) clamp(24px, 3vw, 48px) 0; }
.why .story { font-size: clamp(22px, 2.3vw, 34px); line-height: 1.16; }
.why-r img { aspect-ratio: 15 / 7; object-fit: cover; object-position: 50% 100%; }
.why-r { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); padding: clamp(24px, 3vw, 48px) 0 clamp(24px, 3vw, 48px) var(--m); }
.mult { mix-blend-mode: multiply; }

/* The app's own sea, level with the drawn sea */
.horizon { --t: clamp(150px, 14vw, 200px); position: relative; height: calc(var(--t) + var(--w) * .4562 + 24.14vw + 8px); overflow: hidden; isolation: isolate; }
.horizon .plate { position: absolute; left: 0; width: 100%; top: calc(var(--t) + var(--w) * .4562 - 18.81vw); mix-blend-mode: multiply; z-index: 0; }
.horizon .head { position: absolute; left: var(--m); right: var(--m); top: clamp(32px, 4.4vw, 64px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 40px; z-index: 2; }
.horizon .head .story { font-size: clamp(22px, 2.3vw, 34px); }
.horizon .win { position: absolute; left: 50%; top: var(--t); margin: 0 0 0 calc(var(--w) / -2); z-index: 1; }

/* It asks */
.wait { position: relative; z-index: 1; padding: clamp(40px, 5vw, 72px) var(--m) clamp(64px, 7vw, 104px); }
.wait .win { margin-top: clamp(28px, 3vw, 48px); }

/* Source control: one whole panel, cut out of the untouched frame in CSS */
.scm { position: relative; min-height: max(700px, 52vw); overflow: hidden; isolation: isolate; padding: 96px var(--m) 112px; display: grid; grid-template-columns: minmax(0, 1fr) min(519px, 100%); column-gap: 64px; align-items: start; }
.scm .plate { position: absolute; left: 0; bottom: 0; width: 100%; mix-blend-mode: multiply; z-index: 0; }
.scm .tx { position: relative; z-index: 2; }
.panel { position: relative; z-index: 1; width: min(519px, 100%); margin-right: 96px; aspect-ratio: 1038 / 987; border-radius: 14px; overflow: hidden; background: #262626; box-shadow: 0 0 0 1px #000000b3, 0 2px 4px #2a1d0a4d, 0 18px 36px #2a1d0a47, 0 56px 110px #2a1d0a59; }
.panel img { position: absolute; width: 203.468%; max-width: none; left: -51.734%; top: -12.665%; }

.blue a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.action, .blue a { transition: background-color .16s ease-out, text-decoration-thickness .16s ease-out; }
@media (hover: hover) { .action:not(.action--primary):hover, .blue a:hover { text-decoration-thickness: 3px; } }
@media (prefers-reduced-motion: reduce) { .action, .blue a { transition: none; } }

.dots { width: 100%; height: auto; overflow: visible; display: block; }
.dots text { font: 500 15px 'Schibsted Grotesk', Arial, sans-serif; fill: var(--blue); }

@media (max-aspect-ratio: 1/1) {
  :root { --baseline: 32svh; }
}

@media (max-width: 1100px) {
  .win, .panel { box-shadow: 0 0 0 1px #000000b3, 0 1px 3px #2a1d0a40, 0 10px 20px #2a1d0a40, 0 24px 44px #2a1d0a4d; }
  .dots text { font-size: 24px; transform: translateY(6px); }
  .scm { display: block; min-height: 0; padding: 56px var(--m) 72px; }
  .panel { margin: 28px auto 0; }
}

@media (max-width: 760px) {
  .opening { height: min(100svh, calc(var(--baseline) + 136px + 76vw)); }
  .sea-w img { width: 190%; left: -45%; top: calc(var(--baseline) + 136px - 50.7vw); }
  .row { row-gap: 28px; }
  .row > * { grid-column: 1 / -1 !important; }
  .lead-block .actions { margin-top: 20px; }
  .play { margin-top: .36em; min-height: 44px; }
  .why, .why-r { grid-template-columns: minmax(0, 1fr); row-gap: 20px; padding: 24px 0; }
  .why .tx { padding-inline: var(--m); }
  .why-r .tx { order: 2; }
  .horizon { --t: 184px; }
  .scm .plate { width: 190%; left: -45%; }
  .dots text { font-size: 34px; transform: translateY(18px); }
  .dots text:nth-last-of-type(2) { text-anchor: end; transform: translate(55.7px, 18px); }
  .wait .win { aspect-ratio: 860 / 825; }
  .wait .win .lights { display: none; }
  .wait .win img { position: absolute; width: 245.6%; max-width: none; left: -11.05%; top: -9.7%; }
  .dots .peak { display: none; }
}

@media (max-width: 480px) {
  .dots text { font-size: 52px; transform: translateY(36px); }
  .dots text:nth-last-of-type(2) { text-anchor: end; transform: translate(55.7px, 36px); }
  .dots .rest { display: none; }
  .c { margin-top: 24px; }
}
