/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Roboto';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/Roboto-Regular.woff2') format('woff2'), url('../fonts/Roboto-Regular.woff') format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/Roboto-Medium.woff2') format('woff2'), url('../fonts/Roboto-Medium.woff') format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/Roboto-Bold.woff2') format('woff2'), url('../fonts/Roboto-Bold.woff') format('woff');
}

/* ---------- Variables ---------- */
:root {
  --black: #283246;
  --muted: #5F6B7A;
  --primary: #5078FF;
  --primary-dark: #3A5FE0;
  --container: #EAF0FF;
  --beige: #F7F9FF;
  --white: #FFFFFF;
  --error: #E5484D;
  --error-container: #FFECEC;
  --success: #1F9D6B;
  --warn: #FFB547;
  --shadow: 0 12px 32px rgba(40, 60, 140, 0.12);
}

* {
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--beige);
  color: var(--black);
  font-family: 'Roboto', sans-serif;
}

ul { margin: 0; padding: 0; list-style: none; }
h1, h2, p { margin: 0; }
a { color: var(--primary); }

/* ---------- Typography (Material 3 scale) ---------- */
.display-large  { font-size: 57px; line-height: 64px; letter-spacing: -0.25px; font-weight: 400; }
.headline-large { font-size: 32px; line-height: 40px; font-weight: 400; }
.headline-medium{ font-size: 28px; line-height: 36px; font-weight: 400; }
.title-large    { font-size: 22px; line-height: 28px; font-weight: 500; }
.label-large    { font-size: 14px; line-height: 20px; letter-spacing: 0.1px; font-weight: 500; }
.label-medium   { font-size: 12px; line-height: 16px; letter-spacing: 0.5px; font-weight: 500; }
.body-large     { font-size: 16px; line-height: 24px; letter-spacing: 0.5px; }
.body-medium    { font-size: 14px; line-height: 20px; letter-spacing: 0.25px; }
.body-small     { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; }

/* ---------- Button ---------- */
.button {
  background-color: var(--primary);
  color: var(--white);
  border-radius: 100px;
  border: none;
  outline: none;
  padding: 0 24px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .1px;
  height: 40px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  transition: box-shadow .2s, background-color .2s;
}
.button:hover, .button:focus-visible {
  background-color: var(--primary-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
}
.button--large { height: 48px; padding: 0 28px; font-size: 15px; }
.button--outline {
  background: transparent;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.button--outline:hover, .button--outline:focus-visible {
  background: var(--container);
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* ---------- Surface ---------- */
.panel {
  box-shadow: var(--shadow);
  border-radius: 32px;
  background: var(--white);
}

/* ---------- Header ---------- */
.page { padding-top: 72px; }

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(247, 249, 255, 0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
  transition: box-shadow .2s;
}
.header--scrolled { box-shadow: 0 1px 0 rgba(40, 50, 70, 0.08); }

.header__logo { display: flex; align-items: center; height: 72px; }
.header__logo img { height: 44px; display: block; }

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: 32px;
  margin-right: auto;
}
.header__link {
  color: var(--black);
  text-decoration: none;
  opacity: 0.4;
  transition: opacity .2s;
}
.header__link--current, .header__link:hover { opacity: 1; }

.header-mobile {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  align-items: center;
  justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 112px 24px 128px;
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  color: var(--primary);
  background: var(--container);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 28px;
}
.hero__title { max-width: 1000px; margin: 0 auto; }
.hero__text { max-width: 720px; margin: 28px auto 0; color: var(--muted); }
.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 80px auto 0;
}
.hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.hero__stats .headline-large { color: var(--primary); font-weight: 500; }
.hero__stats .body-medium { color: var(--muted); }

/* ---------- Section titles ---------- */
.features__title, .cases__title, .offer__title {
  text-align: center;
  margin-bottom: 96px;
}

/* ---------- Technologies ---------- */
.features { padding: 0 24px; margin-bottom: 128px; }
.features__list {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 128px;
}
.features__item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.features__item > * { min-width: 0; }
.features__item:nth-child(even) .features__item-wrapper { order: 2; }
.features__item-wrapper .title-large { margin-bottom: 16px; }
.features__item-wrapper .body-medium { color: var(--muted); }

.features__item-code {
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--black);
  color: #DCE4FF;
}
.features__item-code p { font-size: 12px; letter-spacing: .5px; opacity: .6; margin-bottom: 8px; }
.features__item-code pre { margin: 0; overflow-x: auto; }
.features__item-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 20px;
}

.panel { padding: 32px; }
.panel__text { text-align: center; margin-top: 12px; font-weight: 500; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px;
  line-height: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #D5DCEE;
  color: var(--black);
  background: var(--white);
}
.chip b { color: var(--muted); font-weight: 500; margin-left: 4px; }
.chip--active { background: var(--container); border-color: transparent; color: var(--primary-dark); }

/* creator avatar */
.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
}
.avatar--1 { background: linear-gradient(135deg, #5078FF, #8FA7FF); }
.avatar--2 { background: linear-gradient(135deg, #283246, #5F6B7A); }
.avatar--3 { background: linear-gradient(135deg, #2BB3A3, #7AD9C9); }
.creator__info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.creator__info b { font-size: 14px; font-weight: 500; }
.creator__info small { font-size: 12px; color: var(--muted); }

/* footprint */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { background: var(--beige); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 24px; line-height: 32px; font-weight: 500; }
.kpi small { font-size: 12px; color: var(--muted); }
.split { margin-top: 20px; }
.split__labels { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 8px; }
.split__bar { height: 12px; border-radius: 6px; background: var(--warn); overflow: hidden; }
.split__bar i { display: block; height: 100%; width: var(--w); background: var(--primary); }
.panel__note { color: var(--muted); margin-top: 16px; opacity: .8; }

/* ranking */
.ranking__title { color: var(--muted); margin-bottom: 16px; }
.ranking { display: flex; flex-direction: column; gap: 8px; }
.ranking__row {
  display: grid;
  grid-template-columns: 28px 96px 1fr 40px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--beige);
  font-size: 14px;
}
.ranking__row i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #B9C8FF var(--w), var(--container) var(--w));
}
.ranking__row b { font-weight: 500; text-align: right; }
.ranking__pos { color: var(--muted); font-weight: 500; }
.ranking__row--you { background: var(--container); box-shadow: inset 0 0 0 1px var(--primary); }
.ranking__row--you i { background: linear-gradient(90deg, var(--primary) var(--w), #fff var(--w)); }
.ranking__row--you .ranking__name { font-weight: 500; color: var(--primary-dark); }
.ranking__gap { text-align: center; color: var(--muted); line-height: 8px; }

/* audience */
.panel--audience { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.audience { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donut {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary) 0 var(--real),
    #B9C8FF var(--real) calc(var(--real) + var(--mass)),
    var(--warn) calc(var(--real) + var(--mass)) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.donut__center {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut__center b { font-size: 24px; font-weight: 500; }
.donut__center small { font-size: 12px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--primary { background: var(--primary); }
.dot--light { background: #B9C8FF; }
.dot--warn { background: var(--warn); }

.bars { min-width: 0; }
.bars__title { color: var(--muted); margin-bottom: 12px; }
.bar {
  display: grid;
  grid-template-columns: 44px 1fr 36px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 10px;
}
.bar span { color: var(--muted); }
.bar i {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary) var(--w), var(--container) var(--w));
}
.bar em { font-style: normal; text-align: right; font-weight: 500; }

/* sponsored */
.panel--sponsored { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.post { border-radius: 20px; background: var(--beige); padding: 14px; }
.post__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post__head u { text-decoration: none; color: var(--primary); }
.post__media {
  height: 140px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(135deg, #5078FF, #283246);
  position: relative;
}
.post__media span {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 11px;
  color: var(--white);
  background: rgba(0, 0, 0, .3);
  padding: 3px 8px;
  border-radius: 6px;
}
.post__stats { display: flex; gap: 16px; margin-top: 10px; color: var(--muted); }
.tags .label-medium { color: var(--muted); margin: 0 0 8px; }
.tags .chips + .label-medium { margin-top: 20px; }

/* api */
.api { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.api__col { background: var(--beige); border-radius: 16px; padding: 16px; }
.api__col .label-large { color: var(--primary); margin-bottom: 10px; }
.api__col li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px dashed #D5DCEE;
}
.api__col li:last-child { border-bottom: none; }

/* ---------- Use cases ---------- */
.cases { padding: 0 24px; margin-bottom: 128px; }
.cases__list {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cases__item {
  background: var(--white);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.cases__item-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--container);
  color: var(--primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.cases__item .title-large { margin-bottom: 12px; }
.cases__item .body-medium { color: var(--muted); }

/* ---------- Solution ---------- */
.offer { padding: 0 24px; margin: 0 auto 128px; text-align: center; max-width: 1120px; }
.offer__title { margin-bottom: 48px; }
.offer__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.offer__item { padding: 32px 24px; }
.offer__item-picture { width: 140px; margin: 0 auto 20px; }
.offer__item-picture svg { width: 100%; display: block; }
.offer__item .title-large { margin-bottom: 12px; }
.offer__item .body-medium { color: var(--muted); }
.pic-bg { fill: var(--container); }
.pic-fill { fill: var(--primary); }
.pic-soft { fill: #B9C8FF; }
.pic-line { fill: none; stroke: var(--primary); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact us ---------- */
.enquiry {
  width: 737px;
  max-width: 100%;
  margin: 0 auto 128px;
  padding: 64px;
  border-radius: 18px;
  background-color: var(--container);
}
.enquiry__title { text-align: center; margin-bottom: 12px; }
.enquiry__subtitle { text-align: center; color: var(--muted); margin-bottom: 40px; }

.enquiry__form-row { display: flex; gap: 12px; }
.enquiry__form-row--50p .field { flex: 1; }

.field {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 16px;
}
.field input, .field textarea {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 4px 4px 0 0;
  background: var(--beige);
  border-bottom: 1px solid var(--muted);
  padding: 24px 44px 8px 16px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--black);
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; display: block; }
.field input:focus, .field textarea:focus { border-bottom: 2px solid var(--primary); padding-bottom: 7px; }
.field__label {
  position: absolute;
  left: 16px;
  top: 16px;
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .15s, color .15s;
}
.field input:focus + .field__label,
.field input:not(:placeholder-shown) + .field__label,
.field textarea:focus + .field__label,
.field textarea:not(:placeholder-shown) + .field__label {
  transform: translateY(-9px) scale(.75);
}
.field input:focus + .field__label, .field textarea:focus + .field__label { color: var(--primary); }

.field__clear {
  display: none;
  position: absolute;
  right: 12px;
  top: 16px;
  width: 24px;
  height: 24px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235F6B7A' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm5 13.6L15.6 17 12 13.4 8.4 17 7 15.6 10.6 12 7 8.4 8.4 7 12 10.6 15.6 7 17 8.4 13.4 12 17 15.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field--filled .field__clear { display: block; }

.field__error { display: none; color: var(--error); padding: 4px 16px 0; }
.field--invalid input, .field--invalid textarea {
  background: var(--error-container);
  border-bottom-color: var(--error);
}
.field--invalid .field__label { color: var(--error); }
.field--invalid .field__error { display: block; }

.form-status { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.form-status[hidden] { display: none; }
.form-status--error { color: var(--error); }
.form-status--success { color: var(--success); }
.form-status::before {
  content: '';
  flex: none;
  width: 24px;
  height: 24px;
  background: center / contain no-repeat;
}
.form-status--error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23E5484D' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Z'/%3E%3C/svg%3E");
}
.form-status--success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231F9D6B' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-2 15-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9Z'/%3E%3C/svg%3E");
}

.enquiry__submit { width: 128px; }
.enquiry__submit:disabled { pointer-events: none; opacity: .85; }
.spinner {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35);
  border-top-color: var(--white);
  animation: spin .8s linear infinite;
}
.enquiry__submit.is-sending .spinner { display: block; }
.enquiry__submit.is-sending .button__text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.enquiry__agree { margin-top: 32px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  width: 100%;
  padding: 48px 24px 56px;
  text-align: center;
  border-top: 1px solid rgba(40, 50, 70, .08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer__logo { height: 44px; margin-bottom: 12px; }
.footer .body-medium { color: var(--muted); max-width: 720px; }
.footer a { text-decoration: none; }
.footer__copy { margin-top: 16px; color: var(--muted); opacity: .7; }

/* ---------- Legal pages ---------- */
.legal { max-width: 800px; margin: 0 auto; padding: 64px 24px 96px; }
.legal__back { display: inline-block; text-decoration: none; margin-bottom: 24px; }
.legal__title { margin-bottom: 8px; }
.legal .legal__updated { color: var(--muted); margin-bottom: 48px; }
.legal section { margin-bottom: 40px; }
.legal .title-large { margin: 0 0 16px; }
.legal p { margin: 0 0 12px; color: var(--black); }
.legal ul { list-style: disc; padding-left: 24px; margin: 0 0 12px; }
.legal li { margin-bottom: 8px; }
.legal b { font-weight: 500; }
.legal__table { overflow-x: auto; margin-bottom: 16px; border-radius: 16px; box-shadow: var(--shadow); }
.legal table { width: 100%; border-collapse: collapse; background: var(--white); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--container); }
.legal th { background: var(--container); font-weight: 500; }
.legal tr:last-child td { border-bottom: none; }
.enquiry__agree a { color: var(--primary); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal--visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 1023px) {
  .header { padding: 0 16px; }
  .header__nav, .header__button { display: none; }
  .header-mobile { display: inline-flex; }
  .header__logo img { height: 38px; }

  .hero { padding: 72px 16px 96px; }
  .display-large { font-size: 34px; line-height: 42px; }
  .hero__stats { grid-template-columns: 1fr; margin-top: 56px; }

  .headline-large { font-size: 28px; line-height: 36px; }
  .features__title, .cases__title, .offer__title { margin-bottom: 48px; }

  .features { padding: 0 16px; margin-bottom: 100px; }
  .features__list { gap: 80px; }
  .features__item { grid-template-columns: 1fr; gap: 32px; }
  .features__item:nth-child(even) .features__item-wrapper { order: 0; }

  .cases { padding: 0 16px; margin-bottom: 100px; }
  .cases__list { grid-template-columns: 1fr; }

  .offer { padding: 0 16px; margin-bottom: 100px; }
  .offer__list { grid-template-columns: 1fr; gap: 0; }

  .enquiry { width: 100%; border-radius: 0; padding: 64px 16px; margin-bottom: 0; }
  .enquiry__form-row { flex-direction: column; gap: 0; }
  .legal { padding: 48px 16px 72px; }
}

@media screen and (max-width: 560px) {
  .panel { padding: 20px; border-radius: 24px; }
  .panel--audience, .panel--sponsored { grid-template-columns: 1fr; }
  .api { grid-template-columns: 1fr; }
  .ranking__row { grid-template-columns: 24px 80px 1fr 36px; gap: 8px; padding: 10px; }
}
