/* ==========================================================================
   Kosht website: fonts and colour tokens
   Everything is self-hosted (no Google Fonts), so no visitor IP goes to a third party.
   ========================================================================== */

/* ---------- Fonts ---------- */
/* Headlines (Fixel Display) */
@font-face { font-family: "Fixel Display"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/FixelDisplay-Regular.woff2") format("woff2"); }
@font-face { font-family: "Fixel Display"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/FixelDisplay-Medium.woff2") format("woff2"); }
@font-face { font-family: "Fixel Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/FixelDisplay-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Fixel Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/FixelDisplay-Bold.woff2") format("woff2"); }
/* Large running text (Fixel Text) */
@font-face { font-family: "Fixel Text"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/FixelText-Regular.woff2") format("woff2"); }
@font-face { font-family: "Fixel Text"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/FixelText-Medium.woff2") format("woff2"); }
@font-face { font-family: "Fixel Text"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/FixelText-SemiBold.woff2") format("woff2"); }
/* Body and UI text (Inter, variable) */
@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("assets/fonts/Inter-Variable.woff2") format("woff2"); }
/* The app's own fonts, used on the cards and screens drawn from the app */
@font-face { font-family: "Unione"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/Unione-Bold-Rounded.ttf") format("truetype"); }
@font-face { font-family: "ABeeZee"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/ABeeZee-Regular.ttf") format("truetype"); }
@font-face { font-family: "Mako"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/Mako-Regular.ttf") format("truetype"); }

:root {
  /* ---------- Font tokens ---------- */
  --font-display: "Fixel Display", "Inter", -apple-system, system-ui, sans-serif;   /* headlines, big numbers in headings */
  --font-text:    "Fixel Text", "Inter", -apple-system, system-ui, sans-serif;      /* large intro text (hero subtitle) */
  --font-body:    "Inter", -apple-system, system-ui, sans-serif;                    /* paragraphs, nav, buttons, footer */
  --font-num:     "Unione", "Fixel Display", system-ui, sans-serif;                 /* amounts and prices (app style) */
  --font-app:     "ABeeZee", "Inter", system-ui, sans-serif;                        /* app screens and cards */
  --font-app-alt: "Mako", "Inter", system-ui, sans-serif;                           /* small app labels */

  /* ---------- Brand colours ---------- */
  --bg:            #212121;   /* page background */
  --bg-deep:       #0D0C0C;   /* app dark background, deep shadows */
  --navy:          #113457;   /* brand */
  --navy-soft:     #185088;   /* brand soft */
  --blue:          #0B78E4;   /* accent */
  --blue-light:    #8CC5FF;   /* accent soft: underline, highlights, links on dark */
  --blue-glow:     #1D63B8;   /* mid blue used in the gradients */

  /* ---------- Neutrals ---------- */
  --white:         #FFFFFF;
  --grey-panel:    #D9D9D9;   /* light panel (Privacy) */
  --grey-card:     #4A4A4A;   /* Free half of the pricing shape */
  --grey-logo:     #363636;   /* big KOSHT in the footer */
  --text:          #FFFFFF;   /* primary text on dark */
  --text-muted:    #B4B4B4;   /* secondary text on dark */
  --text-faint:    #8C8C8C;   /* tertiary text on dark */
  --text-dark:     #000000;   /* primary text on light panels */
  --text-dark-muted: #636363; /* secondary text on light panels */

  /* ---------- App status colours (for demo elements) ---------- */
  --income:        #3DD69A;
  --expense:       #E0354B;
  --warning:       #E08C1A;

  /* ---------- Gradients (the site's signature glow) ---------- */
  --glow-hero: radial-gradient(70% 60% at 50% 38%, rgba(11,120,228,.95) 0%, rgba(14,76,150,.8) 40%, rgba(17,52,87,.55) 66%, rgba(33,33,33,0) 90%);
  --glow-plus: radial-gradient(120% 100% at 90% 0%, #8CC5FF 0%, #4f9cf0 38%, #1c63b8 100%);

  /* ---------- Shape ---------- */
  --radius-panel: 48px;
  --radius-pill: 999px;
}

/* ---------- Page transitions (cross-document View Transitions, no JS) ---------- */
/* the header never blinks: it is its own layer, so only its links change; the page itself fades and rises a few pixels */
@view-transition{
  navigation: auto;
}

#siteHeader{
  view-transition-name: site-header;
}

#siteHeader nav{
  view-transition-name: site-nav;
}

@media (prefers-reduced-motion: no-preference){
  ::view-transition-group(root){
    animation-duration: .45s;
  }

  ::view-transition-old(root){
    animation: vt-out .22s cubic-bezier(.4, 0, 1, 1) both;
  }

  ::view-transition-new(root){
    animation: vt-in .45s cubic-bezier(.2, .8, .2, 1) .08s both;
  }

  /* the header is the same size on all pages, only the link labels swap: a very short crossfade, no movement */
  ::view-transition-group(site-header){
    animation-duration: .01s;
  }

  ::view-transition-old(site-header),
  ::view-transition-new(site-header){
    animation-duration: .18s;
    animation-timing-function: ease-out;
  }

  /* the link labels swap on their own layer: the old ones soften away (smaller, blurred), the new ones settle in */
  ::view-transition-group(site-nav){
    animation-duration: .01s;
  }

  ::view-transition-old(site-nav){
    animation: vt-nav-out .22s ease-in both;
  }

  ::view-transition-new(site-nav){
    animation: vt-nav-in .4s cubic-bezier(.2, .8, .2, 1) .08s both;
  }
}

@media (prefers-reduced-motion: reduce){
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*){
    animation: none !important;
  }
}

@keyframes vt-out{
  to{ opacity: 0; transform: translateY(-8px); }
}

@keyframes vt-nav-out{
  to{ opacity: 0; transform: scale(.94); filter: blur(3px); }
}

@keyframes vt-nav-in{
  from{ opacity: 0; transform: scale(.94); filter: blur(3px); }
}

@keyframes vt-in{
  from{ opacity: 0; transform: translateY(14px); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4{font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance;}

p{margin: 0; text-wrap: pretty;}

img, svg, video, canvas{display: block; max-width: 100%;}
a{color: inherit;}

button{font: inherit; color: inherit;}
:focus-visible{outline: 2px solid var(--blue-light); outline-offset: 3px;}
@media (prefers-reduced-motion: reduce){ html{scroll-behavior: auto;}}

header{
  --glass-bg: rgb(24 24 24 / .26);
  --glass-edge: rgb(255 255 255 / .2);
  position: fixed;
  top: 20px;
  /* centred with auto margins (not left: 50%, which would give the shrink-to-fit width only half of the window) */
  left: 0;
  right: 0;
  margin-inline: auto;
  z-index: 100;
  width: fit-content;
  max-width: calc(100vw - 24px);
  padding: 6px 6px 6px 22px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background-color: transparent;
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease, -webkit-backdrop-filter .35s ease, backdrop-filter .35s ease;
}

header.is-compact{
  background-color: var(--glass-bg);
  border-color: var(--glass-edge);
  box-shadow: 0 10px 34px rgb(0 0 0 / .22);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

/* arriving from a scrolled page: the header is drawn compact from the very first frame (js/header.js then expands it) */
html.hdr-carry header{
  gap: 28px;
  padding-left: 16px;
  background-color: var(--glass-bg);
  border-color: var(--glass-edge);
  box-shadow: 0 10px 34px rgb(0 0 0 / .22);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

html.hdr-carry header .logo{
  width: 15px;
}

header a{
  text-decoration: none;
}

header .logo{
  flex-shrink: 0;
  display: block;
  width: 80px;
  overflow: hidden;

  & svg{
    width: 80px;
    max-width: none;
    height: auto;
    display: block;
  }
}

nav ul{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 13.5rem; /* the same width on every page, so the header capsule keeps its size when the links change */
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav ul li a{
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgb(255 255 255 / .88);
  transition: color .2s ease-in-out;
  display: inline-block;

  &:hover{
    color: var(--white);
  }
}

nav ul li a[aria-current="page"]{
  color: var(--white);
}

header .dwnBtn{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  height: 46px;
  padding: 0 22px 0 18px;
  background-color: var(--white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  transition: all .2s ease;

  & svg{
    width: 15px;
    height: auto;
    display: block;
  }

  &:hover{background-color: #E6EDF6;}
  &:active{transform: scale(0.9);}
}

@media (max-width: 700px){
  header{
    gap: clamp(16px, 4.4vw, 28px);
    padding-left: 18px;
  }

  header .logo,
  header .logo svg{
    width: 80px;
  }

  nav ul{
    gap: clamp(14px, 3.4vw, 22px);
  }

  nav ul li a{
    font-size: .9375rem;
  }
}

@media (max-width: 560px){
  nav{
    display: none;
  }
}

.hero{
  position: relative;
  isolation: isolate;
  min-height: max(100svh, 640px);
  padding: clamp(88px, min(8.3vw, 11.7vh), 120px) 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-x: clip;
}

.hero-glow{
  position: absolute;
  top: 0;
  left: 50%;
  width: max(1440px, 100%);
  max-width: none;
  aspect-ratio: 1440 / 1423;
  height: auto;
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}

.hero h1{
  max-width: 860px;
  font-size: clamp(44px, min(6.95vw, 9.8vh), 100px);
  line-height: 1;
  letter-spacing: -.01em;
}

.hero h1 .line{
  display: inline-block;
}

.hero .mark{
  position: relative;
  display: inline-block;
}

.hero .mark::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -.04em;
  width: 100%;
  aspect-ratio: 273 / 18;
  background: url("assets/underline.svg") center / 100% 100% no-repeat;
}

.hero-sub{
  max-width: 825px;
  margin-top: min(28px, 2.7vh);
  font-family: var(--font-text);
  font-size: clamp(17px, min(1.74vw, 2.44vh), 25px);
  line-height: 1.17;
  color: rgb(255 255 255 / .86);
}

.btn-store{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 47px;
  margin-top: min(36px, 3.5vh);
  padding: 0 26px 0 20px;
  background-color: var(--white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: background-color .2s ease-in-out;

  & svg{
    width: 15px;
    height: auto;
    display: block;
  }

  &:hover{background-color: #E6EDF6;}

  transition: all .2s ease;

  & svg{
    width: 15px;
    height: auto;
    display: block;
  }

  &:active{transform: scale(0.9);}
}

@media (max-width: 700px){
  .hero-sub{
    margin-top: 24px;
  }

  .btn-store{
    margin-top: 36px;
  }
}

#phone-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease;
}

#phone-canvas.is-ready{
  opacity: 1;
}

.phone-anchor{
  width: min(430px, 66vw, 43vh);
  aspect-ratio: 461 / 912;
  margin-top: 28px;
  flex-shrink: 0;
  pointer-events: none;
}

.no-webgl #phone-canvas{
  display: none;
}

.feature{
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  column-gap: clamp(24px, 6vw, 96px);
  padding: 8svh clamp(24px, 13.6vw, 196px);
}

.feature::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(38% 46% at 27% 50%, rgb(17 52 87 / .55), rgb(17 52 87 / 0) 72%);
  pointer-events: none;
}

#goals{
  padding-bottom: 0;
}

.feature--flip::before{
  background: radial-gradient(38% 46% at 73% 50%, rgb(17 52 87 / .55), rgb(17 52 87 / 0) 72%);
}

.feature .phone-anchor{
  width: min(436px, 100%, 44svh);
  margin: 0;
  justify-self: center;
}

.feature--flip .phone-anchor{
  order: 2;
}

.feature-text{
  max-width: 450px;
  font-family: var(--font-text);
  font-size: clamp(18px, 1.67vw, 24px);
  line-height: 1.2;
  color: var(--text-muted);
}

/* the lead sentence is a real h2 (document outline for search engines) that reads inline with the paragraph */
.feature-text h2,
.feature-text p{
  display: inline;
  font: inherit;
  letter-spacing: inherit;
}

.feature-text h2{
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 820px){
  .feature{
    grid-template-columns: 1fr;
    row-gap: 32px;
    padding: 12svh 24px;
  }

  .feature .phone-anchor,
  .feature--flip .phone-anchor{
    order: 2;
    width: min(300px, 70vw);
  }

  .feature-text{
    order: 1;
    max-width: 520px;
    /* the body copy fades under the phone (set by phone.js), the bold lead stays */
    color: color-mix(in srgb, var(--text-muted) calc(var(--fade, 1) * 100%), transparent);
  }

  #goals .phone-anchor{
    order: 1;
  }

  #goals .feature-text{
    order: 2;
  }
}

.vira{
  position: relative;
  background: var(--bg);
  overflow-x: clip; /* the glow may spill above and below the section (soft fade), but never sideways */
}

.vira-stage{
  position: relative;
  height: 100svh;
  min-height: 640px;
}

.vira-glow-wrap{
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(1440px, 100%);
  aspect-ratio: 1440 / 928;
  transform: translate(-52.083%, -55.819%);
  pointer-events: none;
}

.vira-glow{
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  transform-origin: 52.083% 55.819%;
}

.vira-mascot{
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(260px, 27vw, 400px);
  transform: translate(-50%, -50%);
}

.vira-mascot img{
  width: 100%;
  height: auto;
}

.vira-title{
  position: absolute;
  z-index: 2;
  top: clamp(40px, 8svh, 96px);
  left: 0;
  right: 0;
  padding: 0 16px;
  text-align: center;
  font-size: clamp(42px, 6.1vw, 88px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff 35%, rgb(255 255 255 / .4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.vira-texts{
  display: contents;
}

.vira-copy{
  position: absolute;
  z-index: 2;
  width: min(24vw, 340px);
  font-family: var(--font-text);
  font-size: clamp(16px, 1.67vw, 24px);
  line-height: 1.2;
  color: rgb(255 255 255 / .92);
}

.vira-copy strong{
  font-weight: 600;
  color: var(--white);
}

.vira-copy--r{
  right: clamp(24px, 6.4vw, 92px);
  top: 30svh;
  text-align: right;
}

.vira-copy--l{
  left: clamp(24px, 6.4vw, 92px);
  bottom: 12svh;
}

.vira-fine{
  position: absolute;
  z-index: 2;
  right: clamp(24px, 6.4vw, 92px);
  bottom: 12svh;
  white-space: nowrap;
  text-align: right;
  font-size: 14px;
  line-height: 1.5;
  color: rgb(255 255 255 / .86);
}

.vira-fine a{
  color: var(--white);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* empty anchor: the 3D phone (phone.js) is drawn on top of it, GSAP moves it with the scroll */
.vp{
  --vp-h: min(74svh, 780px);
  position: absolute;
  left: 50%;
  top: 50%;
  height: var(--vp-h);
  aspect-ratio: 461 / 912;
  margin-left: calc(var(--vp-h) * 461 / 912 / -2);
  transform: translateY(-46%);
  pointer-events: none;
}

.vira--static .vira-stage{
  height: auto;
  min-height: 0;
  padding: 18svh 0 12svh;
}

.vira--static .vira-glow-wrap,
.vira--static .vira-mascot{
  display: none;
}

@media (max-width: 820px){
  .vira-title{
    top: 11svh;
    font-size: 40px;
  }

  .vira-copy{
    width: auto;
    font-size: 15px;
  }

  .vira-texts{
    position: absolute;
    z-index: 2;
    left: 20px;
    right: 20px;
    bottom: 5svh;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .vira-texts .vira-copy,
  .vira-texts .vira-fine{
    position: static;
  }

  .vira-copy--r{
    text-align: left;
  }

  .vira-fine{
    margin-top: 6px;
    text-align: left;
    font-size: min(11px, 2.55vw);
  }

  .vira-mascot{
    width: clamp(280px, 78vw, 340px);
  }

  .vp{
    --vp-h: min(78svh, 150vw);
    top: 57%;
  }
}

/* ---------- Pricing ---------- */
/* one glass shape: the toggle and the download button grow out of it like tabs (the shape itself is the SVG mask, see js/pricing.js) */
.pricing{
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 8vw, 130px) clamp(16px, 3vw, 48px) clamp(90px, 8vw, 130px);
}

.pr-stage{
  position: relative;
  width: min(100%, 1245px);
  margin: 0 auto;
}

.pr-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

.pr-content{
  position: relative;
  z-index: 1;
}

.pr-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
}

.pr-head > div:first-child{
  margin-bottom: 32px;
}

.pricing h2{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--text);
}

.pr-sub{
  max-width: 62ch;
  margin-top: 14px;
  font-family: var(--font-text);
  font-size: clamp(15px, 1.5vw, 21px);
  line-height: 1.4;
  color: #d4dde8;
}

.pr-sw{
  position: relative;
  display: inline-flex;
  flex: none;
  margin: 0 clamp(40px, 10.7vw, 154px) 6px 0;
  padding: 5px;
  border-radius: 999px;
}

.pr-sw button{
  position: relative;
  z-index: 1;
  padding: 9px 22px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-family: var(--font-text);
  font-size: clamp(17px, 1.8vw, 26px);
  font-weight: 500;
  color: #e8f0fa;
  cursor: pointer;
  transition: color .25s;
}

.pr-sw button[aria-pressed="true"]{
  color: #0b2036;
}

.pr-sw button:focus-visible,
.pr-dl a:focus-visible{
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
}

.pr-pill{
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 5px;
  border-radius: 999px;
  background: var(--blue-light);
}

.pr-panel{
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 64px;
  padding: clamp(36px, 4.2vw, 56px) clamp(28px, 4.4vw, 62px) clamp(60px, 6vw, 84px);
}

.pr-panel::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  height: 46%;
  width: 1px;
  background: rgb(255 255 255 / .7);
}

.pr-plan{
  min-width: 0;
}

.pr-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pricing h3{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--text);
}

.pr-note{
  margin-top: 6px;
  font-family: var(--font-text);
  font-size: clamp(13px, 1.15vw, 16px);
  line-height: 1.4;
  color: #e3ebf5;
}

.pr-note s{
  margin-left: 4px;
  font-weight: 600;
  opacity: .75;
}

/* both price boxes have the same size, the amount fills its box and the currency sign sits on the baseline */
.pr-price{
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-width: 2.35em;
  font-family: var(--font-num);
  font-size: clamp(46px, 6.2vw, 88px);
  line-height: .78;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--text);
}

.pr-price .n,
.pr-price .c,
.pr-price .d{
  display: inline-block; /* a short line box of its own, so the text selection hugs the digits */
  line-height: .92;
}

.pr-price .n{
  font-size: 1em;
  overflow: hidden; /* the selection highlight is clipped to this short box, not to the font's tall metrics */
}

.pr-price .d{
  font-size: .5em;
}

.pr-price .c{
  margin-right: 2px;
  font-size: .52em;
  vertical-align: baseline;
}

.pricing ul{
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.pricing li{
  position: relative;
  padding-left: 28px;
  font-family: var(--font-text);
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.4;
  color: var(--text);
}

.pricing li::before{
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 15px;
  height: 9px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(.82);
  transform-origin: 30% 60%;
}

.pricing li b{
  font-weight: 600;
}

.pr-dl{
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: -28px;
  padding-bottom: 6px;
}

.pr-dl a{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px 0 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 34px rgb(3 18 40 / .35);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease-in-out, transform .2s ease;

  &:hover{ background-color: #E6EDF6; }
  &:active{ transform: scale(0.9); }
}

.pr-dl svg{
  width: 19px;
  height: 19px;
}

.pr-more{
  position: relative;
  z-index: 3; /* above the download tab's wrapper, so the text and the link are never covered */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
  margin: 26px 8px 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: #c5d1df;
}

.pr-more a{
  color: #fff;
  text-underline-offset: 4px;
}

/* desktop: the two lines sit right under the panel, on both sides of the download tab */
@media (min-width: 821px){
  .pr-more{
    margin-top: -16px;
  }
}

@media (max-width: 820px){
  .pricing{
    padding: 80px 16px 90px;
  }

  .pr-head{
    flex-direction: column;
    align-items: flex-start;
  }

  .pr-sw{
    align-self: center;
    margin: 6px 0 0;
  }

  .pr-panel{
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 34px 24px 62px;
  }

  .pr-panel::before{
    display: none;
  }

  .pr-more{
    margin: 22px 4px 0;
  }
}

@media (prefers-reduced-motion: reduce){
  .pr-sw button{
    transition: none;
  }
}

/* ---------- CTA: Take control of your money ---------- */
.cta{
  position: relative;
  height: 1100px;
  overflow: hidden;
  background: var(--bg);
}

/* the section is a panel with big rounded bottom corners, the grain gradient (Figma SVG) fills it */
.cta{
  border-radius: 0 0 clamp(64px, 21vw, 300px) clamp(64px, 21vw, 300px);
}

.cta-aurora{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover; /* same crop as the old SVG's preserveAspectRatio slice */
  object-position: 50% 50%;
  pointer-events: none;
}

/* ---------- Analytics consent banner (js/analytics.js) ---------- */
.consent{
  position: fixed;
  z-index: 120;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px 22px;
  flex-wrap: wrap;
  width: min(560px, calc(100vw - 32px));
  padding: 16px 16px 16px 22px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 28px;
  background: rgb(36 36 38 / .78);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 18px 50px rgb(0 0 0 / .35);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.consent.is-in{
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.consent p{
  flex: 1 1 260px;
}

.consent a{
  color: var(--text);
  text-underline-offset: 3px;
}

.consent-actions{
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.consent button{
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / .12);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background-color .2s ease-in-out, transform .2s ease;
}

.consent button:hover{
  background: rgb(255 255 255 / .2);
}

.consent button.is-primary{
  background: #fff;
  color: #000;
}

.consent button.is-primary:hover{
  background: #E6EDF6;
}

.consent button:active{
  transform: scale(0.9);
}

@media (prefers-reduced-motion: reduce){
  .foot-langmenu,
  .foot-chev{
    transition: none;
  }

  .consent{
    transition: none;
  }
}

/* ---------- Legal pages (Privacy Policy, Terms, Credits) ---------- */
.legal{
  position: relative;
  padding: clamp(120px, 14vw, 200px) clamp(20px, 4.6vw, 66px) clamp(72px, 9vw, 130px);
}

.legal-hero,
.legal-grid{
  width: min(100%, 1180px);
  margin-inline: auto;
}

.legal h1{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8.4vw, 120px);
  line-height: .98;
  letter-spacing: -.02em;
  color: var(--text);
}

.legal-date{
  margin-top: 22px;
  font-family: var(--font-text);
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-faint);
}

.legal-lead{
  max-width: 44ch;
  margin-top: 28px;
  font-family: var(--font-text);
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.25;
  color: var(--text-muted);
}

.legal-grid{
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(56px, 8vw, 110px);
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid rgb(255 255 255 / .12);
}

/* contents: sticky beside the text on desktop */
.legal-toc{
  position: sticky;
  top: 112px;
  align-self: start;
  font-family: var(--font-text);
}

.legal-toc summary{
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  cursor: pointer;
  list-style: none;
}

.legal-toc summary::-webkit-details-marker{
  display: none;
}

/* desktop: the contents are a fixed list, not a toggle */
@media (min-width: 901px){
  .legal-toc summary{
    pointer-events: none;
    cursor: default;
  }
}

.legal-toc ol{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal-toc li{
  counter-increment: toc;
}

.legal-toc a{
  display: flex;
  gap: 12px;
  padding: 7px 0;
  font-size: 17px;
  line-height: 1.3;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.legal-toc a::before{
  content: counter(toc);
  min-width: 1.2em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.legal-toc a:hover,
.legal-toc a.is-active{
  color: var(--text);
}

.legal-toc a.is-active::before{
  color: var(--blue-light);
}

.legal-body{
  max-width: 740px;
  font-family: var(--font-text);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
}

.legal-body section{
  scroll-margin-top: 110px;
  padding-bottom: clamp(36px, 5vw, 64px);
}

.legal-body h2{
  display: flex;
  align-items: baseline;
  gap: .5em;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--text);
}

.legal-n{
  min-width: 1.1em;
  color: var(--blue-light);
  font-variant-numeric: tabular-nums;
}

.legal-body h3{
  display: flex;
  align-items: baseline;
  gap: .6em;
  margin: 34px 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  color: var(--text);
}

.legal-l{
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.5em;
  height: 1.5em;
  border: 1px solid rgb(140 197 255 / .5);
  border-radius: 50%;
  font-size: .72em;
  font-weight: 600;
  color: var(--blue-light);
}

.legal-body p + p,
.legal-body p + ul,
.legal-body ul + p{
  margin-top: 14px;
}

.legal-body ul{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.legal-body li{
  position: relative;
  padding-left: 22px;
}

.legal-body li::before{
  content: "";
  position: absolute;
  left: 0;
  top: .66em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-light);
}

.legal-body strong{
  font-weight: 600;
  color: var(--text);
}

.legal-body a{
  color: var(--text);
  text-decoration-color: rgb(140 197 255 / .6);
  text-underline-offset: 4px;
}

.legal-body a:hover{
  text-decoration-color: var(--blue-light);
}

/* unfinished placeholders in a draft: loud on purpose, a page with these must not be published */
.legal-tbd{
  padding: 1px 6px;
  border-radius: 6px;
  background: #ffd60a;
  color: #000;
}

@media (max-width: 900px){
  .legal-grid{
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .legal-toc{
    position: static;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgb(255 255 255 / .06);
  }

  .legal-toc summary{
    margin-bottom: 0;
  }

  .legal-toc details[open] summary{
    margin-bottom: 12px;
  }
}

/* ---------- Footer ---------- */
.foot{
  padding: clamp(24px, 3vw, 48px) clamp(16px, 4.6vw, 66px) clamp(28px, 3vw, 44px);
  background: var(--bg);
}

.foot-mark{
  aspect-ratio: 895 / 348;
  width: 100%;
  background: var(--grey-logo);
  -webkit-mask: url("assets/kosht-wordmark.svg") center / 100% 100% no-repeat;
  mask: url("assets/kosht-wordmark.svg") center / 100% 100% no-repeat;
}

.foot-row{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 36px;
  margin-top: clamp(28px, 4vw, 56px);
  font-family: var(--font-text);
  font-size: clamp(15px, 1.4vw, 20px);
  color: var(--text-muted);
}

.foot-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(20px, 2.8vw, 40px);
}

.foot-row a{
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

.foot-row a:hover,
.foot-row a:focus-visible{
  color: var(--text);
}

.foot-tools{
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.foot-langpick{
  position: relative;
}

.foot-lang{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 14px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 999px;
  background: none;
  font-family: var(--font-text);
  font-size: .85em;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}

.foot-lang:hover,
.foot-lang[aria-expanded="true"]{
  color: var(--text);
  border-color: rgb(255 255 255 / .4);
}

.foot-lang svg{
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot-chev{
  width: 16px !important;
  height: 16px !important;
  transition: transform .25s ease;
}

.foot-lang[aria-expanded="true"] .foot-chev{
  transform: rotate(180deg);
}

/* the menu opens upwards (the footer is the last thing on the page) and fades in */
.foot-langmenu{
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 22px;
  background: rgb(44 44 46 / .86);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 18px 50px rgb(0 0 0 / .4);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transform-origin: 100% 100%;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.foot-langmenu:not([hidden]){
  display: block;
}

.foot-langmenu.is-open{
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.foot-langmenu a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .9em;
  white-space: nowrap;
  color: var(--text-muted);
}

.foot-langmenu a:hover,
.foot-langmenu a:focus-visible{
  background: rgb(255 255 255 / .1);
  color: var(--text);
}

.foot-langmenu a[aria-current="true"]{
  color: var(--text);
}

.foot-langmenu a[aria-current="true"]::after{
  content: "";
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--blue-light);
  border-bottom: 2px solid var(--blue-light);
  transform: rotate(-45deg) translateY(-2px);
}

.foot-social{
  display: flex;
  gap: 20px;
}

.foot-ico{
  display: block;
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

.foot-threads{ --ico: url("assets/threads.svg"); }
.foot-x{ --ico: url("assets/x.svg"); }

/* phones: the links become a two-column list (easy to tap), the copyright and the socials share the last line */
@media (max-width: 820px){
  .foot-row{
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "nav nav" "copy tools";
    align-items: center;
    gap: 28px 16px;
    margin-top: 32px;
    font-size: 17px;
  }

  .foot-nav{
    display: grid;
    grid-area: nav;
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
  }

  .foot-copy{
    grid-area: copy;
    font-size: 15px;
    color: var(--text-faint);
  }

  .foot-tools{
    grid-area: tools;
    gap: 14px;
    margin-left: 0;
  }

  .foot-social{
    gap: 14px;
  }
}

/* a 1440 x 1100 canvas, scaled down on narrower screens (js/cta.js sets --k) */
.cta-stage{
  position: absolute;
  left: 50%;
  top: 0;
  width: 1440px;
  height: 1100px;
  transform: translateX(-50%) scale(var(--k, 1));
  transform-origin: 50% 0;
}

.cta-copy{
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: 352px;
  text-align: center;
}

.cta h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 76px;
  line-height: 1.04;
  letter-spacing: -.028em;
  color: var(--text);
}

.cta h2 em{
  position: relative;
  font-style: italic;
  font-weight: 700;
}

.cta-sub{
  margin-top: 22px;
  font-family: var(--font-text);
  font-size: 22px;
  color: #cfe3f7;
  opacity: .9;
}

.cta-actions{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
}

.cta-store{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 28px 0 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 40px rgb(3 18 40 / .4);
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  transition: background-color .2s ease-in-out, transform .2s ease;

  &:hover{ background-color: #E6EDF6; }
  &:active{ transform: scale(0.9); }
}

.cta-store svg{
  width: 24px;
  height: 24px;
}


/* floating app elements: the wrapper holds position and pointer depth, the image holds the pose and the float */
.cta-it{
  position: absolute;
  z-index: var(--z, 2);
  left: var(--x);
  top: var(--y);
  translate: var(--px, 0px) var(--py, 0px);
  pointer-events: none;
}

.cta-it img{
  display: block;
  width: var(--w);
  max-width: none;
  height: auto;
  opacity: var(--o, 1);
  transform: rotate(var(--r, 0deg));
  transform-origin: 0 0;
  filter: blur(var(--b, 0px)) drop-shadow(0 24px 44px rgb(3 18 40 / .45));
  animation: cta-float var(--dur, 7s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes cta-float{
  from{ translate: 0 -7px; }
  to{ translate: 0 8px; }
}

@media (prefers-reduced-motion: reduce){
  .cta-it img{
    animation: none;
  }
}

/* phones: copy first, then a small stack of the app's pieces */
@media (max-width: 820px){
  .cta{
    height: auto;
    padding: 72px 0 80px;
  }

  .cta-stage{
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    width: auto;
    height: auto;
    transform: none;
  }

  .cta-copy{
    position: static;
    order: 1;
    padding: 44px 20px;
  }

  .cta h2{
    font-size: 44px;
  }

  .cta-sub{
    font-size: 18px;
  }

  .cta-it{
    position: static;
    order: 2;
    translate: none;
  }

  /* the copy sits between two app pieces: one above, the rest below */
  .cta-it.top{
    order: 0;
  }

  .cta-it:not(.m){
    display: none;
  }

  .cta-it img{
    width: min(var(--w), 86vw);
    height: auto;
    transform: none;
    animation: none;
    filter: drop-shadow(0 16px 30px rgb(3 18 40 / .4));
  }
}

/* ---------- FAQ: a chat that writes itself with the scroll ---------- */
.faq{
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.faq-stage{
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100svh;
  min-height: 640px;
  padding: 0 24px;
}

.faq-wrap{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 1040px;
  min-height: 0;
  margin: 0 auto;
}

.faq-head{
  margin-bottom: clamp(28px, 6vh, 64px);
}

/* same title style as the other sections (Fixel Display, regular, sentence case) */
.faq-title{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8.4vw, 120px);
  line-height: .98;
  letter-spacing: -.02em;
  color: var(--text);
}

.faq-title span{
  display: block;
}

.faq-l2{
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .22em;
}
/* the dim word: the brand gradient sweeps over it with the scroll (background-size is driven by GSAP, fully filled when static) */
.faq-title em{
  padding-right: .04em;
  font-style: normal;
  color: rgb(140 197 255 / .2);
  background: linear-gradient(90deg, #8CC5FF 0%, #0B78E4 100%) no-repeat left center / 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

/* the chat window: bubbles are laid out once, GSAP reveals them and slides the thread up like a real chat */
.faq-chat{
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 96px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 96px, #000 calc(100% - 28px), transparent 100%);
}

.faq-thread{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(84px, 13vh, 128px) 0 40px;
  will-change: transform;
}

.faq-qa{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-row{
  position: relative;
  display: flex;
}

.faq-row.vi{
  justify-content: flex-end;
}

.faq-bub{
  /* every bubble is a full pill: --r is half the bubble's height (js/faq.js keeps it up to date; 999px without js).
     The corner next to the author on the newest message shrinks to --tail-r: --t goes 0 -> 1 (js/faq.js). */
  --r: 999px;
  --tail-r: 16px;
  --t: 0;
  --tail: calc(var(--r) - (var(--r) - var(--tail-r)) * var(--t));
  padding: 18px 22px;
  border: 2px solid #fff;
  border-radius: var(--r);
  font-family: var(--font-text);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  color: #0b2036;
}

.faq-row.me .faq-bub{
  max-width: 82%;
  border-bottom-left-radius: var(--tail);
  background: #fff;
  color: #000;
}

.faq-row.vi .faq-bub{
  max-width: min(640px, 100%);
  border: 0;
  border-bottom-right-radius: var(--tail);
  background: var(--blue-light);
}

.faq-bub b{
  font-weight: 600;
}

.faq-bub a{
  color: inherit;
  font-weight: 600;
  text-underline-offset: 3px;
}

/* the typing indicator and the real answer share one slot (the answer reserves the height); GSAP crossfades them */
.faq-slot{
  position: relative;
  max-width: min(640px, 82%);
  margin-right: 46px;
}

/* one small author badge (the answers come from Kosht): it slides down to every new answer (js/faq.js), in the static layout each answer has its own */
.faq-badge{
  position: absolute;
  z-index: 2;
  top: 0;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  font: 700 14px/28px var(--font-display);
  text-align: center;
  color: var(--navy);
}

.faq--static .faq-badge{
  display: none;
}

.faq--static .faq-slot::after{
  content: "K";
  position: absolute;
  right: -40px;
  bottom: 2px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  font: 700 14px/28px var(--font-display);
  text-align: center;
  color: var(--navy);
}

.faq-slot .faq-typing{
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  gap: 6px;
  width: auto;
  padding: 24px;
}

.faq-typing i{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
  animation: faq-dot 1s infinite ease-in-out;
}

.faq-typing i:nth-child(2){ animation-delay: .15s; }
.faq-typing i:nth-child(3){ animation-delay: .3s; }

@keyframes faq-dot{
  0%, 80%, 100%{ transform: translateY(0); opacity: .5; }
  40%{ transform: translateY(-6px); opacity: 1; }
}

/* reduced motion / no GSAP: no pin, everything is simply readable, no typing dots */
.faq--static .faq-typing{
  display: none;
}

.faq--static .faq-stage{
  height: auto;
  padding-bottom: 80px;
}

.faq--static .faq-chat{
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

@media (prefers-reduced-motion: reduce){
  .faq-typing i{
    animation: none;
  }
}

@media (max-width: 720px){
  .faq-stage{
    padding: 64px 16px 24px;
  }

  .faq-slot{
    max-width: 86%;
    margin-right: 40px;
  }

  .faq-badge{
    right: 0;
  }

  .faq-bub{
    padding: 15px 18px;
    font-size: 17px;
  }

  .faq-slot .faq-typing{
    padding: 20px;
  }
}

/* compare plans: a native <dialog> that fades and rises in */
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html:has(dialog[open]){
  overflow: hidden;
}

.pr-modal{
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  margin: auto;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 36px;
  background: rgb(38 38 40 / .82);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  backdrop-filter: blur(28px) saturate(1.3);
  box-shadow: 0 40px 120px rgb(3 18 40 / .55);
  color: var(--text);
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px) scale(.97);
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .8, .2, 1), overlay .5s allow-discrete, display .5s allow-discrete;
}

.pr-modal[open]{
  opacity: 1;
  transform: none;
}

@starting-style{
  .pr-modal[open]{
    opacity: 0;
    transform: translateY(28px) scale(.97);
  }
}

.pr-modal::backdrop{
  background: rgb(8 12 18 / 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: background .4s ease, backdrop-filter .4s ease, overlay .4s allow-discrete, display .4s allow-discrete;
}

.pr-modal[open]::backdrop{
  background: rgb(8 12 18 / .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@starting-style{
  .pr-modal[open]::backdrop{
    background: rgb(8 12 18 / 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
}

.pr-modal-card{
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.pr-modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 8px 36px;
}

.pr-modal-head h3{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  color: var(--text);
}

.pr-modal-x{
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .12);
  color: var(--text);
  cursor: pointer;
  transition: background .2s;
}

.pr-modal-x:hover{
  background: rgb(255 255 255 / .22);
}

.pr-modal-x:focus-visible{
  outline: 2px solid var(--blue-light);
  outline-offset: 2px;
}

.pr-modal-x svg{
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.pr-modal-scroll{
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 36px 30px;
}

.pr-table{
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-text);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.3;
  text-align: left;
}

.pr-table thead th{
  padding: 14px 12px 12px;
  font-weight: 600;
  color: var(--text);
}

.pr-table thead th.plus{
  color: var(--blue-light);
}

.pr-table tbody th,
.pr-table td{
  padding: 14px 12px;
  border-top: 1px solid rgb(255 255 255 / .1);
  vertical-align: top;
}

.pr-table tbody th{
  width: 42%;
  font-weight: 500;
  color: var(--text);
}

.pr-table td{
  color: #d4dde8;
}

.pr-table td.plus{
  color: var(--text);
  font-weight: 500;
  background: rgb(11 120 228 / .14);
}

.pr-table td.no{
  color: var(--text-faint);
}

.pr-modal-note{
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 13px;
  color: #c5d1df;
}

@media (max-width: 560px){
  .pr-modal{
    border-radius: 28px;
  }

  .pr-modal-head{
    padding: 20px 18px 4px 24px;
  }

  .pr-modal-scroll{
    padding: 4px 16px 24px;
  }

  .pr-table thead th,
  .pr-table tbody th,
  .pr-table td{
    padding: 12px 8px;
  }
}

@media (prefers-reduced-motion: reduce){
  .pr-modal,
  .pr-modal::backdrop{
    transition: none;
  }
}

/* ---------- Privacy ---------- */
.privacy{
  position: relative;
  padding: clamp(60px, 6vw, 96px) clamp(16px, 1.4vw, 24px);
}

/* laid out on the Figma 1218 x 884 canvas, everything is a percentage of it */
.privacy-panel{
  position: relative;
  width: min(100%, 1440px);
  display: grid; /* the Figma proportion is a spacer in the same grid cell as the copy: the panel is at least that tall and grows with longer text */
  margin: 0 auto;
  border-radius: clamp(48px, 10.7vw, 154px);
  background: var(--grey-panel);
  overflow: hidden;
  container-type: inline-size;
}

.privacy-panel::before{
  content: "";
  grid-area: 1 / 1;
  padding-top: 72.58%; /* 884 / 1218 */
}

.privacy-copy{
  grid-area: 1 / 1;
}

.privacy-glow{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible; /* the blur may extend past the svg box, the panel clips it */
  pointer-events: none;
}

/* the copy is in the flow (so a longer translation makes the panel taller instead of spilling out of it);
   the panel keeps the Figma proportions as its minimum height */
.privacy-copy{
  position: relative;
  width: 40cqw;
  margin: 16% 0 9% 8.5%;
  color: var(--text-dark);
}

.privacy-icons{
  margin-bottom: 4cqw;
}

.privacy-icons svg{
  display: block;
  width: 15cqw;
  height: auto;
}

.privacy-title{
  margin-bottom: 3.6cqw;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 6.9cqw;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--text-dark);
}

.privacy-p{
  margin-bottom: 1.6cqw;
  font-family: var(--font-text);
  font-size: max(16px, 1.75cqw);
  line-height: 1.2;
  color: var(--text-dark-muted);
}

.privacy-p strong{
  font-weight: 600;
  color: var(--text-dark);
}

.privacy-fine{
  margin-top: 2.4cqw;
  font-family: var(--font-text);
  font-size: max(12px, 1.07cqw);
  line-height: 1.35;
  color: var(--text-dark-muted);
}

.privacy-fine a{
  color: inherit;
  text-underline-offset: 2px;
}

.privacy-phone{
  position: absolute;
  margin: 0;
  width: 26.3%;
  left: 59.85%;
  top: 15.1%;
}

@media (max-width: 820px){
  .privacy-panel::before{
    display: none;
  }

  .privacy-panel{
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 44px 24px 36px;
    border-radius: 44px;
    container-type: normal;
  }

  /* the glow sits behind the phone at the bottom, the text stays on the light panel */
  .privacy-glow{
    inset: auto auto -4% -80%;
    width: 180%;
    max-width: none;
    height: auto;
  }

  .privacy-copy{
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    margin: 0;
  }

  .privacy-icons{
    margin-bottom: 28px;
  }

  .privacy-icons svg{
    width: 150px;
  }

  .privacy-title{
    margin-bottom: 28px;
    font-size: clamp(44px, 13vw, 64px);
  }

  .privacy-p{
    margin-bottom: 18px;
    font-size: 17px;
  }

  .privacy-fine{
    margin-top: 22px;
    font-size: 13px;
  }

  .privacy-phone{
    position: relative;
    left: auto;
    top: auto;
    width: min(300px, 70vw);
    margin-top: 36px;
  }
}

/* ---------- Set up in minutes ---------- */
.setup{
  position: relative;
  padding: clamp(150px, 17vw, 260px) clamp(16px, 3vw, 48px) clamp(72px, 9vw, 140px);
}

/* the board is laid out on the Figma 1226 x 878 canvas, everything is a percentage of it */
.setup-board{
  position: relative;
  width: min(100%, 1440px);
  aspect-ratio: 1226 / 878;
  margin: 0 auto;
  container-type: inline-size;
}

.setup-title,
.setup-sub{
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
}

.setup-title{
  top: 15.2%;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 9.9cqw;
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--text);
}

.setup-sub{
  top: 39.2%;
  font-family: var(--font-text);
  font-size: max(15px, 1.45cqw);
  color: var(--text-muted);
}

.setup-step{
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: 1.1cqw;
}

.setup-n{
  font-family: var(--font-display);
  font-size: 7cqw;
  line-height: .86;
  color: var(--text);
}

.setup-text{
  max-width: 28cqw;
  font-family: var(--font-text);
  font-size: max(15px, 1.5cqw);
  line-height: 1.18;
  color: var(--text-muted);
}

.setup-text strong{
  font-weight: 600;
  color: var(--text);
}

.setup-step--1{
  left: 24.9%;
  top: 1.1%;
}

.setup-step--2{
  right: 67.6%;
  bottom: 3.2%;
  align-items: flex-end;
  flex-direction: row-reverse;
  text-align: right;
}

.setup-step--3{
  right: 4%;
  top: 61.8%;
  text-align: right;
}

.setup-step--3 .setup-text{
  margin-top: 1.6cqw;
}

.setup .phone-anchor{
  position: absolute;
  margin: 0;
  width: 17.7%;
}

.setup-phone--1{ left: 4%; top: 1.1%; }
.setup-phone--2{ left: 33.9%; top: 47.6%; }
.setup-phone--3{ left: 78.8%; top: 10.6%; }

@media (max-width: 820px){
  .setup{
    padding-block: 130px 56px;
  }

  .setup-board{
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    container-type: normal;
  }

  .setup-title,
  .setup-sub,
  .setup-step,
  .setup .phone-anchor{
    position: static;
  }

  .setup-title{
    font-size: clamp(52px, 17vw, 84px);
  }

  .setup-sub{
    font-size: 17px;
    margin-top: -12px;
  }

  .setup-step,
  .setup-step--2,
  .setup-step--3{
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 14px;
    width: min(100%, 420px);
    margin-top: 28px;
  }

  .setup-step--3 .setup-n{
    order: -1;
  }

  .setup-step--3 .setup-text{
    margin-top: 0;
  }

  .setup-n{
    font-size: 64px;
  }

  .setup-text{
    max-width: none;
    font-size: 17px;
  }

  .setup .phone-anchor{
    width: min(300px, 70vw);
  }
}

/* ---------- Ukrainian: longer words need a little more room (the layout is otherwise shared with English) ---------- */
html[lang="uk"] nav ul{
  width: 17rem;
}

html[lang="uk"] .setup-title{
  font-size: 7.6cqw;
}

html[lang="uk"] .cta h2{
  font-size: 56px;
}

@media (min-width: 821px){
  html[lang="uk"] .pr-more > span{
    max-width: 34%;
  }
}

@media (max-width: 700px){
  html[lang="uk"] nav ul{
    width: 14.5rem;
  }
}

@media (max-width: 820px){
  html[lang="uk"] .setup-title{
    font-size: clamp(34px, 10.5vw, 64px);
  }

  html[lang="uk"] .cta h2{
    font-size: 36px;
  }
}

html[lang="uk"] .privacy-title{
  font-size: 6.1cqw;
}

@media (max-width: 820px){
  html[lang="uk"] .privacy-title{
    font-size: clamp(38px, 11.5vw, 56px);
  }
}

/* Ukrainian: the fine print is longer, so it stays on one line (as in English) with a slightly smaller type */
html[lang="uk"] .vira-fine{
  font-size: clamp(11px, 1vw, 13px);
}

/* Ukrainian FAQ title: "Запитайте, перш ніж" must fit on one line */
html[lang="uk"] .faq-title{
  font-size: clamp(40px, 6.4vw, 92px);
}

/* Ukrainian: the long word in "Політика конфіденційності" must fit a 390px phone */
html[lang="uk"] .legal h1{
  font-size: clamp(36px, 8.4vw, 120px);
}
