/* Home hero, phones only (full-screen painted opening). See hero-s.js. Also removes the three chapters and the butterfly below the hero on phones. */
.ss-hero:not(.hs-on) .hs-wrap, .ss-hero:not(.hs-on) .hs-pill, .ss-hero:not(.hs-on) .hs-text { display: none; }
.ss-hero.hs-on .hx, .ss-hero.hs-on .hm { display: none !important; }
@media (max-width: 760px) {
  html.ss-on .ss-s1, html.ss-on .ss-s2, html.ss-on .ss-s3, html.ss-on .ss-end { display: none !important; }
  .ss-bf { display: none !important; }
  html.ss-on header.top { background: linear-gradient(180deg, #FFFDF8, #FFF8EC) !important; border-bottom: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* night mode: the cream bar would hide the light-ink logo (about 1.1:1), so below the hero the bar stays dark like the night page */
  html.ss-on[data-night="1"]:not(.hs-top) header.top { background: #0F1720 !important; }
}
/* while the hero is on screen the header floats over the picture: no bar, white logo, glass buttons (class set by hero-s.js) */
@media (max-width: 760px) {
  html.ss-on.hs-top header.top { background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-bottom: 0 !important; box-shadow: none !important; }
  html.ss-on.hs-top header.top .wm, html.ss-on.hs-top header.top .wm b { color: #fff !important; }
  html.ss-on.hs-top header.top .brand { filter: drop-shadow(0 1px 4px rgba(0,0,0,.5)); }
  html.ss-on.hs-top header.top .brand .wm svg [stroke="#16202C"] { stroke: #fff !important; }
  html.ss-on.hs-top header.top .brand .wm svg [fill="#16202C"] { fill: #fff !important; }
  html.ss-on.hs-top header.top button:not(.brand):has(svg) { background: rgba(20,16,12,.34) !important; border-color: rgba(255,255,255,.34) !important; color: #fff !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
/* edge to edge, from under the header to the bottom of the screen; the bottom menu floats over it */
.ss .ss-hero.hs-on { position: relative; display: block; width: 100vw; margin: -74px 0 0 calc(50% - 50vw) !important; height: 100svh !important; min-height: 560px; max-height: none; padding: 0; border-radius: 0; overflow: hidden; background: #14100C !important; color: #fff; }
.ss .ss-hero.hs-on > :not(.hs-wrap):not(.hs-pill):not(.hs-text) { display: none !important; }

/* picture */
.hs-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #14100C; }
.hs-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: hspush 12s ease-out both; }
.hs-base { filter: grayscale(1) contrast(1.5) brightness(1.15); opacity: .85; }
.hs-col { -webkit-mask: linear-gradient(#000, #000) 0 0% / var(--b1) 18% no-repeat, linear-gradient(#000, #000) 100% 20% / var(--b2) 18% no-repeat, linear-gradient(#000, #000) 0 40% / var(--b3) 18% no-repeat, linear-gradient(#000, #000) 100% 60% / var(--b4) 18% no-repeat, linear-gradient(#000, #000) 0 80% / var(--b5) 18% no-repeat, linear-gradient(#000, #000) 100% 100% / var(--b6) 18% no-repeat; mask: linear-gradient(#000, #000) 0 0% / var(--b1) 18% no-repeat, linear-gradient(#000, #000) 100% 20% / var(--b2) 18% no-repeat, linear-gradient(#000, #000) 0 40% / var(--b3) 18% no-repeat, linear-gradient(#000, #000) 100% 60% / var(--b4) 18% no-repeat, linear-gradient(#000, #000) 0 80% / var(--b5) 18% no-repeat, linear-gradient(#000, #000) 100% 100% / var(--b6) 18% no-repeat; }
.hs-wrap.paint .hs-col { animation: hspush 12s ease-out both, hscolour 3.8s .5s ease-in-out both; }
/* colouring: six strokes fill the picture with colour, left to right then back, and a brush travels along them */
@property --b1 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --b2 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --b3 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --b4 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --b5 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --b6 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@keyframes hscolour {
  0% { --b1: 0%; --b2: 0%; --b3: 0%; --b4: 0%; --b5: 0%; --b6: 0%; }
  14% { --b1: 106%; --b2: 0%; }
  28% { --b2: 106%; --b3: 0%; }
  42% { --b3: 106%; --b4: 0%; }
  56% { --b4: 106%; --b5: 0%; }
  70% { --b5: 106%; --b6: 0%; }
  86%, 100% { --b1: 106%; --b2: 106%; --b3: 106%; --b4: 106%; --b5: 106%; --b6: 106%; }
}
.hs-brush { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.hs-brush svg { position: absolute; width: 30px; height: 96px; margin: -90px 0 0 -9px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); animation: hsbrx 3.8s .5s ease-in-out both; opacity: 0; }
@keyframes hsbrx { 0% { left: 0; top: 9%; opacity: 0; } 4% { opacity: 1; } 14% { left: 100%; top: 9%; } 28% { left: 0; top: 26%; } 42% { left: 100%; top: 42%; } 56% { left: 0; top: 59%; } 70% { left: 100%; top: 75%; } 86% { left: 20%; top: 92%; opacity: 1; } 100% { left: 50%; top: 104%; opacity: 0; } }
@keyframes hspush { from { transform: scale(1.1); } to { transform: scale(1); } }
.hs-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,12,.34) 0%, rgba(20,16,12,0) 18%, rgba(20,16,12,0) 70%, rgba(20,16,12,.16) 100%); }

/* top pill */
.hs-pill { position: absolute; z-index: 2; top: 62px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px 9px 12px; border-radius: 999px; background: rgba(20,16,12,.42); border: 1px solid rgba(255,255,255,.24); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); font: 700 12.5px/1 Inter, system-ui, sans-serif; letter-spacing: .02em; color: #fff; white-space: nowrap; animation: hsin .8s .1s cubic-bezier(.2,.8,.2,1) both; }
.hs-pill i { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #F6B10A, #E5487B); }
@keyframes hsin { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* text block, above the floating bottom menu */
.hs-text { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 118px; text-align: center; }
.hs-edge { display: none !important; position: absolute; left: -20px; top: -30px; width: calc(100% + 40px); height: 40px; overflow: visible; pointer-events: none; }
.hs-edge .s { fill: none; stroke-linecap: round; stroke-dasharray: 1; animation: hsdraw 1.4s cubic-bezier(.5,0,.2,1) both; }
.hs-edge .s1 { stroke: url(#hse1); stroke-width: 5; animation-delay: .5s; }
.hs-edge .s2 { stroke: url(#hse2); stroke-width: 4; animation-delay: .65s; }
.hs-edge .s3 { stroke: url(#hse3); stroke-width: 3.5; animation-delay: .8s; }
@keyframes hsdraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.ss .ss-hero.hs-on h1 { position: relative; left: auto; right: auto; top: auto; width: 100%; margin: 0; padding: 0; text-align: center; font: 800 clamp(23px, 6.8vw, 28px)/1.1 Inter, system-ui, sans-serif; letter-spacing: -.03em; color: #fff; text-shadow: 0 2px 5px rgba(0,0,0,.5), 0 4px 24px rgba(0,0,0,.4); filter: drop-shadow(0 2px 12px rgba(0,0,0,.6)); text-wrap: balance; transform: none !important; }
.hs-on h1 .w { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(14px); animation: hsw .8s calc(.45s + var(--i) * .07s) cubic-bezier(.2,.8,.2,1) forwards; }
.hs-on h1 .w.g { background: linear-gradient(90deg, #FFD25A, #FFA94D 55%, #FF86A3); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; text-shadow: none; }
@keyframes hsw { to { opacity: 1; filter: blur(0); transform: none; } }
.hs-sub { margin: 10px 0 0; font: 500 14px/1.4 Inter, system-ui, sans-serif; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6), 0 2px 16px rgba(0,0,0,.45); animation: hsin .8s 1.3s cubic-bezier(.2,.8,.2,1) both; }
.hs-dots { display: flex; justify-content: center; margin-top: 6px; animation: hsin .8s 1.5s cubic-bezier(.2,.8,.2,1) both; }
.hs-dots i { position: relative; display: block; width: 13px; height: 27px; cursor: pointer; transition: width .4s; -webkit-tap-highlight-color: transparent; }
.hs-dots i::before { content: ""; position: absolute; left: 3px; right: 3px; top: 10px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.45); }
.hs-dots i.on { width: 32px; }
.hs-dots i.on::before { background: linear-gradient(90deg, #F6B10A, #E5487B); }
@media (max-height: 700px) { .hs-sub { display: none; } .hs-text { bottom: 104px; } }
@media (prefers-reduced-motion: reduce) {
  .hs-brush { display: none; }
  .hs-col { --b1: 106%; --b2: 106%; --b3: 106%; --b4: 106%; --b5: 106%; --b6: 106%; }
  .hs-wrap img, .hs-wrap.paint .hs-col, .hs-edge .s, .hs-pill, .hs-sub, .hs-dots { animation: none !important; }
  .hs-on h1 .w { animation: none !important; opacity: 1; filter: none; transform: none; }
}

.hs-text .ss-side { display: none; }
/* ---- desktop: the same painted opening as a rounded card under the header (the phone design, sized for a wide screen) ---- */
@media (min-width: 761px) {
  html.ss-on .ss .ss-hero.hs-on { width: auto !important; margin: 8px 0 28px !important; height: min(calc(100svh - 104px), 820px) !important; min-height: 560px; border-radius: 32px; background: #F4EDE4 !important; isolation: isolate; }
  html.ss-on .ss .ss-hero.hs-on .hs-wrap { background: transparent; border-radius: inherit; }
  /* a soft blurred copy of the picture fills the card; the sharp portrait sits in the middle */
  html.ss-on .hs-wrap::before { content: ''; position: absolute; inset: -60px; background: var(--hs-img) center / cover no-repeat; filter: blur(46px) saturate(1.5) brightness(.96); transform: scale(1.15); opacity: .95; transition: opacity .6s; }
  html.ss-on .hs-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,250,240,.10), rgba(20,16,12,.18)); }
  html.ss-on .hs-wrap img { inset: 0 5% auto auto; translate: none; width: auto; height: 100%; max-width: none; aspect-ratio: 3 / 4; object-fit: cover; z-index: 1; }
  html.ss-on .hs-wrap .hs-base { box-shadow: 0 0 90px rgba(20,16,12,.35); }
  html.ss-on .hs-wrap .hs-brush { z-index: 2; left: auto; right: 5%; width: auto; height: 100%; aspect-ratio: 3 / 4; translate: none; }
  html.ss-on .hs-wrap .hs-shade { z-index: 2; background: linear-gradient(90deg, rgba(20,16,12,.62) 0%, rgba(20,16,12,.34) 38%, rgba(20,16,12,0) 58%), linear-gradient(180deg, rgba(20,16,12,.22) 0%, rgba(20,16,12,0) 22%, rgba(20,16,12,0) 70%, rgba(20,16,12,.3) 100%); }
  html.ss-on .hs-wrap .hs-shade { background: linear-gradient(180deg, rgba(20,16,12,.30) 0%, rgba(20,16,12,0) 22%, rgba(20,16,12,0) 52%, rgba(20,16,12,.62) 100%); }
  html.ss-on .ss-hero.hs-on .hs-pill { top: 28px; left: 6%; transform: none; }
  html.ss-on .ss-hero.hs-on .hs-text { left: 6%; right: auto; width: min(560px, 44%); top: 50%; bottom: auto; translate: 0 -46%; text-align: left; }
  html.ss-on .ss .ss-hero.hs-on h1 { font-size: clamp(34px, 3.5vw, 56px); text-align: left; }
  html.ss-on .ss-hero.hs-on .hs-sub { font-size: 16px; margin-top: 14px; }
  html.ss-on .ss-hero.hs-on .hs-dots { justify-content: flex-start; margin-top: 10px; }
  /* the two buttons the phone leaves to its bottom menu */
  html.ss-on .ss .ss-hero.hs-on .hs-text .ss-side { display: flex; position: static; width: auto; opacity: 1; animation: none; margin-top: 22px; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 12px; }
  html.ss-on .ss .ss-hero.hs-on .ss-join { color: #16202C; background: rgba(255,255,255,.94); padding: 10px 22px 10px 10px; border-radius: 999px; box-shadow: 0 10px 28px rgba(0,0,0,.28); font-size: 15px; transition: transform .25s, box-shadow .25s; }
  html.ss-on .ss .ss-hero.hs-on .ss-join:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.34); }
  html.ss-on .ss .ss-hero.hs-on .ss-join[data-go="stories"] { background: linear-gradient(135deg, #FFC24A, #F2662A); color: #2A0F2E; }
}
