:root,
[data-theme="dark"] {
  --bg: #050505;
  --bg-soft: #0c0c0c;
  --fg: #f2f2f0;
  --muted: #8a8a84;
  --line: rgba(242, 242, 240, 0.12);
  --accent: #c8f542;
  --header-bg: transparent;
  --menu-bg: rgba(12, 12, 12, 0.96);
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-bg-hover: rgba(255, 255, 255, 0.04);
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
}

[data-theme="light"] {
  --bg: #f4f4f1;
  --bg-soft: #ffffff;
  --fg: #161614;
  --muted: #6b6b66;
  --line: rgba(22, 22, 20, 0.12);
  --accent: #5a8f00;
  --header-bg: rgba(255, 255, 255, 0.72);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --card-bg: #ffffff;
  --card-bg-hover: #fafaf7;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(127, 127, 127, 0.06), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  animation: fade-down 0.7s ease both;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--fg);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-body);
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.logo {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.75;
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
}

[data-theme="light"] .logo img {
  filter: invert(1);
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.85rem, 2.5vw, 2rem);
}

.nav a,
.nav-dropdown > summary {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.nav > a[aria-current="page"],
.nav-dropdown > summary[aria-current="page"] {
  color: var(--fg);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  box-shadow: none !important;
  text-decoration: none !important;
}

.nav-dropdown-menu a:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

.nav-dropdown-menu a[aria-current="page"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  box-shadow: none !important;
  text-decoration: none !important;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "";
  display: inline-block;
  margin-left: 0.35rem;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid currentColor;
  vertical-align: middle;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-dropdown[open] > summary::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 13.5rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--menu-bg);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  z-index: 40;
  display: grid;
  gap: 0.15rem;
  animation: rise 0.2s ease both;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  box-shadow: none !important;
  text-decoration: none !important;
}

.nav-dropdown-menu a:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

.nav-dropdown-menu a[aria-current="page"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  box-shadow: none !important;
  text-decoration: none !important;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-switch a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.lang-switch a:hover {
  color: var(--fg);
}

.lang-switch a[aria-current="true"] {
  color: var(--accent);
}

.lang-switch .lang-sep {
  color: var(--line);
  user-select: none;
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vw, 5rem) clamp(1.25rem, 4vw, 3rem);
}

.hero {
  text-align: center;
  animation: rise 0.9s 0.15s ease both;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.notfound {
  text-align: center;
  animation: rise 0.9s 0.15s ease both;
}

.notfound .code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(5rem, 24vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  background: linear-gradient(180deg, var(--fg), color-mix(in srgb, var(--fg) 35%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound h1 {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.notfound p {
  margin: 0.75rem auto 0;
  max-width: 26rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.tool-placeholder {
  text-align: center;
  max-width: 32rem;
  animation: rise 0.9s 0.15s ease both;
}

.tool-placeholder .tool-eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 85%, transparent);
}

.tool-placeholder h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.tool-placeholder p {
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.btn-home {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-home:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-2px);
}

.main-apps {
  place-items: start center;
  align-content: start;
}

.apps {
  width: min(68rem, 100%);
  animation: rise 0.9s 0.15s ease both;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card-bg);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.app-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--card-bg-hover);
  transform: translateY(-2px);
}

.app-icon {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1rem;
  object-fit: cover;
  background: var(--bg-soft);
}

.app-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.app-card p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.app-cat {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 80%, transparent);
}

@media (max-width: 900px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  animation: fade-up 0.7s 0.25s ease both;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.social {
  display: flex;
  gap: 1.25rem;
}

.social a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  position: relative;
  transition: color 0.2s ease;
}

.social a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

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

.social a:hover::after {
  transform: scaleX(1);
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 0.5rem;
    padding-inline: 1rem;
  }

  .nav {
    gap: 0.55rem;
  }

  .nav a,
  .nav-dropdown > summary {
    font-size: 0.72rem;
  }

  .nav-dropdown-menu {
    left: auto;
    right: 0;
    transform: none;
    min-width: 11.5rem;
  }

  .nav-dropdown-menu a {
    font-size: 0.8rem;
    white-space: normal;
  }

  .lang-switch {
    gap: 0.3rem;
    font-size: 0.72rem;
  }

  .theme-toggle {
    font-size: 0.65rem;
    min-width: 1.9rem;
    height: 1.9rem;
  }

  .site-footer {
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding-inline: 1rem;
  }

  .social {
    gap: 0.85rem;
  }

  .social a {
    font-size: 0.82rem;
  }

  .site-footer p {
    font-size: 0.75rem;
  }
}
