/* Global Friends: page CSS, only what the kit lacks (inside visuals, the logo, the two price tools). */

/* the client's logo, cut from the banner (a raster until the original file arrives) */
.nav__logo .logo { display: block; height: 48px; width: auto; }
@media (max-width: 639px) { .nav__logo .logo { height: 36px; } }
.footer .nav__logo .logo--footer { height: 72px; }


/* reserved photographs: a dotted map (site-src/maps.mjs) fills the frame until the photograph arrives */
.slot { background: var(--surface); }
.slot > .frame__img { object-fit: cover; }
/* a map fills its frame as a close-up; the frame takes the map's own sea colour while it loads */
.slot--dark { background: #24352a; }
.slot--light { background: #eaf0eb; }
/* the hero's map shows whole (its route from Almaty), the sea colour round it on a phone's wider frame */
.hero__media:has(> img[src*="maps/"]) { background: #24352a; }
.hero .hero__media > img[src*="maps/"] { object-fit: contain; }

/* pinned-chapters: each step's picture is the route map at that step, with one card of facts on it */
.pc-visual { position: relative; }
.pc-visual > img { object-fit: cover; }
.pc-card {
  position: absolute; left: var(--s-5); bottom: var(--s-5); z-index: 1;
  width: min(calc(100% - 2 * var(--s-5)), 380px);
  display: grid; gap: var(--s-2); padding: var(--s-5);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
}
.pc-card p { margin: 0; }
.pc-card p:last-child { font-size: var(--t-lead); line-height: 1.35; }
@media (max-width: 1023px) {
  .pc-card { left: var(--s-3); bottom: var(--s-3); width: min(calc(100% - 2 * var(--s-3)), 380px); padding: var(--s-3) var(--s-4); }
  .pc-card p:last-child { font-size: var(--t-body); }
}

/* price cards */
.plans .card--plan { align-content: start; }
.price__old { color: var(--muted); font-size: var(--t-lead); }
.price__old[hidden] { display: none; }

/* the two price tools: the UK term picker and the US promo code */
.calc { display: grid; gap: var(--s-6); align-content: start; }
.calc__result { display: grid; gap: var(--s-2); }
.calc__result p { margin: 0; }
.calc__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-3); font: var(--display-weight) var(--t-stat)/1.1 var(--font-display); letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; }
.calc__fee { color: var(--ink); }
.seg { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-3); min-width: 0; }
.seg legend { padding: 0; margin-bottom: var(--s-3); }
.seg__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--s-2); }
/* each term: a visible radio and its words in one 48px pill; the radio carries the kit's focus ring */
.seg__opt {
  display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: 0 var(--s-4);
  border: 1px solid color-mix(in oklab, var(--ink) 22%, transparent); border-radius: var(--r-sm);
  font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: border-color var(--dur, 160ms) var(--ease, ease), background-color var(--dur, 160ms) var(--ease, ease);
}
.seg__opt:hover { border-color: var(--ink); }
.seg__opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--bg); }
.seg__opt input {
  appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0;
  border: 1.5px solid var(--ink); border-radius: 50%; background: transparent; display: grid; place-content: center; cursor: pointer;
}
.seg__opt input::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--action); transform: scale(0); transition: transform var(--dur, 160ms) var(--ease, ease); }
.seg__opt input:checked::before { transform: scale(1); }
.calc-col { display: grid; gap: var(--s-5); align-content: start; justify-items: start; }
.calc-col > .calc { justify-self: stretch; }
.promo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); align-items: start; }
.promo > .btn { margin-top: calc(var(--t-small) * 1.5 + var(--s-2)); }
.promo input { text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 479px) { .promo { grid-template-columns: 1fr; } .promo > .btn { margin-top: 0; } }

/* ---- screens: every section stays one or two screens at the tablet and the phone ---- */
/* the tablet and the phone stack the splits; the reserved picture then grows into what the words leave,
   so each section ends on its picture and the gaps between sections stay even */
@media (max-width: 1023px) {
  :is(#visas, #about, #founder, #guide) > .wrap > .grid { display: flex; flex-direction: column; height: 100%; }
  :is(#visas, #about, #founder, #guide) .slot { flex: 1 1 auto; min-height: 240px; --ratio: 0% !important; }
  #included > .wrap { display: flex; flex-direction: column; height: 100%; }
  #included > .wrap > .grid { flex: 1 1 auto; grid-template-rows: auto minmax(200px, 1fr); }
  #included .slot { grid-column: 1 / -1; --ratio: 0% !important; height: 100%; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  /* "what's included": the two lists side by side */
  #included .inc { grid-column: auto / span 6; }
  /* the price tools stack under their words and take the whole row */
  #prices > .wrap > .grid > * { grid-column: 1 / -1; }
  /* the price cards side by side, one height */
  #prices .plans > .card--plan { grid-column: auto / span 4; }
  /* the process steps at rest: two screens, as the moment holds them live, the step pictures filling them */
  main > #process[data-moment][data-moment]:not(.is-live) { min-height: calc(2 * 100svh); height: calc(2 * 100svh); }
  main #process[data-moment]:not(.is-live) .mo-pc__visual > img { aspect-ratio: auto; max-height: none; height: calc((200svh - 600px) / 4); }
}
@media (max-width: 639px) {
  /* two screens at least; a narrow phone (320) lets the steps grow rather than run into the next section */
  main > #process[data-moment][data-moment]:not(.is-live) { min-height: calc(2 * 100lvh); height: auto; }
  /* the price tools on a phone: two screens, the card takes what the words leave */
  #prices > .wrap > .grid:has(.calc) { display: flex; flex-direction: column; height: 100%; }
  #prices .calc:has(.promo) { grid-template-rows: none; }
  #prices .calc-col { flex: 1 1 auto; grid-template-rows: 1fr auto; }
  #prices .calc { align-content: stretch; grid-template-rows: auto auto 1fr; }
  #prices .calc > .calc__table { align-self: end; }
  /* the footer: the logo is already in the bar above, so the links and the close keep one screen */
  .closing__links .footer__brand { display: none; }
  /* "what's included" stacks its two lists, the picture fills the rest */
  #included > .wrap > .grid { grid-template-rows: auto auto minmax(240px, 1fr); }
  /* the price cards: the gift card's cover grows into what the prices leave */
  #prices > .wrap:has(> .plans) { display: flex; flex-direction: column; height: 100%; }
  #prices > .wrap > .plans { flex: 1 1 auto; display: flex; flex-direction: column; }
  #prices .plans > .guide-card { flex: 1 1 auto; display: flex; flex-direction: column; }
  #prices .guide-card > .slot { flex: 1 1 auto; min-height: 160px; --ratio: 0% !important; }
}
.guide-card > .slot { margin-bottom: var(--s-2); }

/* the footer: the logo, then two link columns that end on the right line */
@media (max-width: 1023px) { .footer .closing__links .grid > .footer__col { grid-column: auto / span 6; } }

/* a short laptop screen (768px tall and less) */
@media (min-width: 1024px) and (max-height: 800px) {
  /* the price tools drop the table that repeats their options */
  .calc__table { display: none; }
  /* the gift card keeps its cover and title, its list waits for a taller screen */
  .guide-card > .checks { display: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) and (max-height: 800px) {
  /* the price rows drop their one-line notes */
  #visas .rows > li > p { display: none; }
}
.plans__cta { margin-top: var(--s-6); }
/* a narrow price card: the old price goes under the new one */
.plans .price { flex-wrap: wrap; row-gap: 0; }
/* a phone: the promo card keeps to the price and the code (the discount table repeats what the code shows) */
@media (max-width: 639px) { .calc__table--promo { display: none; } }
/* the tablet and the phone: the price tools sit open on the band, their words on the page's left line */
@media (max-width: 1023px) { #prices .calc { padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; } }
/* the steps at rest (tablet, phone, reduced motion): the map alone, its card repeats the step's own words */
[data-moment="pinned-chapters"]:not(.is-live) .pc-card { display: none; }
/* the 404 page: air above its one button */
.notfound__cta { margin-top: var(--s-6); }
/* the founder's photograph: a modest 4:5 portrait (410px on a laptop, at the right of its column), 320px at the tablet,
   a 96px profile picture on a phone */
.founder__photo { display: flex; justify-content: flex-end; align-items: flex-start; }
.founder__photo > .slot { width: 410px; max-width: 100%; }
@media (max-width: 1023px) { .founder__photo { justify-content: flex-start; } }
@media (max-width: 1023px) {
  :is(#about, #founder) .slot--photo { flex: 0 0 auto; min-height: 0; --ratio: 125% !important; width: 320px; max-width: 100%; }
}
/* a phone: a small portrait above the heading, like a profile, so the block keeps one screen */
@media (max-width: 639px) {
  :is(#about, #founder) .founder__photo { order: -1; margin-bottom: var(--s-4); }
  :is(#about, #founder) .slot--photo { width: 96px; }
}
