/* Desima Apps - static publishing site for apps.desima.pl */
:root {
  color-scheme: light;
  --bg: #f7f8f8;
  --bg-elevated: #ffffff;
  --surface: #f0f3f3;
  --surface-strong: #e7ecec;
  --text: #111616;
  --text-muted: #5d6a6a;
  --text-soft: #7b8989;
  --line: #d8e0e0;
  --line-strong: #111616;
  --accent: #55c7c1;
  --accent-dark: #1f8f89;
  --accent-soft: rgba(85, 199, 193, 0.14);
  --shadow: 0 26px 70px -40px rgba(17, 22, 22, 0.34);
  --font-display: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --container: 1220px;
  --nav-h: 68px;
}

html.dark {
  color-scheme: dark;
  --bg: #0b0f0f;
  --bg-elevated: #101616;
  --surface: #151d1d;
  --surface-strong: #1c2727;
  --text: #f2f7f6;
  --text-muted: #b2c0bf;
  --text-soft: #748383;
  --line: #243131;
  --line-strong: #e5eeee;
  --accent: #55c7c1;
  --accent-dark: #8be2dd;
  --accent-soft: rgba(85, 199, 193, 0.13);
  --shadow: 0 32px 90px -42px rgba(0, 0, 0, 0.78);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, var(--accent-soft), transparent 28rem),
    linear-gradient(180deg, var(--bg), var(--bg));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image:
    linear-gradient(rgba(127, 140, 140, 0.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 140, 140, 0.36) 1px, transparent 1px);
  background-size: 48px 48px;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--line-strong);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(64px);
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  height: 26px;
  width: auto;
}

.brand-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.logo-light {
  display: block;
}

.logo-dark {
  display: none;
}

html.dark .logo-light {
  display: none;
}

html.dark .logo-dark {
  display: block;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.nav-link,
.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-action:hover,
.nav-action:focus-visible {
  color: var(--text);
  border-color: var(--line);
  outline: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-action {
  background: transparent;
  cursor: pointer;
}

.nav-action:active,
.button:active,
.app-card:active,
.doc-link:active {
  transform: translateY(1px) scale(0.99);
}

.hero {
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  align-items: center;
  padding: clamp(46px, 7vw, 92px) 0 clamp(42px, 6vw, 76px);
  border-bottom: 2px solid var(--line-strong);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.035em;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin-top: 22px;
  font-size: clamp(3.1rem, 8.5vw, 7.6rem);
}

.legal-title {
  max-width: 900px;
  font-size: clamp(2.25rem, 8vw, 5.6rem);
}

.legal-title span {
  display: block;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4.9rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  line-height: 1.05;
}

.lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.8vw, 1.34rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid var(--line-strong);
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: #081010;
  outline: none;
}

.button.secondary {
  background: transparent;
  color: var(--text);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--surface-strong);
  color: var(--text);
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.hero-panel {
  position: relative;
  border: 2px solid var(--line-strong);
  background: linear-gradient(135deg, var(--bg-elevated), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.device-stage {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 18px;
  align-items: end;
  min-height: 520px;
  padding: clamp(22px, 4vw, 42px);
}

.phone-frame,
.tablet-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: 0 22px 55px -36px rgba(0, 0, 0, 0.82);
}

.phone-frame {
  align-self: end;
  max-width: 240px;
  margin-bottom: 10px;
  border-radius: 34px;
}

.tablet-frame {
  margin-top: 52px;
  border-radius: 28px;
}

.phone-frame img,
.tablet-frame img {
  width: 100%;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.status-item {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.status-item:last-child {
  border-right: none;
}

.status-label {
  display: block;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-value {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1;
}

.section {
  padding: clamp(68px, 9vw, 124px) 0;
}

.section.compact {
  padding: clamp(48px, 6vw, 76px) 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 0.55fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--line-strong);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  gap: 18px;
  align-items: stretch;
}

.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 190px;
  padding: clamp(22px, 3.2vw, 38px);
  border: 2px solid var(--line-strong);
  background: var(--bg-elevated);
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.app-card:hover,
.app-card:focus-visible {
  background: var(--surface);
  border-color: var(--accent);
  outline: none;
}

.app-icon {
  width: clamp(70px, 10vw, 118px);
  height: clamp(70px, 10vw, 118px);
  border-radius: 23%;
  box-shadow: 0 18px 38px -24px rgba(0, 0, 0, 0.7);
}

.app-card h3 {
  margin-bottom: 8px;
}

.app-card p {
  max-width: 620px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.arrow-box {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--accent-dark);
}

.doc-panel,
.info-panel,
.legal-panel,
.support-panel {
  border: 2px solid var(--line-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.doc-panel {
  padding: clamp(22px, 3vw, 34px);
}

.doc-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.doc-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  transition: color 180ms ease;
}

.doc-link strong {
  color: var(--text);
}

.doc-link:hover,
.doc-link:focus-visible {
  color: var(--accent-dark);
  outline: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: start;
}

.feature-list {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--line-strong);
}

.feature-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.feature-index {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 900;
}

.feature-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.62;
}

.screen-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.screen-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.screen-card img {
  width: 100%;
}

.screen-card figcaption {
  padding: 12px 14px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--line-strong);
  background: var(--bg-elevated);
}

.meta-cell {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.meta-cell:last-child {
  border-right: none;
}

.meta-label {
  display: block;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-value {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1;
}

.copy-block {
  max-width: 920px;
  padding: clamp(24px, 4vw, 42px);
  border: 2px solid var(--line-strong);
  background: var(--bg-elevated);
}

.copy-block p,
.copy-block li {
  color: var(--text-muted);
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.copy-block h2,
.copy-block h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.08;
}

.copy-block h2:first-child,
.copy-block h3:first-child {
  margin-top: 0;
}

.copy-block ul {
  padding-left: 1.2rem;
}

.notice {
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.contact-box {
  display: grid;
  gap: 10px;
  padding: clamp(24px, 4vw, 38px);
  border: 2px solid var(--line-strong);
  background: var(--bg-elevated);
  max-width: 720px;
}

.contact-box a {
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 44px 0 34px;
  border-top: 2px solid var(--line-strong);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.footer-grid p {
  margin: 8px 0 0;
  color: var(--text-muted);
  max-width: 620px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent-dark);
  outline: none;
}

.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms cubic-bezier(0.16, 1, 0.3, 1), transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.pulse-line {
  position: relative;
  overflow: hidden;
}

.pulse-line::after {
  content: "";
  position: absolute;
  left: -30%;
  top: 0;
  width: 30%;
  height: 2px;
  background: var(--accent);
  animation: pulseLine 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes pulseLine {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateX(430%);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .feature-grid,
  .app-grid,
  .section-head {
    grid-template-columns: 1fr;
  }

  .device-stage {
    min-height: auto;
  }

  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .meta-cell:nth-child(2) {
    border-right: none;
  }

  .meta-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  :root {
    --nav-h: auto;
  }

  .container {
    width: min(100% - 28px, var(--container));
  }

  .site-nav {
    position: relative;
    height: auto;
  }

  .nav-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 0;
  }

  .nav-links,
  .nav-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  h1 {
    font-size: clamp(2.45rem, 14vw, 4.7rem);
  }

  .legal-title {
    font-size: clamp(2.15rem, 10.6vw, 3.7rem);
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .device-stage {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    max-width: 260px;
    margin: 0 auto;
  }

  .tablet-frame {
    margin-top: 0;
  }

  .status-strip,
  .screen-row,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .status-item,
  .meta-cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .status-item:last-child,
  .meta-cell:last-child {
    border-bottom: none;
  }

  .app-card {
    grid-template-columns: 1fr;
  }

  .arrow-box {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
