/* haligi.uz. One garden, five tools. Colours are taken from the art: the art is drawn in these and nothing else. */
@font-face { font-family: "Calistoga"; font-weight: 400; font-display: swap; src: url("fonts/Calistoga.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url("fonts/Onest.woff2") format("woff2"); }

:root {
  --garden: #183a2e;
  --stone: #dcd5c8;
  --stone-2: #cfc6b6;
  --plum: #2e2440;
  --anor: #c7333f;
  --behi: #e9b949;
  --leaf: #9cc28a;
  --paper: #ffffff;
  --gutter: clamp(20px, 5vw, 72px);
  --display: "Calistoga", Georgia, serif;
  --text: "Onest", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--plum);
  font: 400 18px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* The grain the art is printed with, laid over the whole page so flat colour reads as paper too. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: url("grain.png") repeat;
  background-size: 180px;
  opacity: 0.55;
  mix-blend-mode: multiply;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; }
h2 { font-size: clamp(44px, 6.4vw, 104px); line-height: 0.95; letter-spacing: -0.015em; }
p { margin: 0; max-width: 58ch; }
.kicker { font-family: var(--display); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; margin: 14px 0 18px; }
.meta { font-size: 15px; opacity: 0.75; }
:focus-visible { outline: 3px solid var(--behi); outline-offset: 3px; border-radius: 6px; }

/* Bar */
.bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  color: var(--stone);
}
.mark { font-family: var(--display); font-size: 26px; text-decoration: none; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: currentColor; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--plum);
  color: var(--stone);
  font: 600 17px/1 var(--text);
  text-decoration: none;
  transition: transform 160ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-size { font-weight: 400; opacity: 0.7; }
.btn-soon { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; opacity: 0.7; cursor: default; }
.btn-soon:hover { transform: none; }
.btn-dark { background: var(--plum); color: var(--behi); }
.how { margin-top: 18px; font-size: 16px; }
.how summary { cursor: pointer; font-weight: 600; }
.how ol { margin: 10px 0 0; padding-left: 22px; }
.how li { margin: 4px 0; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--garden);
  color: var(--stone);
  overflow: hidden;
  isolation: isolate;
}
.hero-stage { position: absolute; inset: 0; }
.hero-stage > * { position: absolute; }
.disc {
  z-index: 1;
  width: min(40vw, 56svh);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--stone);
  right: 9vw;
  top: 15svh;
}
.leaves { z-index: 1; width: min(25vw, 370px); left: 41vw; bottom: 12svh; transform-origin: 50% 100%; }
.branch { z-index: 2; width: min(60vw, 900px); right: -3vw; top: 13svh; transform-origin: 0% 60%; }
.bird-wrap { z-index: 4; width: min(17vw, 250px); right: 22vw; top: 8svh; transform-origin: 50% 90%; }
.bird { width: 100%; transform-origin: 60% 85%; }
.quince { z-index: 4; width: min(17vw, 250px); right: 5vw; bottom: 3svh; }
.word {
  position: absolute;
  z-index: 3;
  left: calc(var(--gutter) - 0.04em);
  bottom: 6svh;
  font-size: clamp(130px, 25vw, 400px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--stone);
  white-space: nowrap;
  /* A rim of the ground colour keeps the letters apart from the disc and the leaves where they cross. */
  -webkit-text-stroke: 0.035em var(--garden);
  paint-order: stroke fill;
}
.word .ch { display: inline-block; }
.hero-copy { position: absolute; z-index: 5; left: var(--gutter); top: 21svh; max-width: 25ch; }
.lead { font-family: var(--display); font-size: clamp(26px, 2.9vw, 42px); line-height: 1.1; }
.byline { margin-top: 18px; font-size: 16px; opacity: 0.75; }

/* ---------------------------------------------------------------- keyboard */
.kb { background: var(--stone); position: relative; }
.kb-pin {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas: "copy pen" "row row";
  align-content: center;
  column-gap: 4vw;
  row-gap: 3svh;
  padding: 10svh var(--gutter) 8svh;
}
.kb-copy { grid-area: copy; align-self: center; }
.kb-copy p { margin-top: 20px; }
.keys { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--stone-2), inset 0 0 0 1.5px var(--plum);
  font: 600 20px/1 var(--text);
  color: var(--plum);
}
.key-letter { font-family: var(--display); font-weight: 400; font-size: 24px; }
.keys-note { margin-left: 8px; font-size: 15px; opacity: 0.75; }
.kb-pen { grid-area: pen; align-self: end; justify-self: end; width: min(100%, 360px); }
.qalam { width: 100%; transform: rotate(-6deg); }
.drop {
  position: absolute;
  left: 0; top: 0;
  width: 16px; height: 22px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--plum);
  opacity: 0;
  pointer-events: none;
}
/* The four letters, old spelling then new. Without motion they read as a list; with it, the ink turns each in place. */
.pairs {
  grid-area: row;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--plum);
}
.pair {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.18em;
  padding-top: 0.12em;
  font-family: var(--display);
  font-size: clamp(64px, 12.5vw, 210px);
  line-height: 1;
}
.pair .old { font-size: 0.42em; opacity: 0.5; }
.pair .old::after { content: " →"; font-family: var(--text); }
.motion .pair .old::after { content: none; }
.pair .new { color: var(--anor); }
.motion .pair { display: block; }
.motion .pair .old { font-size: 1em; opacity: 1; display: block; }
.motion .pair .new { position: absolute; left: 0; top: 0.12em; opacity: 0; }

/* ---------------------------------------------------------------- dictation */
.dict {
  background: var(--garden);
  color: var(--stone);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 5vw;
  padding: 18svh var(--gutter);
  position: relative;
  overflow: hidden;
}
.dict-art { position: relative; }
.dict-bird { width: min(100%, 560px); transform: scaleX(-1); margin-left: auto; }
.note { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--behi); right: 12%; top: 16%; opacity: 0; }
.dict-copy > p + p { margin-top: 16px; }
.said {
  margin-top: 30px;
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.2;
  color: var(--behi);
  max-width: 24ch;
}
.dict-copy > .said { margin-top: 30px; }
.said .w { display: inline-block; }
.caret { display: inline-block; width: 3px; height: 0.95em; background: var(--behi); vertical-align: -0.12em; margin-left: 4px; }
.dict .btn { background: var(--stone); color: var(--garden); }
.dict .btn-soon { background: transparent; color: var(--stone); }
.dict .meta { margin-top: 16px; max-width: 46ch; }

/* ---------------------------------------------------------------- bekat */
.bekat { background: var(--stone); position: relative; padding: 18svh var(--gutter) 16svh; overflow: hidden; }
.route { position: absolute; left: 0; right: 0; top: 6svh; width: 100%; height: 30svh; overflow: visible; }
.route path { fill: none; stroke: var(--anor); stroke-width: 14; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bekat-inner { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 5vw; align-items: center; margin-top: 14svh; }
.bekat-shot { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 10px var(--paper), 0 30px 60px -30px rgba(46, 36, 64, 0.45); transform: rotate(1.5deg); }

/* ---------------------------------------------------------------- ranglar */
.ranglar { background: var(--plum); color: var(--stone); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5vw; align-items: center; padding: 18svh var(--gutter); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); height: min(60svh, 520px); border-radius: 26px; overflow: hidden; }
.swatches span { transition: background-color 700ms ease, transform 500ms cubic-bezier(.2,.8,.2,1); transform-origin: 50% 100%; }
.swatches span:nth-child(1) { background: #f6f0f2; }
.swatches span:nth-child(2) { background: #f6956e; }
.swatches span:nth-child(3) { background: #e32322; }
.swatches span:nth-child(4) { background: #c4037d; }
.swatches span:nth-child(5) { background: #350806; }
.swatches span:nth-child(6) { background: #e9b949; }
.ranglar .btn { background: var(--behi); color: var(--plum); }

/* ---------------------------------------------------------------- screenshotter */
.shot { background: var(--stone); padding: 16svh var(--gutter); }
.shot p { margin-top: 18px; }

/* ---------------------------------------------------------------- support */
.support { background: var(--behi); color: var(--plum); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 5vw; align-items: center; padding: 16svh var(--gutter); }
.support p { margin: 22px 0 30px; font-size: 20px; }
.qr { justify-self: end; width: min(100%, 320px); padding: 16px; border-radius: 26px; background: var(--paper); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 28px var(--gutter) 40px; font-size: 14px; background: var(--plum); color: var(--stone); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .nav { gap: 14px; }
  .nav a { font-size: 15px; }
  .disc { width: 86vw; right: -6vw; top: 12svh; }
  .branch { width: 104vw; right: -18vw; top: 11svh; }
  .bird-wrap { width: 33vw; right: 27vw; top: 8svh; }
  .quince { width: 30vw; right: 4vw; bottom: 27svh; }
  .leaves { display: none; }
  .hero-copy { top: auto; bottom: 23svh; max-width: 16ch; }
  .word { font-size: 31vw; bottom: 4svh; }
  .dict, .bekat-inner, .ranglar, .support { grid-template-columns: 1fr; }
  .kb-pin { grid-template-columns: 1fr; grid-template-areas: "copy" "pen" "row"; }
  .kb-pen { width: 46vw; justify-self: end; }
  .dict-bird { margin: 0; width: 70vw; }
  .qr { justify-self: start; }
  .route { height: 20svh; }
  .bekat-inner { margin-top: 18svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .swatches span { transition: none; }
}
