/* ------------------------------------------------------------------
   Kydnos Labs corporate site
   Design language: generous whitespace, large tight typography,
   alternating light sections with one dark statement section.
   ------------------------------------------------------------------ */

:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #6b6b70;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #0a0a0c;
  --ink-on-dark: #f5f5f7;
  --ink-soft-on-dark: #a1a1a6;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --line: #d2d2d7;
  --radius-card: 24px;
  --radius-pill: 980px;
  --nav-height: 56px;
  --content-width: 1080px;
  --content-narrow: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(0, 113, 227, 0.18);
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--content-narrow);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* ---------------------------------------------------------------
   Navigation
   --------------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-nav.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav-inner {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.875rem;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: none;
}

.nav-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  opacity: 1 !important;
  transition: background 0.2s ease;
}

.nav-cta:hover {
  background: var(--accent-hover);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-open .nav-toggle .icon-open {
  display: none;
}

.nav-open .nav-toggle .icon-close {
  display: block;
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */

.hero {
  padding: calc(var(--nav-height) + 96px) 0 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 320px at 20% 0%, rgba(88, 86, 214, 0.07), transparent 70%),
    radial-gradient(600px 320px at 80% 10%, rgba(0, 113, 227, 0.07), transparent 70%);
}

.hero-inner {
  position: relative;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.75rem, 8vw, 5.75rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 14ch;
  margin: 0 auto;
}

.hero-sub {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 24px auto 0;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 1.0625rem;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink-faint);
}

/* Floating app tiles under the hero copy */

.hero-tiles {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(14px, 3vw, 30px);
  margin-top: 84px;
}

.tile {
  width: clamp(64px, 10vw, 112px);
  height: clamp(64px, 10vw, 112px);
  border-radius: 24%;
  flex: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.tile-1 { background: linear-gradient(135deg, #ff9a62, #ff375f); transform: rotate(-8deg) translateY(10px); }
.tile-2 { background: linear-gradient(135deg, #64d2ff, #0a84ff); transform: rotate(5deg) translateY(-14px); }
.tile-3 { background: linear-gradient(135deg, #30d158, #0fa96b); transform: rotate(-4deg); }
.tile-4 { background: linear-gradient(135deg, #bf5af2, #5e5ce6); transform: rotate(7deg) translateY(-10px); }
.tile-5 { background: linear-gradient(135deg, #ffd60a, #ff9f0a); transform: rotate(-6deg) translateY(12px); }

@media (max-width: 640px) {
  .tile-1,
  .tile-5 {
    display: none;
  }
}

/* ---------------------------------------------------------------
   Shared section styles
   --------------------------------------------------------------- */

.section {
  padding: 110px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--ink-on-dark);
}

.section-head {
  max-width: 620px;
  margin-bottom: 64px;
}

.section-head.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.section-lede {
  font-size: 1.1875rem;
  color: var(--ink-soft);
  margin-top: 16px;
}

.section-dark .section-lede {
  color: var(--ink-soft-on-dark);
}

/* ---------------------------------------------------------------
   Principles
   --------------------------------------------------------------- */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.principle {
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: 40px 36px;
}

.principle h3 {
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.principle p {
  color: var(--ink-soft);
  font-size: 1.0313rem;
}

.principle-num {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 22px;
}

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

/* ---------------------------------------------------------------
   Apps
   --------------------------------------------------------------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.app-card {
  background: var(--bg-alt);
  border-radius: var(--radius-card);
  padding: 40px 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
}

.app-icon {
  width: 76px;
  height: 76px;
  border-radius: 24%;
  margin-bottom: 26px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.app-icon-motionly { background: linear-gradient(135deg, #bf5af2, #5e5ce6); }
.app-icon-productivity { background: linear-gradient(135deg, #64d2ff, #0a84ff); }
.app-icon-health { background: linear-gradient(135deg, #ff9a62, #ff375f); }

/* Outranks the .app-card p body-copy rule below */
.app-card .app-category {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.app-card h3 {
  font-size: 1.4375rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.app-card p {
  color: var(--ink-soft);
  font-size: 1.0313rem;
  margin-bottom: 24px;
}

.app-status {
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.06);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.apps-note {
  margin-top: 56px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.store-badges {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 20px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.store-badge svg {
  width: 20px;
  height: 20px;
  flex: none;
}

@media (max-width: 900px) {
  .apps-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ---------------------------------------------------------------
   About (dark statement section)
   --------------------------------------------------------------- */

.about-statement {
  font-size: clamp(1.625rem, 3.6vw, 2.625rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 22ch;
}

.about-copy {
  margin-top: 40px;
  max-width: 60ch;
  color: var(--ink-soft-on-dark);
  font-size: 1.125rem;
}

.about-copy p + p {
  margin-top: 18px;
}

/* ---------------------------------------------------------------
   Careers
   --------------------------------------------------------------- */

.careers-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

.careers-copy p {
  color: var(--ink-soft);
  font-size: 1.125rem;
  margin-top: 16px;
  max-width: 46ch;
}

.careers-cta {
  justify-self: end;
}

@media (max-width: 820px) {
  .careers-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .careers-cta {
    justify-self: start;
  }
}

/* ---------------------------------------------------------------
   Contact
   --------------------------------------------------------------- */

.contact {
  text-align: center;
}

.contact-mail {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(1.375rem, 3.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

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

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 40px 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-meta p + p {
  margin-top: 4px;
  color: var(--ink-faint);
}

.footer-legal {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-legal a {
  color: var(--ink-soft);
}

.footer-legal a:hover {
  color: var(--ink);
  text-decoration: none;
}

/* ---------------------------------------------------------------
   Legal pages
   --------------------------------------------------------------- */

.legal-page {
  padding: calc(var(--nav-height) + 72px) 0 110px;
}

.legal-page h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.legal-updated {
  color: var(--ink-faint);
  font-size: 0.9375rem;
  margin-top: 14px;
}

.legal-body {
  margin-top: 48px;
}

.legal-body h2 {
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  margin: 44px 0 12px;
}

.legal-body p,
.legal-body li {
  color: #424245;
  font-size: 1.0313rem;
}

.legal-body p + p {
  margin-top: 12px;
}

.legal-body ul {
  padding-left: 22px;
  margin: 12px 0;
}

.legal-body li + li {
  margin-top: 6px;
}

/* ---------------------------------------------------------------
   Reveal animation
   --------------------------------------------------------------- */

/* Hidden state is gated on the .js class main.js adds to <html>,
   so content stays visible when scripts never run. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

  .app-card:hover {
    transform: none;
  }
}

/* ---------------------------------------------------------------
   Mobile navigation
   --------------------------------------------------------------- */

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* The blurred header is the containing block for positioned
     descendants, so the panel is anchored to it with an explicit
     viewport-based height instead of bottom: 0. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--nav-height));
    height: calc(100dvh - var(--nav-height));
    z-index: 99;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 24px;
    background: #ffffff;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: none;
  }

  /* Legal pages have only two nav links and no toggle button,
     so their nav stays inline instead of collapsing. */
  .site-nav-simple .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    height: auto;
    padding: 0;
    background: none;
    overflow: visible;
  }

  .site-nav-simple .nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: normal;
    padding: 0;
  }

  .nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 10px 0;
  }

  .nav-cta {
    margin-top: 12px;
    padding: 12px 28px;
  }

  .nav-open {
    overflow: hidden;
  }

  .section {
    padding: 80px 0;
  }

  .hero {
    padding: calc(var(--nav-height) + 64px) 0 72px;
  }

  .hero-tiles {
    margin-top: 60px;
  }
}
