/* =========================
   GLOBAL RESET
========================= */

:root {
  --font-heading: "Encode Sans", sans-serif;
  --font-body: "Krub", sans-serif;
  --space-x: 80px;
  --space-y: 48px;
  --text-color: #f4f4f4;
  --muted-color: #848484;
}

.container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BODY + THEMES
========================= */

.honeypot {
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  opacity: 0;
}

button:focus-visible {
  outline: 2px solid #d29c07;
  outline-offset: 2px;
}

.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;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  font-family: var(--font-body);
  color: var(--text-color);
}

html,
body {
  height: 100%;
  min-height: 100%;
}

.theme-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.contact-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 800;
}

/* DARK THEME */
body.dark {
  background: url("assets/images/naktis.jpg") center/cover no-repeat;
  background-attachment: scroll;
  background-position: center;
  background-position: center 35%;
}

body.dark .navbar {
  background: rgba(4, 4, 4, 0.35);
}

/* LIGHT THEME */
body.light {
  background: url("assets/images/diena.jpg") center/cover no-repeat;
  background-attachment: scroll;
  background-position: center;
  background-position: center 35%;
}

body.light .navbar {
  background: rgba(58, 69, 77, 0.35);
}

/* OVERLAY EFFECT */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

/* DARK OVERLAY */
body.dark::before {
  background: radial-gradient(
    ellipse at center,
    rgba(4, 4, 4, 0) 10%,
    rgba(4, 4, 4, 0.32) 32%,
    rgba(4, 4, 4, 0.78) 62%,
    rgba(4, 4, 4, 0.985) 100%
  );
}

/* LIGHT OVERLAY */
body.light::before {
  background: radial-gradient(
    ellipse at center,
    rgba(210, 220, 228, 0) 14%,
    rgba(120, 132, 145, 0.22) 42%,
    rgba(58, 69, 77, 0.72) 74%,
    rgba(18, 22, 28, 0.9) 100%
  );
}

/* =========================
   NAVBAR
========================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  isolation: isolate;

  display: flex;
  align-items: center;

  width: 100%;
  padding: 16px var(--space-x);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  padding-top: 0;

  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  z-index: 999;
  overflow: visible;

  background: rgba(0, 0, 0, 0.65);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.28);

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  isolation: isolate;

  background-image: none !important;
  backdrop-filter: blur(12px);
}

.mobile-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22),
    rgba(0, 0, 0, 0.38)
  );
}

body.light .mobile-menu::before {
  background: linear-gradient(
    to bottom,
    rgba(131, 144, 157, 0.1),
    rgba(131, 144, 157, 0.22)
  );
}

.navbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;

  background: rgba(244, 244, 244, 0.28);
}

/* =========================
   LOGO
========================= */

.logo {
  width: 96px;
  height: 40px;
  object-fit: contain;
  justify-content: center;
}

/* =========================
   NAV LINKS
========================= */

.nav-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.nav-links a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  padding: 8px;

  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;

  height: 1px;
  background: var(--text-color);

  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
  opacity: 0.6;
}

body.dark .nav-links a::after {
  background: #d29c07;
  opacity: 0.85;
  box-shadow: 0 0 8px rgba(210, 156, 7, 0.25);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* =========================
   CONTROLS (RIGHT SIDE)
========================= */

.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: var(--space-x);
}

/* =========================
   TOGGLE GROUPS
========================= */

.lang-toggle,
.theme-toggle {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
}

.mobile-menu-btn {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-size: 24px;
}

/* =========================
   SHARED BUTTON STYLE
========================= */

.lang-btn,
.theme-btn {
  width: 40px;
  height: 37px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: none;
  border: none;
  color: var(--text-color);

  position: relative;
  z-index: 1;
  cursor: pointer;
}

.theme-btn img {
  display: block;
  transform: translateX(0.5px);
}

/* TEXT BUTTON */
.lang-btn {
  font-size: 14px;
  font-weight: 500;
  transform: translateX(0.5px);
}

.mobile-lang-btn,
.mobile-theme-btn {
  background: transparent;
  border: none;
  color: var(--text-color);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.mobile-lang-btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

.mobile-theme-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

.mobile-lang-btn,
.mobile-theme-btn {
  opacity: 1;
  color: var(--text-color);
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}

.mobile-lang-btn.inactive,
.mobile-theme-btn.inactive {
  opacity: 0.45;
}

.mobile-lang-btn.active,
.mobile-theme-btn.active {
  opacity: 1;
}

/* ICON */
.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* =========================
   INDICATORS
========================= */

.lang-btn,
.theme-btn {
  transition: all 0.2s ease;
  opacity: 0.5;
  transform: scale(1);
  transition:
    opacity 0.25s ease,
    filter 0.25s ease;
  opacity: 0.45;
  filter: brightness(0.85);
  will-change: opacity, filter;
}

/* ACTIVE STATE */
.lang-btn.active,
.theme-btn.active {
  opacity: 1;
  filter: brightness(1.15);
  outline: 1px solid rgb(244, 244, 244);
  outline-offset: 2px;
  border-radius: 4px;
  transform: none;
}

.lang-btn:hover,
.theme-btn:hover {
  opacity: 0.75;
}

/* =========================
   HERO SECTION
========================= */

.hero-title {
  font-size: clamp(34px, 4vw, 72px);
  font-weight: 800;
  color: var(--text-color);

  max-width: 800px;
  position: relative;
  z-index: 2;

  text-shadow: 0px 12px 30px rgba(0, 0, 0, 0.65);

  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-line {
  display: block;

  opacity: 0;
  transform: translateX(-72px);

  animation: heroLineSlide 1.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;

  will-change: transform, opacity;
}

.hero-line-2 {
  animation-delay: 0.22s;
}

@keyframes heroLineSlide {
  0% {
    opacity: 0;
    transform: translateX(-72px);
  }

  55% {
    opacity: 0.72;
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

body.light .hero-title {
  text-shadow: 0px 10px 20px rgba(58, 69, 77, 0.65);
}

body.dark .hero-dot {
  color: #d29c07;
}

/* override LIGHT */
body.light .hero-dot {
  color: var(--text-color);
}

body.dark .about-dot {
  color: #d29c07;
}

/* override LIGHT */
body.light .about-dot {
  color: var(--text-color);
}

.about-dot {
  white-space: nowrap;
}

/* =========================
   HERO LAYOUT
========================= */

.hero {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-x);
  position: relative;
}

.hero-mobile {
  display: none;
}

.hero-bottom {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;

  position: relative;
  z-index: 2;

  opacity: 0.52;
}

.logo-link {
  display: flex;
  align-items: center;
}

.mobile-only {
  display: none;
}

.hero-logo {
  width: 613px;
  height: 116px;
  object-fit: contain;

  opacity: 0;
  transform: translateX(40px);
  animation: logoIn 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.1s;
}

@keyframes logoIn {
  to {
    opacity: 0.52;
    transform: translateX(0);
  }
}

/* =========================
   FOOTER
========================= */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  padding: 16px var(--space-x);
  height: 113px;
  width: 100%;

  color: #848484;
}

/* LEFT SIDE */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* TEXT  */
.footer-company,
.footer-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

/* RIGHT SIDE */
.footer-right {
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

.footer-right span + span {
  margin-left: 24px;
}

/* LIGHT MODE */
body.light .footer {
  color: #e0e5ea;
}

/* =========================
   ABOUT SECTION
========================= */

.about {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

/* TITLE */
.about-title {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 40px;
  color: var(--text-color);
  margin: 0 auto 46px;
  max-width: 600px;
  text-shadow: 0px 10px 20px rgba(4, 4, 4, 0.5);
  line-height: 1.3;
  transform: translateX(-1px);
  transform: translateZ(0);

  width: fit-content;
}

body.light .about-title {
  text-shadow: 0px 10px 20px rgba(58, 69, 77, 0.5);
}

/* =========================
   ABOUT CARDS
========================= */

.about-cards {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 24px;
  flex-wrap: wrap;
  align-items: stretch;
}

/* INDIVIDUAL CARD */
.about-card {
  max-width: 420px;
  min-width: 0;
  min-height: 294px;
  width: 100%;
  padding: 32px;
  flex: 1 1 260px;
  gap: 32px;

  display: flex;
  flex-direction: column;
  text-align: left;

  border-radius: 10px;

  position: relative;
  overflow: hidden;
  background-clip: padding-box;

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

  box-shadow: 0px 18px 26px rgba(4, 4, 4, 0.45);

  opacity: 0;
  animation: premiumFadeUp 1.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.28s);
  animation-fill-mode: both;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;

  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
}

/* ABOUT PAGE SPLIT LAYOUT */
.about-cards-split {
  display: flex;
  flex-direction: column;
  gap: 24px;

  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* TOP ROW */
.about-cards-split .about-row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  width: 100%;
}

/* TOP ROW CARDS */
.about-cards-split .about-row .about-card {
  flex: 1;
  min-width: 0;
  max-width: none;
}

/* BOTTOM CARD */
.about-cards-split .about-card-wide {
  width: 100%;
  max-width: none;

  flex: 0 0 auto;
  min-height: 0;
}

.work-cards .about-card {
  opacity: 0;
  transform: translateY(14px) scale(0.98);

  animation: workCardIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.1s + 0.25s);
}

@keyframes workCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.about-card-wide {
  width: 100%;
  max-width: 420px;
}

@keyframes premiumFadeUp {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

body.dark .about-card {
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.35),
    rgba(10, 10, 10, 0.15)
  );
  box-shadow:
    0px 26px 34px rgba(4, 4, 4, 0.6),
    0px 8px 18px rgba(4, 4, 4, 0.4);
}

body.light .about-card {
  background: linear-gradient(
    to bottom,
    rgba(40, 50, 58, 0.28) 75%,
    rgba(70, 90, 105, 0.12) 100%
  );
  box-shadow:
    0px 24px 32px rgba(58, 69, 77, 0.4),
    0px 8px 18px rgba(58, 69, 77, 0.25);
}

.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 10px;
  z-index: 0;

  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.27), transparent 45%),
    linear-gradient(315deg, rgba(184, 194, 202, 0.23), transparent 50%);
}

body.light .about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 10px;
  z-index: 0;

  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 40%),
    linear-gradient(315deg, rgba(180, 210, 230, 0.35), transparent 45%);
}

body.dark .about-card:hover {
  transform: translateY(-8px);
  filter: brightness(1.08);

  box-shadow:
    0px 38px 60px rgba(0, 0, 0, 0.7),
    0px 16px 30px rgba(0, 0, 0, 0.5);
}

body.light .about-card:hover {
  transform: translateY(-8px);
  filter: brightness(1.05);

  box-shadow:
    0px 32px 44px rgba(58, 69, 77, 0.45),
    0px 10px 22px rgba(58, 69, 77, 0.3),
    0px 0px 20px rgba(115, 144, 166, 0.18);
}

body.light .footer {
  color: #e0e5ea;
}

.card-text {
  overflow-wrap: break-word;
}

/* =========================
   CARD TYPOGRAPHY
========================= */

.card-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-color);
  line-height: 1.2;
}

.work-cards .card-title {
  min-height: 88px;
}

.card-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--text-color);
  line-height: 1.5;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  gap: 40px;

  flex: 1;
}

.section-logo {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.section-logo-image {
  width: 613px;
  height: auto;
  display: block;
}

.section-logo--subtle .section-logo-image {
  opacity: 0.15;
}

.page {
  min-height: 100dvh;
  overflow-x: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.page-section {
  padding: 48px var(--space-x) 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.contact {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

/* PAGE OVERLAYS — DARK */
body.dark.about-page::before,
body.dark.work-page::before,
body.dark.contact-page::before {
  background: rgba(4, 4, 4, 0.7);
}

/* PAGE OVERLAYS — LIGHT */
body.light.about-page::before,
body.light.work-page::before,
body.light.contact-page::before {
  background: rgba(148, 165, 179, 0.65);
}

.contact-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-start;
  max-width: 720px;
  gap: 24px;
  width: 100%;
}

.contact-title {
  text-shadow: 0px 10px 20px rgba(4, 4, 4, 0.5);
}

body.light .contact-title {
  text-shadow: 0px 10px 20px rgba(58, 69, 77, 0.5);
}

.contact-input,
.contact-textarea {
  width: 100%;
  max-width: 720px;
  padding: 12px 16px;

  border-radius: 5px;
  line-height: 1.5;

  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-color);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

  border: 1px solid rgba(255, 255, 255, 0.12);

  position: relative;

  box-shadow:
    0px 16px 24px rgba(4, 4, 4, 0.45),
    0px 6px 14px rgba(4, 4, 4, 0.28);

  transition: 0.2s ease;
}

.contact-textarea {
  resize: vertical;
}

/* DARK THEME */
body.dark .contact-input,
body.dark .contact-textarea {
  background: linear-gradient(
    to bottom,
    rgba(4, 4, 4, 0.35) 75%,
    rgba(102, 102, 102, 0.175) 100%
  );
}

/* LIGHT THEME */
body.light .contact-input,
body.light .contact-textarea {
  background: linear-gradient(
    to bottom,
    rgba(62, 75, 85, 0.25) 75%,
    rgba(115, 144, 166, 0.1) 100%
  );

  box-shadow:
    0px 24px 32px rgba(58, 69, 77, 0.2),
    0px 8px 18px rgba(58, 69, 77, 0.15);
}

.contact-button {
  width: 100%;
  max-width: 720px;
  height: 48px;

  border-radius: 5px;

  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.5px;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;

  border-radius: 10px;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

/* DARK THEME */
body.dark .contact-button {
  background: rgba(4, 4, 4, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f4;

  box-shadow: 0px 10px 18px rgba(0, 0, 0, 0.35);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease,
    background 0.25s ease;
}

/* LIGHT THEME */
body.light .contact-button {
  background: rgba(131, 144, 157, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.18);

  color: #f4f4f4;

  box-shadow: 0px 16px 28px rgba(58, 69, 77, 0.28);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.contact-button:hover {
  transform: translateY(-2px);
}

body.dark .contact-button:hover {
  transform: translateY(-2px);

  filter: brightness(1.32);

  box-shadow:
    0px 18px 34px rgba(0, 0, 0, 0.45),
    0px 6px 14px rgba(0, 0, 0, 0.25);
}

body.light .contact-button:hover {
  filter: brightness(1.06);
  box-shadow: 0px 18px 32px rgba(58, 69, 77, 0.35);
}

.contact-button:active {
  transform: translateY(0px) scale(0.99);
  box-shadow: 0px 10px 18px rgba(0, 0, 0, 0.25);
}

.contact-form {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

/* WORK PAGE CONTAINER */
.work-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;

  width: 100%;
}

/* WORK CARD OVERRIDE */
.work-cards .about-card {
  flex: 1 1 220px;
  max-width: 260px;
  min-height: 260px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
  max-width: 720px;
}

.contact-details-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 16px;
  white-space: nowrap;
}

.contact-icon {
  width: 16px;
  display: inline-flex;
  justify-content: center;
}

.contact-intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: rgba(244, 244, 244, 0.55);
}

.contact-details,
.contact-details-title,
.contact-row,
.contact-intro {
  text-shadow: 0px 10px 5px rgba(58, 69, 77, 0.5);
}

/* CONTACT FADE */
.contact-fade {
  opacity: 0;
  animation: contactSimpleFade 0.6s ease forwards;
}

@keyframes contactSimpleFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.trusted-by {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 16px;
  margin-top: 8px;

  z-index: 5;
  position: relative;
}

body.dark .trusted-dot {
  background: #d29c07;
}

.trusted-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;

  color: var(--text-color);
}

.trusted-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 16px;
  width: 100%;

  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;

  color: var(--text-color);
}

.trusted-dot {
  width: 4px;
  height: 4px;

  border-radius: 50%;
  background: #f4f4f4;

  flex-shrink: 0;
}

.desktop-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* =========================
   DEFAULT VISIBILITY
========================= */

.mobile-controls {
  display: none;
}

.mobile-menu-btn {
  display: none;
}

/* =========================
   LAPTOP
========================= */

@media (max-width: 1400px) {
  :root {
    --space-x: 48px;
    --space-y: 36px;
  }

  /* NAVBAR */

  .navbar {
    padding: 10px var(--space-x);
  }

  .logo {
    width: 74px;
    height: auto;
  }

  .nav-controls {
    gap: 10px;
    margin-left: 36px;
  }

  .desktop-controls {
    gap: 10px;
  }

  .nav-links a {
    font-size: 14px;
    padding: 6px;
  }

  .lang-toggle,
  .theme-toggle {
    padding: 3px;
    gap: 3px;
  }

  .lang-btn,
  .theme-btn,
  .lang-indicator,
  .theme-indicator {
    width: 34px;
    height: 32px;
  }

  .lang-btn {
    font-size: 13px;
  }

  .theme-icon {
    width: 16px;
    height: 16px;
  }

  .hero-title {
    max-width: 680px;
    font-size: clamp(32px, 3.5vw, 60px);
  }

  .hero-logo,
  .section-logo-image {
    width: 360px;
    height: auto;
  }

  .section-logo--subtle .section-logo-image {
    opacity: 0.15;
  }

  .about-title {
    font-size: 34px;
    margin-bottom: 36px;
  }

  .about-cards-split {
    max-width: 920px;
    gap: 20px;
  }

  .about-cards-split .about-row {
    gap: 20px;
  }

  .about-card {
    padding: 24px;
    min-height: 240px;
  }

  .card-title {
    font-size: 18px;
    line-height: 1.25;
  }

  .card-text {
    font-size: 15px;
    line-height: 1.45;
  }

  .work-cards {
    max-width: 760px;
    margin: 0 auto;
    justify-content: center;
    gap: 18px;
  }

  .work-cards .about-card {
    flex: 0 1 calc(33.333% - 16px);
    min-height: 240px;
    height: auto;
    padding: 24px 28px 28px;
    gap: 8px;
  }

  .work-cards .card-title {
    font-size: 18px;
    line-height: 1.3;
  }

  .work-cards .card-text {
    font-size: 14.5px;
    line-height: 1.45;
    gap: 14px;
  }

  .trusted-list {
    gap: 10px;
    font-size: 14px;
  }

  .footer {
    height: 90px;
  }
}

@media (max-width: 768px) {
  .navbar {
    position: sticky;
    top: 0;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    z-index: 1000;
  }

  .nav-links {
    display: none !important;
  }

  header.navbar {
    position: sticky;
  }

  .mobile-menu {
    z-index: 2000;
    isolation: isolate;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }

  .contact-button {
    width: 100%;
    max-width: 100%;
  }

  .contact-form {
    width: 100%;
  }

  .logo-link {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo {
    width: 72px;
    height: auto;
  }

  .nav-controls {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .desktop-controls {
    display: none !important;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .about-title {
    font-size: 28px;
    line-height: 1.2;
  }

  .card-title {
    font-size: 18px;
    line-height: 1.3;
  }

  .contact-title {
    font-size: 28px;
    line-height: 1.3;
  }

  :root {
    --space-x: 24px;
  }

  .about-cards-split {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .about-cards-split .about-row {
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 420px;
  }

  .about-cards-split .about-card,
  .about-cards-split .about-row .about-card {
    width: 100%;
    max-width: 420px;
    flex: 1 1 auto;
  }

  .about-card {
    height: auto !important;
    min-height: unset !important;
    overflow: visible;
    gap: 18px;
  }

  .mobile-menu.open {
    opacity: 1;
    display: flex;
    visibility: visible;
    pointer-events: auto;
    z-index: 2000;
    isolation: isolate;
  }

  .mobile-menu a {
    padding: 16px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.19);
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: background 0.18s ease;
  }

  .mobile-menu a:active,
  .mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  body {
    background-size: cover;
  }

  body.dark .mobile-menu {
    background: rgba(4, 4, 4, 0.65);
  }

  body.light .mobile-menu {
    background: rgba(131, 144, 157, 0.55);
  }

  body.dark,
  body.light {
    background-attachment: scroll;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    min-height: 100dvh;
  }

  body.dark {
    background-color: #040404;
    background-image: url("assets/images/naktis_mob.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  body.light {
    background-color: #5f6b76;
    background-image: url("assets/images/diena_mob.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  .about-cards-split .about-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .about-cards-split {
    max-width: 340px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .work-cards {
    flex-direction: column;
    align-items: center;
  }

  .work-cards .card-title {
    min-height: 48px;
  }

  .work-cards .about-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 340px;
  }

  .trusted-list {
    flex-direction: column;
    gap: 12px;
  }

  .trusted-dot {
    display: none;
  }

  .hero {
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 24px;
    padding-bottom: 120px;
  }

  .hero-title {
    font-size: 26px;
    line-height: 1.15;

    width: 100%;
    max-width: 100%;

    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hero-line {
    display: flex;
    width: 100%;
  }

  .hero-bottom {
    justify-content: center;
    margin-top: auto;
    padding-bottom: 24px;
    display: none;
  }

  .hero-logo {
    width: 280px;
    height: auto;
    max-width: 100%;
  }

  body::before {
    position: absolute;
  }

  body.about-page .section-logo,
  body.work-page .section-logo,
  body.contact-page .section-logo {
    display: none !important;
  }

  .page-section {
    padding-bottom: 48px;
  }

  .hero-desktop {
    display: none;
  }

  .footer {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    height: auto;
    padding: 16px 20px;
  }

  .footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    align-items: flex-start;
  }

  .footer-right {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    flex-shrink: 0;
    text-align: right;
    gap: 10px;
    white-space: nowrap;
  }

  .footer-company,
  .footer-subtitle,
  .footer-right {
    font-size: 12px;
    line-height: 1.3;
  }

  .footer-right span + span {
    margin-left: 0;
  }

  .footer-subtitle {
    max-width: 170px;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 768px) {
  body.dark,
  body.light {
    background-attachment: scroll;
    background-size: cover;
  }
}

body.light:not(.about-page):not(.work-page):not(.contact-page) .mobile-menu {
  background: rgba(53, 61, 69, 0.55);
}

body.light:not(.about-page):not(.work-page):not(.contact-page)
  .mobile-menu::before {
  background: linear-gradient(
    to bottom,
    rgba(53, 61, 69, 0.1),
    rgba(18, 22, 28, 0.22)
  );
}

a[href^="tel"] {
  color: inherit !important;
  text-decoration: none !important;
}
