/* Page CSS of the Optika Yuzhnaya site: only what sits inside a visual or a widget slot.
   Everything else comes from the kit (assets/system.css, layout.css, motion.css). */

/* the eye chart inside the pinned-chapters frames: sized in container units, so it fits any frame */
.sim { display: grid; place-items: center; margin: 0; aspect-ratio: 4 / 3; container-type: size; background: var(--surface); color: var(--ink); }
.sim .vc-chart { width: auto; }
.sim .vc-row { --s: 4; }
.sim .vc-row + .vc-row { margin-top: calc(var(--s) * 0.55cqh); }
.sim .vc-row__l { gap: calc(var(--s) * 1cqh); }
.sim .vc-glyph { width: calc(var(--s) * 1cqh); height: calc(var(--s) * 1cqh); }
.sim--3 .vc-chart { filter: blur(2cqh); }
.sim--15 .vc-chart { filter: blur(0.8cqh); }
[data-moment="pinned-chapters"]:not(.is-live) .sim { aspect-ratio: auto; height: 30svh; border-radius: var(--r-md); }
@media (min-width: 1024px) and (max-width: 1279px) { main > #sim.is-live > .mo-pc__grid { flex: none; } }
/* a tablet at rest: three rows in one screen */
@media (min-width: 640px) and (max-width: 1023px) {
  [data-moment="pinned-chapters"]:not(.is-live) .sim { height: 15svh; }
  #sim:not(.is-live) .mo-pc__text { padding-top: var(--s-4); }
}
/* a phone at rest: the section is two whole screens, the three charts share what the words leave */
@media (max-width: 639px) {
  main > #sim[data-moment]:not(.is-live) { min-height: 200vh; min-height: 200lvh; }
  main #sim[data-moment]:not(.is-live) > .mo-pc__grid { align-content: stretch; align-items: stretch; }
  #sim:not(.is-live) .mo-pc__text { grid-template-rows: auto minmax(0, 1fr) auto; }
  #sim:not(.is-live) .mo-pc__steps { grid-template-rows: repeat(3, minmax(0, 1fr)); }
  #sim:not(.is-live) .mo-pc__step { grid-template-rows: auto auto minmax(120px, 1fr); }
  #sim:not(.is-live) .sim { height: auto; }
}

/* the widget slots: one fixed height, so the section keeps its screen while steps change */
.vc.check__slot { height: min(640px, var(--ly-fit)); }
/* the try-on widget is the section's split: its panel (headed by the h2) on the left six columns, the stage on the right six */
#tryon .tryon { --to-gap: var(--gutter); --to-cols: minmax(0, 1fr) minmax(0, 1fr); }
/* on this page nothing sticks outside the dealt moment: the stage scrolls with its controls */
#tryon .to-stage { position: relative; top: auto; }
/* one size for a filled button's label across the page */
#tryon .to-actions .to-btn { font-size: var(--t-body); }
#tryon .to-swatch .to-sr { left: 0; top: 0; }
#tryon .tryon > .section-head { margin-bottom: var(--s-5); }

/* picture-develops: the section's one photograph, as tall as the list beside it */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(620px, var(--ly-fit)); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frames__more, .prices__more { margin-top: var(--s-5); }

/* the questions on the page's split line (columns 7 to 12), full width once the split stacks */
.col-r { grid-column: 7 / span 6; }
@media (max-width: 1023px) { .col-r { grid-column: 1 / -1; } }
/* the questions' side column: the sanatorium alley under the heading, down to the list's foot */
.faq-side { display: flex; flex-direction: column; gap: var(--s-6); }
.faq-photo { flex: 1 1 0; min-height: 240px; }
/* on a wide screen the questions stand beside their heading alone (a picture on the left only would leave the section one-sided) */
@media (min-width: 1024px) { .faq-photo { display: none; } }
@media (max-width: 639px) { .faq-photo { flex: none; aspect-ratio: 1 / 1; } }

/* ratings: five stars in the ink, never a second colour */
.stars { flex: none; width: 88px; height: 16px; fill: currentColor; }

/* the hero: the rating is a link to the reviews; three facts stand on the picture's bottom line */
.hero-rating { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); line-height: 1.5; color: var(--ink); text-decoration: none; }
.hero-rating b { font-weight: 600; }
.hero-rating > span { color: var(--muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease); }
.hero-rating::after { content: "\2192"; color: var(--muted); transition: transform var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .hero-rating:hover > span { color: var(--ink); text-decoration-color: currentColor; }
  .hero-rating:hover::after { transform: translateX(3px); }
}
@media (max-width: 639px) { .hero-rating { min-height: 44px; } }
@media (min-width: 1024px) {
  .hero--split .hero__text { align-self: stretch; display: flex; flex-direction: column; }
  .hero--split .hero__text > .hero-facts { margin-top: auto; padding-top: var(--s-5); border-top: 1px solid var(--line); }
}

/* reviews: where they were left (each platform a link with its rating), then the words themselves */
.rv-platforms { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-5) 0 0; padding: 0; list-style: none; }
.rv-platform { height: 48px; padding: 0 var(--s-5); gap: var(--s-3); font-size: var(--t-small); text-decoration: none; transition: border-color var(--dur) var(--ease); }
.rv-platform b { font-weight: 600; font-size: var(--t-body); }
.rv-platform__logo { flex: none; width: auto; height: 24px; margin-right: calc(-1 * var(--s-1)); }
.rv-platform__rating { font-weight: 600; font-variant-numeric: tabular-nums; }
.rv-platform__count { color: var(--muted); }
.rv-platform::after { content: "\2192"; color: var(--muted); transition: transform var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .rv-platform:hover { border-color: var(--line-strong); }
  .rv-platform:hover::after { transform: translateX(3px); }
}
#reviews .rv { display: flex; flex-direction: column; gap: var(--s-4); align-self: stretch; color: var(--ink); text-decoration: none; }
.rv blockquote { margin: 0; font-size: var(--t-body); line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.rv__who { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); margin-top: auto; padding-top: var(--s-2); font-size: var(--t-small); }
.rv__who span { color: var(--muted); }
.rv__src { align-self: flex-start; font-size: var(--t-small); font-weight: 500; }
.rv__src::after { content: " \2192"; display: inline-block; margin-left: var(--s-1); transition: transform var(--dur) var(--ease); }
/* the card answers the pointer on any device that reports a hover (the kit's 2px lift comes on top where the pointer is fine) */
#reviews .rv:hover { border-color: color-mix(in oklab, var(--ink) 22%, transparent); }
@media (hover: hover) and (pointer: fine) { .rv:hover .rv__src::after { transform: translateX(3px); } }
@media (max-width: 1023px) { .rv-platform .stars { display: none; } }

/* the map and its address card: together as tall as the form beside them */
#booking .cx-map__ground { height: clamp(220px, calc(var(--ly-fit) - 330px), 320px); }
#booking .cx-map__card { display: grid; gap: var(--s-3); }
#booking .cx-map__addr { font: 600 var(--t-card)/1.4 var(--font-text); letter-spacing: -0.01em; font-style: normal; }
.contacts__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: 0; }

/* contacts beside the form */
.contacts { display: grid; gap: var(--s-4); }
.contacts__address { font: var(--display-weight) var(--t-h3)/1.25 var(--font-display); letter-spacing: var(--display-tracking); font-style: normal; }
.contacts__phones { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.consent label { display: flex; gap: var(--s-3); align-items: flex-start; font-weight: 400; font-size: var(--t-small); line-height: 1.45; min-height: 44px; }
.consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--action); }
/* on a phone the policy link stays a link in its sentence (a 44px box would drop its underline a line below the words) */
@media (max-width: 639px) { .consent .link { display: inline; } .consent .link::after { margin-left: var(--s-2); } }

/* a tablet (640 to 1023): the splits keep their two columns, six and six, each about as wide as a phone's one,
   so every section stays one screen with nothing left empty (stacked, most would need a screen and a half) */
@media (min-width: 640px) and (max-width: 1023px) {
  :is(#check, #frames, #prices, #booking) > .wrap.grid > * { grid-column: auto / span 6; }
  #frames > .wrap.grid.fill { display: grid; column-gap: var(--gutter); }
  #frames > .wrap.grid.fill > .frame--fill { flex: none; height: 100%; min-height: 0; }
  #booking .cx-map__ground { height: 300px; }
  /* the questions: the heading beside the alley, then the list in two columns (six in one half would pass the screen) */
  #faq > .wrap.grid > * { grid-column: 1 / -1; }
  .faq-side { flex-direction: row; gap: var(--gutter); height: auto; }
  .faq-side > * { flex: 1 1 0; min-width: 0; }
  .faq-photo { min-height: 200px; }
  #faq .faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter); align-content: start; margin-top: var(--s-6); }
  #faq .faq > .faq__item:nth-child(-n+2) { padding-top: 0; }
  /* the offer: its heading beside the photograph, the list across the screen under them (in half a tablet the list passes the screen) */
  #offer > .wrap.grid > .span-6:first-child { display: contents; }
  #offer .section-head { grid-column: 1 / span 6; margin-bottom: 0; }
  #offer .develop { grid-column: 7 / span 6; grid-row: 1; height: auto; aspect-ratio: 3 / 2; align-self: start; }
  #offer .rows, #offer .frames__more { grid-column: 1 / -1; }
  #offer .rows { margin-top: var(--s-5); }
  #offer .rows > li { padding-block: var(--s-3); }
  /* the try-on's panel a little tighter, so it keeps to the screen */
  #tryon .to-panel { gap: 12px; }
  #tryon .to-controls { gap: 10px; }
  /* the reviews three to a row (one under another they pass the screen) */
  #reviews .grid > .rv { grid-column: auto / span 4; --card-pad: var(--s-5); }
  /* the orders and the steps three to a row */
  #orders .grid > .tile { grid-column: auto / span 4; --tile-ratio: 2 / 3; }
  #visit .grid > .card { grid-column: auto / span 4; }
  #visit .card > .panel { --p-h: 300px; }
}
/* a phone */
@media (max-width: 639px) {
  /* the charts' heading a little lower, so the gap under the first screen is nearer the page's other gaps */
  #sim:not(.is-live) .mo-pc__text { padding-top: var(--s-6); }
  /* a platform's button and a section's own link run from the left line to the right one (a box over half the screen
     wide that stops short reads as a mistake) */
  #reviews .section-head--row > div { flex: 1 1 100%; }
  .rv-platforms > li { flex: 1 1 100%; }
  .rv-platform { display: flex; width: 100%; height: auto; min-height: 48px; flex-wrap: wrap; gap: 2px var(--s-3); padding: var(--s-2) var(--s-5); border-radius: var(--r-lg); }
  .rv-platform::after { margin-left: auto; }
  .section-head--row > .link { display: flex; justify-content: space-between; width: 100%; }
  /* the first screen: the picture stands clear (the review on it is a desktop extra) */
  .hero .ly-float { display: none; }
  /* a split in two groups (.g2m): one column, the picture as tall as its screen (the tablet's flex gap would
     stand between twelve columns here and push the page past the screen) */
  main > .section.g2m > .wrap.grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  main > .section.g2m > .wrap.grid > .frame--fill { height: 100%; min-height: 0; }
  /* the vision check on a screen of its own (the section's second group) */
  .vc.check__slot { height: 100%; min-height: 560px; }
  .develop { height: auto; aspect-ratio: 1 / 1; margin-top: var(--s-7); }
  #booking .cx-map__ground { height: 300px; }
  #booking .cx-map { margin-top: var(--s-7); }
  .sun { margin-bottom: var(--s-7); }
  /* the orders one to a row */
  #orders .grid > .tile { grid-column: 1 / -1; --tile-ratio: 3 / 2; }
  /* the footer's links on one screen: the line about the salon stands in the hero already */
  .closing__links .footer__lede { display: none; }
}
/* the smallest phones: the closing button keeps its words on one line */
@media (max-width: 359px) {
  .closing__cta .btn--xl { font-size: 18px; padding-inline: var(--s-4); }
}
