/* Meltina Home, redesign prototype. The site's own tokens: navy, beige, Libre Caslon and Inter. */
:root {
  --navy: #0C0E16;
  --beige: #E7DCCE;
  --cream: #F9D79F;
  --gutter: clamp(16px, 4vw, 56px);
  --font-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --font-text: "Libre Caslon Text", Georgia, serif;
  --font-ui: "Inter", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
html[lang="ar"] {
  --font-display: "Amiri", "Libre Caslon Display", serif;
  --font-text: "Amiri", "Libre Caslon Text", serif;
  --font-ui: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--navy); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--beige); font-family: var(--font-text); overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: the site's logo and language switch, nothing else. */
.top { position: fixed; z-index: 20; inset-inline: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(env(safe-area-inset-top) + 20px) var(--gutter) 0; pointer-events: none; direction: ltr; }
.top__logo { pointer-events: auto; display: block; height: 34px; }
.top__logo img { display: block; height: 100%; width: auto; }
.top__lang { pointer-events: auto; display: flex; align-items: center; gap: 4px; margin-top: 6px; font-family: var(--font-ui); font-size: 12px; }
.top__lang button { border: 0; background: none; color: var(--beige); font: inherit; letter-spacing: 0.28em; padding: 12px 6px; margin: -12px -2px; opacity: 0.72; cursor: pointer; }
.top__lang button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.top__lang span { opacity: 0.35; }
.top a:focus-visible, .top button:focus-visible, .ranges__item:focus-visible { outline: 1px solid rgb(231 220 206 / 0.6); outline-offset: 4px; }
@media (max-width: 700px) { .top__logo { height: 28px; } }

/* One pinned stage, scrolled through. */
.track { position: relative; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--navy); contain: strict; }
.film, .brush { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.film { z-index: 1; }
.brush { z-index: 3; pointer-events: none; }
.grain { position: absolute; inset: 0; z-index: 12; pointer-events: none; opacity: 0.05; }

/* The ending: the official jar under its name (the site's Meltina composition, on navy). */
.word {
  position: absolute; z-index: 4; inset-inline: 0; top: 13svh; margin: 0; text-align: center; direction: ltr;
  font-family: "Libre Caslon Display", serif; font-size: min(12vw, 22svh); line-height: 0.86; letter-spacing: 0.06em;
  color: var(--beige); opacity: 0; pointer-events: none;
}
.jar { position: absolute; z-index: 5; opacity: 0; pointer-events: none; }
.jar__img { position: relative; display: block; width: 100%; height: auto; }
.jar__shadow { position: absolute; left: 12%; right: 12%; bottom: -2%; height: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0)); }

.copy { position: absolute; z-index: 6; inset-inline-start: var(--gutter); bottom: calc(env(safe-area-inset-bottom) + 9svh); max-width: 28em; }
.copy p { margin: 0; }
.line { display: block; overflow: hidden; padding-block: 0.04em 0.12em; }
.line > span { display: inline-block; opacity: 0; will-change: transform; }
.copy__title { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 36px); line-height: 1.15; }
.copy__claim { margin-top: 10px !important; font-family: var(--font-ui); font-size: 14px; opacity: 0.85; }
.copy__sizes { margin-top: 8px !important; font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.28em; color: var(--cream); }

.ranges { position: absolute; z-index: 7; inset-inline-end: var(--gutter); bottom: calc(env(safe-area-inset-bottom) + 9svh); display: flex; align-items: flex-end; gap: clamp(20px, 3vw, 40px); opacity: 0; }
.ranges__item { display: grid; gap: 8px; justify-items: center; padding: 6px 2px; color: var(--beige); text-decoration: none; opacity: 0.72; transition: opacity 200ms ease; }
.ranges__item[aria-current="page"] { opacity: 1; }
.ranges__num { font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.3em; color: var(--cream); }
.ranges__name { font-family: var(--font-display); font-size: clamp(18px, 1.6vw, 24px); white-space: nowrap; }
.ranges__rule { width: 1px; height: 38px; background: var(--beige); opacity: 0.25; }
@media (hover: hover) and (pointer: fine) { .ranges__item:hover { opacity: 1; } }

html[lang="ar"] .copy, html[lang="ar"] .ranges { direction: rtl; }
html[lang="ar"] .copy__claim { font-size: 15px; }

/* Phones: name above, jar in the middle, information and ranges below it. */
@media (max-width: 700px) {
  .word { top: 15svh; font-size: 17vw; }
  .copy { inset-inline: var(--gutter); bottom: calc(env(safe-area-inset-bottom) + 16svh); text-align: center; max-width: none; }
  .ranges { inset-inline: var(--gutter); bottom: calc(env(safe-area-inset-bottom) + 3svh); justify-content: center; gap: 18px; }
  .ranges__name { font-size: 17px; }
}
