/*
 * KARTA brand foundation.
 *
 * Shared by karta.az (landing and fleet application) and the app.karta.az
 * sign-in pages. Both origins serve it from /assets/css/, so it holds only
 * tokens, type, controls and the small product-card vocabulary: page layout
 * belongs to each surface's own stylesheet.
 */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/onest-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/onest-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Warm paper and near-black ink */
  --canvas: #faf9f6;
  --surface: #ffffff;
  --surface-muted: #f3f1ec;
  --surface-sunken: #ebe8e1;
  --line: #e8e5de;
  --line-strong: #d4d0c6;
  --ink: #10100e;
  --ink-soft: #2c2c29;
  --muted: #5f5e58;
  --muted-soft: #8b8a83;

  /* Dark sections are neutral black, not green */
  --night: #10100e;
  --on-night: #f6f5f1;
  --on-night-muted: rgba(246, 245, 241, 0.66);
  --night-line: rgba(246, 245, 241, 0.12);

  /* Brand green, from the wallet in the emblem, used as a detail colour */
  --brand: #0c805e;
  --brand-hover: #086b4e;
  --brand-soft: #e3f4ec;
  --brand-line: #bfe3d3;

  /* Highlighter yellow, from the top card in the emblem */
  --highlight: #ffe066;
  --highlight-soft: #fff4c2;

  /* The four cards in the emblem */
  --card-yellow: #f6a723;
  --card-black: #1f2024;
  --card-blue: #1561dc;
  --card-red: #e11d38;

  --danger: #b42318;
  --danger-ink: #912018;
  --danger-soft: #fef0ee;
  --danger-line: #f5c2bc;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 16, 14, 0.06);
  --shadow-sm: 0 1px 2px rgba(16, 16, 14, 0.05), 0 6px 16px -10px rgba(16, 16, 14, 0.14);
  --shadow-md: 0 1px 3px rgba(16, 16, 14, 0.06), 0 18px 40px -20px rgba(16, 16, 14, 0.24);
  --shadow-lg: 0 2px 6px rgba(16, 16, 14, 0.06), 0 40px 80px -36px rgba(16, 16, 14, 0.38);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --container: 1200px;
  --gutter: clamp(16px, 4.5vw, 40px);
}

/* ---- Base --------------------------------------------------------------- */

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

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

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.005em;
  font-kerning: normal;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.num {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

/* A highlighter stroke behind a few words. */
.highlight {
  padding: 0 0.06em;
  background: linear-gradient(180deg, transparent 60%, var(--highlight) 60%, var(--highlight) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---- Brand lockup ------------------------------------------------------- */

/* The KARTA logo image: the wallet emblem forms the K of the wordmark. */
.brand-logo {
  display: inline-flex;
  flex: none;
  align-items: center;
}

.brand-logo img {
  width: auto;
  height: 42px;
}


/* ---- Buttons ------------------------------------------------------------ */

.btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.975rem;
  font-weight: 560;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.72;
  transform: none;
}

.btn-sm {
  --btn-h: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.btn-lg {
  --btn-h: 56px;
  padding: 0 28px;
  font-size: 1.02rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 16, 14, 0.2);
}

.btn-primary:hover {
  background: #2d2d29;
}

.btn-ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: #b9b4a8;
}

.btn-light {
  background: #ffffff;
  color: var(--ink);
}

.btn-light:hover {
  background: #eeece6;
}

.btn-outline-light {
  border-color: rgba(246, 245, 241, 0.3);
  color: var(--on-night);
}

.btn-outline-light:hover {
  border-color: rgba(246, 245, 241, 0.6);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 200ms var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---- Section label ------------------------------------------------------ */

.eyebrow {
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

/* ---- Form controls ------------------------------------------------------ */

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-label {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 560;
  letter-spacing: -0.005em;
}

.input-wrap {
  position: relative;
}

.input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 450;
  box-shadow: var(--shadow-xs);
  appearance: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.input::placeholder {
  color: var(--muted-soft);
}

.input:hover {
  border-color: #b9b4a8;
}

.input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(16, 16, 14, 0.08);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12);
}

.input[type="number"] {
  appearance: textfield;
}

.input[type="number"]::-webkit-inner-spin-button,
.input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.input-wrap--action .input {
  padding-right: 58px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.input-action:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.input-action svg {
  width: 20px;
  height: 20px;
}

.input-action .icon-hide,
.input-action[aria-pressed="true"] .icon-show {
  display: none;
}

.input-action[aria-pressed="true"] .icon-hide {
  display: block;
}

.field-error {
  color: var(--danger);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
}

.field-error:empty {
  display: none;
}

.form-status {
  display: none;
  padding: 12px 14px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand-hover);
  font-size: 0.875rem;
  font-weight: 520;
  line-height: 1.45;
}

.form-status:focus {
  outline: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-error {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger-ink);
}

/* ---- Product cards (illustrative interface pieces) ---------------------- */

.ui-card {
  position: relative;
  padding: 1.1em 1.25em;
  border: 1px solid rgba(16, 16, 14, 0.06);
  border-radius: 1.2em;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.8125rem;
  line-height: 1.35;
  box-shadow:
    0 1px 2px rgba(16, 16, 14, 0.06),
    0 24px 48px -24px rgba(16, 16, 14, 0.32);
}

.ui-label {
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 520;
}

.ui-row {
  display: flex;
  align-items: center;
  gap: 0.85em;
}

.ui-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75em;
  height: 2.75em;
  border-radius: 0.95em;
  background: var(--brand-soft);
  color: var(--brand);
}

.ui-icon svg {
  width: 1.4em;
  height: 1.4em;
}

.ui-text {
  min-width: 0;
}

.ui-title {
  display: block;
  font-size: 1.04em;
  font-weight: 620;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ui-sub {
  display: block;
  margin-top: 0.1em;
  color: var(--muted);
  font-size: 0.9em;
  white-space: nowrap;
}

.ui-value {
  margin-left: auto;
  font-size: 1.04em;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ui-seg {
  display: inline-flex;
  padding: 0.25em;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
}

.ui-seg span {
  padding: 0.4em 0.95em;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 600;
}

.ui-seg .is-on {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.ui-meter {
  height: 0.45em;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
}

.ui-meter span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

/* ---- Product previews shared by karta.az and the sign-in pages -------- */

.amount {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.amount--pos {
  color: var(--brand);
}

.amount--neg {
  color: #c0283a;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 560;
  white-space: nowrap;
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 700;
}

.avatar--green {
  background: #14a97c;
}

.avatar--yellow {
  background: var(--card-yellow);
  color: #2a1c02;
}

.avatar--red {
  background: var(--card-red);
}

.avatar--blue {
  background: var(--card-blue);
}

.paycard-chip {
  position: relative;
  display: block;
  width: 38px;
  height: 29px;
  border-radius: 7px;
  background: linear-gradient(135deg, #f4e4b3 0%, #d6b56a 48%, #b8913f 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.paycard-chip::before,
.paycard-chip::after {
  position: absolute;
  content: "";
}

.paycard-chip::before {
  inset: 32% 0;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.paycard-chip::after {
  inset: 0 36%;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  border-left: 1px solid rgba(0, 0, 0, 0.2);
}

.owner-panel {
  width: min(100%, 390px);
  padding: 22px 22px 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: #ffffff;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
}

.owner-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 620;
}

.owner-panel-chip {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-hover);
  font-size: 0.75rem;
  font-weight: 620;
}

.owner-panel-label {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.8rem;
}

.owner-panel-amount {
  font-size: 2.1rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.owner-panel-list {
  margin-top: 16px;
}

.owner-panel-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #f0eee9;
}

.wallet-card {
  display: flex;
  flex-direction: column;
  aspect-ratio: 1.586;
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(135deg, #086d50 0%, #0c815f 50%, #075d45 100%);
  color: #ffffff;
  box-shadow: 0 18px 30px -18px rgba(6, 60, 44, 0.8);
}

.wallet-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-card-logo img {
  width: auto;
  height: 32px;
}

.wallet-card .paycard-chip {
  width: 32px;
  height: 24px;
}

.wallet-card-label {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}

.wallet-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-card-amount {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.wallet-card-plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.1rem;
  line-height: 1;
}

.wallet-card--large {
  padding: 26px 28px;
  border-radius: 24px;
  box-shadow: 0 50px 70px -36px rgba(90, 64, 0, 0.6);
}

.wallet-card--large .wallet-card-logo img {
  height: 54px;
}

.wallet-card--large .paycard-chip {
  width: 50px;
  height: 38px;
}

.wallet-card--large .wallet-card-label {
  font-size: 0.9rem;
}

.wallet-card--large .wallet-card-amount {
  font-size: 2.4rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
