/* =========================================================
   Nakadi — base styles (tokens, reset, typography, components)
   ========================================================= */

:root {
  --bg: #080808;
  --fg: #ebebeb;
  --mint: #00ffaf;
  --muted: #818181;
  --muted-2: #737378;
  --line: #2c2c2c;
  --surface: #1a1a1a;
  --surface-2: #1e1e1e;
  --surface-3: #19191a;
  --round: #282829;
  --round-hover: #414144;
  --tile-title: #dddddd;
  --placeholder: #aeaeae;
  --error: #ff6565;
  --deco-line: #c0c0c0;
  --grad: linear-gradient(90deg, #031d95 0%, #0d8fd6 49%, #00ffb6 94%);

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

  --max: 1320px;
  --gutter: 60px;
  --section: 200px;
  --header-h: 90px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.33 8h9.34M8 12.67 12.67 8 8 3.33' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --arrow-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.33 8h9.34M8 12.67 12.67 8 8 3.33' stroke='%23080808' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (max-width: 1199px) {
  :root { --gutter: 40px; --section: 160px; }
}

@media (max-width: 767px) {
  :root { --gutter: 20px; --section: 100px; --header-h: 64px; }
}

/* ---------- Reset ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.625;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

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

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

button { background: none; border: 0; padding: 0; cursor: pointer; }

h1, h2, h3, h4, p, figure { margin: 0; }

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

[hidden] { display: none !important; }

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

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

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { margin-top: var(--section); }

.accent { color: var(--mint); }

.only-mobile { display: none !important; }

@media (max-width: 767px) {
  .only-mobile { display: revert !important; }
  .only-desktop { display: none !important; }
}

/* ---------- Typography ---------- */

.t-display {
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.89;
  font-weight: 600;
}

.t-h1 {
  font-size: clamp(32px, 4.17vw, 60px);
  line-height: 1.07;
  font-weight: 600;
}

.t-h2 {
  font-size: 40px;
  line-height: 1.22;
  font-weight: 600;
}

.t-h3 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 600;
}

.t-statement {
  font-size: clamp(32px, 4.45vw, 64px);
  line-height: 1;
  font-weight: 400;
  text-indent: 2.9em;
}

.t-statement--sm { font-size: clamp(32px, 4.17vw, 60px); }

.t-lead {
  font-size: 28px;
  line-height: 1.22;
  font-weight: 400;
  color: var(--muted);
}

.t-body {
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
}

.t-label {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--muted-2);
}

@media (max-width: 767px) {
  .t-display { line-height: 1.04; }
  .t-h1 { font-size: 28px; line-height: 1.14; }
  .t-h2 { font-size: 28px; line-height: 1.22; }
  .t-statement { font-size: 28px; line-height: 1.14; text-indent: 0; }
  .t-label { font-size: 16px; line-height: 22px; }
  .t-lead { font-size: 20px; line-height: 1.2; }
  .t-body { line-height: 24px; }
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.btn__icon { width: 16px; height: 16px; flex: none; }

.btn__label, .btn__icon {
  transition: transform 0.4s var(--ease), opacity 0.25s ease;
}

.btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  opacity: 0;
  transform: translateX(-28px);
  transition: transform 0.4s var(--ease), opacity 0.25s ease;
}

@media (hover: hover) {
  .btn:hover .btn__label,
  .btn:hover .btn__icon { transform: translateX(28px); opacity: 0; }
  .btn:hover::after { transform: none; opacity: 1; }
}

.btn--primary { background: var(--mint); color: var(--bg); }
.btn--dark { background: var(--surface-2); color: var(--fg); }
.btn--dark:hover { background: #262626; }
.btn--block { width: 100%; height: 56px; padding-block: 16px; }

.round-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--round);
  color: var(--fg);
  transition: background-color 0.2s ease;
}

.round-btn svg { width: 20px; height: 20px; }
.round-btn:hover { background: var(--round-hover); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  transition: color 0.2s ease;
}

.link-arrow svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--mint); }
.link-arrow:hover svg { transform: translateX(3px); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 16px;
  line-height: 19.5px;
  font-weight: 600;
}

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 50; }
.site-header--bordered { border-bottom: 1px solid var(--line); }

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
}

.site-header__logo img { width: 128px; height: 40px; }

.nav { display: flex; gap: 12px; }

.nav a {
  position: relative;
  padding: 7.5px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 17px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
  transform: translateX(-50%);
}

.header-cta {
  justify-self: end;
  padding: 10.5px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  line-height: 17px;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.header-cta:hover, .header-cta[aria-current="page"] {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--bg);
}

.burger { display: none; justify-self: end; width: 24px; height: 24px; color: var(--fg); }
.burger svg { width: 24px; height: 24px; }

@media (max-width: 767px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-header__logo img { width: 102px; height: 32px; }
  .site-header .nav, .header-cta { display: none; }
  .burger { display: block; }
}

/* ---------- Mobile menu ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  flex: none;
}

.mobile-menu__top img { width: 102px; height: 32px; }
.mobile-menu__close { width: 24px; height: 24px; }

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
}

.mobile-menu__links:first-of-type { margin-top: 48px; }

.mobile-menu__links a {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.5s var(--ease), color 0.2s ease;
}

.mobile-menu.is-open .mobile-menu__links a { opacity: 1; transform: none; }
.mobile-menu__links a:hover { color: var(--mint); }

.mobile-menu__divider { height: 1px; margin-block: 40px; background: var(--line); border: 0; }

.mobile-menu .speed-lines { margin-top: auto; margin-bottom: 75px; margin-inline: -20px; flex: none; }

/* ---------- Speed lines ---------- */

.speed-lines { position: relative; overflow: hidden; pointer-events: none; }

.speed-lines__bar {
  position: absolute;
  left: 0;
  background: var(--grad);
  will-change: transform;
}

/* ---------- Form fields ---------- */

.field { position: relative; }

.field__control {
  display: block;
  width: 100%;
  height: 56px;
  padding: 28px 20px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  line-height: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  outline: none;
  transition: border-color 0.2s ease;
}

textarea.field__control { height: 135px; resize: vertical; min-height: 100px; }

.field__label {
  position: absolute;
  left: 21px;
  top: 19.5px;
  font-size: 14px;
  line-height: 17px;
  font-weight: 600;
  color: var(--muted-2);
  pointer-events: none;
  transition: top 0.2s ease, font-size 0.2s ease, line-height 0.2s ease, color 0.2s ease;
}

.field__control:hover { border-color: var(--round-hover); }

.field__control:focus,
.field__control:not(:placeholder-shown) { border-color: var(--fg); }

.field__control:focus + .field__label,
.field__control:not(:placeholder-shown) + .field__label {
  top: 9px;
  font-size: 12px;
  line-height: 14.6px;
}

.field__error {
  display: none;
  margin-top: 12px;
  font-size: 12px;
  line-height: 14.6px;
  font-weight: 600;
  color: var(--error);
}

.field.is-invalid .field__control { border-color: var(--error); }
.field.is-invalid .field__label { color: var(--error); }
.field.is-invalid .field__error { display: block; }

.form-status {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--mint);
}

.form-status:empty { display: none; }

/* ---------- Newsletter ---------- */

.newsletter { position: relative; width: 100%; max-width: 505px; }

.newsletter__control {
  display: block;
  width: 100%;
  height: 72px;
  padding: 34px 145px 12px 20px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--bg);
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  outline: none;
}

.newsletter__label {
  position: absolute;
  left: 20px;
  top: 24px;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  color: var(--placeholder);
  pointer-events: none;
  transition: top 0.2s ease, font-size 0.2s ease, line-height 0.2s ease;
}

.newsletter__control:focus + .newsletter__label,
.newsletter__control:not(:placeholder-shown) + .newsletter__label {
  top: 12px;
  font-size: 12px;
  line-height: 14.6px;
}

.newsletter__control:focus { box-shadow: 0 0 0 2px var(--mint); }

.newsletter .btn { position: absolute; top: 8px; right: 8px; height: 56px; padding-inline: 20px; }

.newsletter.is-invalid .newsletter__control { box-shadow: 0 0 0 2px var(--error); }
.newsletter.is-invalid .newsletter__label { color: var(--error); }

.newsletter__status {
  position: absolute;
  left: 20px;
  top: calc(100% + 10px);
  font-size: 12px;
  line-height: 14.6px;
  font-weight: 600;
  color: var(--bg);
}

.newsletter.is-invalid .newsletter__status { color: var(--error); }

@media (max-width: 767px) {
  .newsletter__control { height: 64px; padding: 30px 135px 12px 20px; font-size: 16px; line-height: 20px; }
  .newsletter__label { top: 22px; font-size: 16px; line-height: 20px; }
  .newsletter .btn { height: 48px; }
}

/* ---------- News card ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: border-color 0.25s ease;
}

.news-card:hover { border-color: var(--mint); }

.news-card__media {
  aspect-ratio: 395 / 240;
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.news-card:hover .news-card__media img { transform: scale(1.05); }

.news-card__title {
  margin-top: 16px;
  min-height: 64px;
  font-size: 28px;
  line-height: 32px;
  font-weight: 600;
}

.news-card__date {
  margin-top: auto;
  padding-top: 40px;
  font-size: 16px;
  line-height: 26px;
  font-weight: 600;
  color: var(--muted);
}

.news-more { display: flex; justify-content: center; margin-top: 32px; }

@media (max-width: 1199px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-card__title { font-size: 24px; line-height: 30px; }
}

@media (max-width: 767px) {
  .news-grid { grid-template-columns: 1fr; gap: 20px; }
  .news-card__media { aspect-ratio: 303 / 185; }
  .news-card__title { font-size: 20px; line-height: 32px; }
  .news-card__date { padding-top: 24px; }
}

/* ---------- Footer ---------- */

.site-footer { margin-top: var(--section); padding-bottom: 24px; }

.footer-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.footer-top__title {
  font-size: clamp(70px, 7.64vw, 110px);
  line-height: 1.22;
  font-weight: 600;
  transition: color 0.25s ease;
}

.footer-top__title:hover { color: var(--mint); }

.footer-top__email {
  margin-bottom: 18px;
  font-size: 40px;
  line-height: 1.22;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-top__email:hover { color: var(--mint); }

.footer-card {
  margin-top: 24px;
  padding: 16px 0 60px;
  border-radius: 20px;
  background: var(--fg);
  color: var(--bg);
  overflow: hidden;
}

.footer-card__lines {
  height: 113px;
  background: repeating-linear-gradient(to bottom, var(--deco-line) 0 1px, transparent 1px 16px);
}

.footer-card__body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "pages newsletter social";
  align-items: end;
  gap: 24px;
  margin-top: 91px;
  padding-inline: 60px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  font-size: 40px;
  line-height: 48.8px;
  font-weight: 600;
}

.footer-links--pages { grid-area: pages; align-items: flex-start; }
.footer-links--social { grid-area: social; align-items: flex-end; }

.footer-link { display: inline-flex; align-items: center; gap: 8px; }

.footer-link::after {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--mint) var(--arrow-dark) center / 14px no-repeat;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.3s var(--ease);
}

.footer-links--social .footer-link { flex-direction: row-reverse; }

@media (hover: hover) {
  .footer-link:hover::after { opacity: 1; transform: none; }
}

.footer-newsletter {
  grid-area: newsletter;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 505px;
}

.footer-newsletter__title { font-size: 40px; line-height: 50px; font-weight: 600; text-align: center; }
.footer-newsletter__email { font-size: 28px; line-height: 34.2px; font-weight: 600; }
.footer-newsletter .newsletter { margin-top: 24px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--muted-2);
}

.footer-bottom__links { display: flex; gap: 24px; }
.footer-bottom a:hover { color: var(--fg); }

@media (max-width: 1199px) {
  .footer-card__body { grid-template-columns: 1fr 1fr; grid-template-areas: "newsletter newsletter" "pages social"; row-gap: 56px; padding-inline: 40px; }
  .footer-newsletter { width: 100%; }
  .footer-top__email { font-size: 32px; }
}

@media (max-width: 767px) {
  .footer-top { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-top__title { font-size: 70px; line-height: 85.4px; }
  .footer-top__email { margin-bottom: 0; font-size: 28px; line-height: 34.2px; }
  .footer-card { margin-top: 40px; padding: 16px 0 40px; }
  .footer-card__lines { height: 49px; }
  .footer-card__body {
    grid-template-columns: 1fr;
    grid-template-areas: "newsletter" "pages" "social";
    row-gap: 40px;
    margin-top: 40px;
    padding-inline: 16px;
  }
  .footer-newsletter { align-items: flex-start; }
  .footer-newsletter .newsletter { max-width: none; }
  .footer-links { padding-inline: 8px; font-size: 28px; line-height: 34.2px; }
  .footer-links--social { align-items: flex-start; }
  .footer-links--social .footer-link { flex-direction: row; }
  .footer-bottom { flex-direction: column; margin-top: 24px; color: var(--muted); }
  .footer-bottom__links { order: -1; }
}

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
