:root {
  color-scheme: light;
  --bg: #f8faf7;
  --bg-strong: #ffffff;
  --text: #17211c;
  --muted: #5f6d66;
  --line: rgba(23, 33, 28, 0.14);
  --accent: #0f8f70;
  --accent-strong: #075c5d;
  --accent-contrast: #ffffff;
  --rust: #b85d25;
  --kotlin: #6e55c8;
  --shadow: 0 18px 60px rgba(28, 44, 36, 0.14);
  --header-bg: rgba(248, 250, 247, 0.76);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111615;
  --bg-strong: #1a211f;
  --text: #f2f6f3;
  --muted: #a6b3ad;
  --line: rgba(242, 246, 243, 0.16);
  --accent: #48c9a6;
  --accent-strong: #8fe7c9;
  --accent-contrast: #08211b;
  --rust: #e08a50;
  --kotlin: #a392ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  --header-bg: rgba(17, 22, 21, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 12%, rgba(184, 93, 37, 0.18), transparent 28rem),
    radial-gradient(circle at 8% 85%, rgba(15, 143, 112, 0.18), transparent 28rem),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

button,
input {
  font: inherit;
}

#code-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: 15px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.is-active {
  border-color: var(--line);
  color: var(--text);
  background: color-mix(in srgb, var(--bg-strong) 72%, transparent);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-strong) 78%, transparent);
  cursor: pointer;
}

.theme-toggle__icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  margin: auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 18%, transparent);
}

:root[data-theme="dark"] .theme-toggle__icon {
  background: transparent;
  box-shadow: inset -5px 0 0 currentColor;
}

.view {
  min-height: 100vh;
}

.hero {
  width: min(920px, calc(100% - 36px));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 118px 0 90px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1,
.cloud-panel h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(48px, 13vw, 118px);
  line-height: 0.92;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.hero__copy {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  border-color: transparent;
  color: var(--accent-contrast);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.button--ghost {
  background: color-mix(in srgb, var(--bg-strong) 72%, transparent);
}

.signal-band {
  width: min(1120px, calc(100% - 36px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 0 88px;
  margin: -46px auto 0;
}

.focus-card,
.cloud-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-strong) 82%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.focus-card {
  min-height: 210px;
  padding: 22px;
}

.focus-card__mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--kotlin), var(--rust));
  font-size: 16px;
  font-weight: 900;
}

.focus-card h2 {
  margin: 26px 0 10px;
  font-size: 22px;
}

.focus-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.cloud-shell {
  width: min(780px, calc(100% - 36px));
  min-height: 100vh;
  display: grid;
  align-items: start;
  padding: 116px 0 58px;
  margin: 0 auto;
}

.cloud-panel {
  padding: clamp(24px, 5vw, 46px);
}

.cloud-panel__top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.cloud-panel__top .eyebrow {
  margin: 0;
}

.cloud-glyph {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--accent-contrast);
  background: linear-gradient(135deg, var(--accent), var(--rust));
  font-size: 28px;
  font-weight: 900;
}

.cloud-panel h1 {
  max-width: 10ch;
  font-size: clamp(42px, 8vw, 78px);
}

.cloud-copy {
  max-width: 540px;
  margin: 20px 0 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.login-form input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  outline: none;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-error {
  min-height: 22px;
  margin: 4px 0 0;
  color: #c83f36;
  font-size: 14px;
  font-weight: 800;
}

:root[data-theme="dark"] .form-error {
  color: #ff9b91;
}

.login-button {
  width: 100%;
  margin-top: 6px;
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    padding: 0 8px;
    font-size: 13px;
  }

  .hero {
    padding-top: 154px;
  }

  .hero__copy {
    font-size: 18px;
  }

  .signal-band {
    grid-template-columns: 1fr;
    margin-top: -34px;
  }

  .cloud-shell {
    padding-top: 158px;
  }
}

@media (max-width: 430px) {
  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .theme-toggle {
    margin-left: auto;
  }
}

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