/* The website of بەنزینخانە (benzinxane.ayndatech.com): the app's own
   colors (AppPalette) and fonts, in light and dark mode. One special
   element, the station price sign on the home page; everything else
   stays quiet. No scripts. */

@font-face {
  font-family: "Kufi";
  src: url("/fonts/NotoKufiArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "Sans Arabic";
  src: url("/fonts/NotoSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "Sans Arabic";
  src: url("/fonts/NotoSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "Sans Latin";
  src: url("/fonts/NotoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+203A;
}
@font-face {
  font-family: "Sans Latin";
  src: url("/fonts/NotoSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+203A;
}
@font-face {
  font-family: "Sans Latin";
  src: url("/fonts/NotoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+203A;
}

:root {
  color-scheme: light dark;
  --bg: #f4f2ec;
  --surface: #ffffff;
  --muted-fill: #e9e6de;
  --line: #e6e1d7;
  --ink: #15171c;
  --muted: #5b616b;
  --accent: #c2410c;
  --on-accent: #ffffff;
  --accent-text: #c2410c;
  --accent-soft: #fbe3d6;
  --on-accent-soft: #7c2d12;
  /* "Coming soon" on the store buttons (dark buttons in light mode). */
  --store-soon: #fdba74;
  /* The price sign is a real object: the same in both modes. */
  --frame: #2a2d34;
  --frame-edge: #3a3e47;
  --label: #3a3f48;
  --label-ink: #f4f2ec;
  --screen: #1b0f0e;
  --led: #ff4136;
  --led-core: #ff6b5e;
  --body: "Sans Latin", "Sans Arabic", system-ui, sans-serif;
  --heading: "Sans Latin", "Kufi", system-ui, sans-serif;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171c;
    --surface: #1f2229;
    --muted-fill: #2b2f38;
    --line: #2f333c;
    --ink: #f4f2ec;
    --muted: #a9afb9;
    --accent-text: #f97316;
    --accent-soft: #4a2410;
    --on-accent-soft: #fed7aa;
    --frame-edge: #454a55;
    --store-soon: #c2410c;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.8;
}

:lang(en) body,
body:lang(en) {
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  text-wrap: balance;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- top bar */
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 22px;
}

.brand img {
  border-radius: 11px;
}

/* The same three-part choice as the app's language setting. */
.langs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 14px;
  background: var(--muted-fill);
}

.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.langs a[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* ------------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding-block: 40px 72px;
}

.hero h1 {
  font-size: clamp(46px, 7vw, 84px);
  letter-spacing: -0.01em;
}

.hero .latin-name {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
}

.hero .lead {
  margin-top: 18px;
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.6;
  max-width: 30ch;
}

.hero .hero-text {
  margin-top: 14px;
  color: var(--muted);
  max-width: 44ch;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 20px 8px 16px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--bg);
}

.store svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store .store-name {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-family: "Sans Latin", var(--body);
  font-weight: 700;
  font-size: 18px;
}

.store .soon {
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  color: var(--store-soon);
}

.free {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

/* The station price sign: an orange top, the LED board, a pole. */
.totem {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 400px);
  margin-inline: auto;
}

.totem .cap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 26px 26px 0 0;
  background: var(--accent);
  color: #ffffff;
  font-family: "Kufi", var(--heading);
  font-size: 24px;
}

.board {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 0 0 26px 26px;
  background: var(--frame);
  border: 1px solid var(--frame-edge);
  border-top: 0;
  box-shadow: 0 34px 60px -34px rgb(21 23 28 / 0.55);
}

.board .row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 10px;
}

.board .label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 6px 10px;
  border-radius: 14px;
  background: var(--label);
  color: var(--label-ink);
  font-family: "Sans Latin", "Kufi", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
}

.board .screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 14px;
  /* The dots of a real LED panel. */
  background:
    radial-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1.3px) 0 0 / 6px 6px,
    var(--screen);
  direction: ltr;
}

.digit {
  width: 26px;
  height: 38px;
  overflow: visible;
}

.d-off {
  fill: rgb(255 65 54 / 0.09);
}

.d-flash,
.d-on {
  fill: var(--led-core);
}

.d-flash {
  opacity: 0;
}

.pole {
  width: 30px;
  height: 84px;
  background: linear-gradient(90deg, #30343c, #4a4f5a 45%, #30343c);
}

.pole-base {
  width: 150px;
  height: 12px;
  border-radius: 6px 6px 0 0;
  background: #30343c;
}

/* The one moment: the sign switches on when the page opens (every
   segment lights for a moment, as real boards do), row after row. */
@media (prefers-reduced-motion: no-preference) {
  .d-flash {
    animation: segment-flash 1.1s ease-out var(--row-delay, 0s) both;
  }

  .d-on {
    animation: light-on 0.35s ease-out calc(var(--row-delay, 0s) + 0.9s) both;
  }

  .board .row:nth-child(2) {
    --row-delay: 0.18s;
  }

  .board .row:nth-child(3) {
    --row-delay: 0.36s;
  }

  .board .row:nth-child(4) {
    --row-delay: 0.54s;
  }
}

@keyframes segment-flash {
  0% {
    opacity: 0;
  }
  18%,
  62% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes light-on {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --------------------------------------------------------------- sections */
.section {
  padding-block: 64px;
}

.section h2 {
  font-size: clamp(28px, 3.4vw, 38px);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 36px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.features .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.features .icon svg {
  width: 26px;
  height: 26px;
}

.features h3 {
  margin-top: 16px;
  font-size: 20px;
}

.features p {
  margin-top: 6px;
  color: var(--muted);
}

.promise {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.promise > svg {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--accent-text);
}

.promise h2 {
  font-size: 24px;
}

.promise p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 62ch;
}

.promise a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
}

/* Station owners: the dark of their price board. */
.owners {
  padding: clamp(28px, 5vw, 48px);
  border-radius: 32px;
  background: var(--frame);
  color: var(--label-ink);
}

.owners p {
  margin-top: 12px;
  max-width: 60ch;
  color: #d8dbe0;
}

.owners .how {
  color: #b4bac4;
  font-size: 15px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 24px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: #a8370a;
}

.button svg {
  width: 22px;
  height: 22px;
}

/* -------------------------------------------------------------- documents */
.doc-head {
  padding-block: 40px 28px;
  border-bottom: 1px solid var(--line);
}

.doc-head h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.doc-head .updated {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.doc-head .intro {
  margin-top: 16px;
  max-width: 68ch;
}

.doc-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  padding-block: 36px 72px;
}

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
}

.toc h2 {
  font-size: 15px;
  color: var(--muted);
}

.toc ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 7px 0;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.5;
}

.toc a:hover {
  color: var(--accent-text);
}

.doc-text {
  max-width: 70ch;
}

.doc-text section + section {
  margin-top: 40px;
}

.doc-text h2 {
  font-size: 24px;
  scroll-margin-top: 24px;
}

.doc-text p,
.doc-text ul {
  margin-top: 12px;
}

.doc-text ul {
  padding-inline-start: 0;
  list-style: none;
}

.doc-text li {
  position: relative;
  padding-inline-start: 22px;
}

.doc-text li + li {
  margin-top: 10px;
}

.doc-text li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.8em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.also {
  margin-top: 48px;
  padding: 20px 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ------------------------------------------------------------------- 404 */
.lost {
  padding-block: 96px;
  text-align: center;
}

.lost h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.lost p {
  margin-top: 12px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 28px 40px;
  color: var(--muted);
  font-size: 15px;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.foot a {
  color: var(--ink);
}

/* Hidden SVG shapes used by the price sign. */
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ----------------------------------------------------------------- phones */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 24px 48px;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .toc {
    position: static;
    padding: 18px 20px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .top-row {
    min-height: 68px;
  }

  .brand span {
    font-size: 19px;
  }

  .langs a {
    padding: 0 10px;
    font-size: 14px;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .section {
    padding-block: 44px;
  }

  .promise {
    flex-direction: column;
    padding: 22px;
  }

  .board .label {
    min-height: 56px;
    font-size: 17px;
  }

  .digit {
    width: 21px;
    height: 31px;
  }

  .pole {
    height: 56px;
  }
}

@media (max-width: 380px) {
  .brand span {
    display: none;
  }
}
