/* Skylys - site stylesheet. Tokens follow BRANDING.md. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --panel: #f7f7f8;
  --line: #e7e7ea;
  --text: #16181d;
  --muted: #525b6b;
  --faint: #6f7785;
  --hover: #f3f4f6;
  --night: #0e1117;
  --aurora-green: #3ddc97;
  --aurora-teal: #22b8cf;
  --aurora-blue: #3b82f6;
  --green-on-light: #0f9d6b;
  --blue-on-light: #1971c2;
  --wordmark-sky: #16181d;
  --card-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317;
    --panel: #0c0d10;
    --line: #23262d;
    --text: #e8eaed;
    --muted: #a6adb9;
    --faint: #878e9b;
    --hover: #181b21;
    --wordmark-sky: #e8eaed;
    --card-bg: #15171c;
  }
}

:root[data-theme="dark"] {
  --bg: #111317;
  --panel: #0c0d10;
  --line: #23262d;
  --text: #e8eaed;
  --muted: #a6adb9;
  --faint: #878e9b;
  --hover: #181b21;
  --wordmark-sky: #e8eaed;
  --card-bg: #15171c;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 2px solid var(--aurora-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.25;
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}

.logo img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.logo .word {
  color: var(--wordmark-sky);
}

.logo .lys {
  background: linear-gradient(90deg, var(--green-on-light), var(--blue-on-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .lys {
    background: linear-gradient(90deg, var(--aurora-green), var(--aurora-teal));
    -webkit-background-clip: text;
    background-clip: text;
  }
}

:root[data-theme="dark"] .logo .lys {
  background: linear-gradient(90deg, var(--aurora-green), var(--aurora-teal));
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  color: var(--muted);
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: none; }
:root[data-theme="dark"] .theme-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: none; }
  :root:not([data-theme="light"]) .theme-moon { display: block; }
}

.nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  position: relative;
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--aurora-green), var(--aurora-teal), var(--aurora-blue));
}

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

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-soon {
  position: relative;
  background: var(--panel);
  color: var(--faint);
  cursor: default;
  opacity: 0.9;
}

.btn-soon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--aurora-green), var(--aurora-teal), var(--aurora-blue));
  opacity: 0.45;
}

.btn[disabled],
.btn.is-disabled {
  cursor: default;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

/* ---------- Hero (always dark) ---------- */

.hero {
  position: relative;
  background: var(--night);
  color: #e8eaed;
  overflow: hidden;
  padding: 88px 0 72px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--aurora-teal) 55%, transparent),
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
}

.hero h1 {
  color: #f3f5f7;
  max-width: 740px;
  margin: 0.4em auto 0.5em;
}

.hero .eyebrow {
  color: #9aa2b1;
  justify-content: center;
}

.hero p.lead {
  max-width: 560px;
  margin: 0 auto 28px;
  color: #aab1bd;
  font-size: 1.05rem;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hero .btn {
  border-color: #2a2e38;
}

.hero .btn-ghost {
  color: #aab1bd;
}

.hero .btn-ghost:hover {
  color: #fff;
}

.hero-note {
  font-size: 0.82rem;
  color: #7c8495;
  margin-bottom: 0;
}

/* ---------- Real app screenshots ---------- */

.app-shot {
  display: block;
  width: 100%;
  height: auto;
  max-width: 880px;
  border-radius: 12px;
  border: 1px solid #262a33;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.theme-shot-wrap {
  max-width: 420px;
  margin-left: auto;
}

.theme-shot-wrap .app-shot {
  max-width: none;
}

.shot-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-dark {
    display: block;
  }
  :root:not([data-theme="light"]) .shot-light {
    display: none;
  }
}

:root[data-theme="dark"] .shot-dark {
  display: block;
}
:root[data-theme="dark"] .shot-light {
  display: none;
}
:root[data-theme="light"] .shot-dark {
  display: none;
}
:root[data-theme="light"] .shot-light {
  display: block;
}

.mockup-shell {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ---------- Sections ---------- */

.section {
  padding: 84px 0;
}

.section-tight {
  padding: 56px 0;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head.left {
  margin: 0 0 40px;
  text-align: left;
}

.panel-bg {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.feature-card {
  background: var(--card-bg);
  padding: 28px 26px;
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text);
}

.feature-icon svg {
  width: 19px;
  height: 19px;
}

.feature-card h3 {
  margin-bottom: 6px;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
}

.mini-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 24px;
}

.mini-feature {
  background: var(--card-bg);
  padding: 20px 22px;
}

.mini-feature h4 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
}

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

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

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

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

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

/* ---------- Providers ---------- */

.providers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.provider-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-bg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.provider-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------- Two column ---------- */

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 760px) {
  .cols-2 {
    grid-template-columns: 1fr;
  }
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-list li {
  display: flex;
  gap: 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.check-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--blue-on-light);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .check-list svg {
    color: var(--aurora-teal);
  }
}
:root[data-theme="dark"] .check-list svg {
  color: var(--aurora-teal);
}

/* ---------- Download / platform cards ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.platform-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg);
  padding: 32px;
  text-align: center;
}

.platform-card .platform-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  color: var(--text);
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--hover);
  color: var(--faint);
  margin-bottom: 14px;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--night);
  color: #e8eaed;
  text-align: center;
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  width: 700px;
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--aurora-green) 45%, transparent),
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
}

.cta-band h2 {
  color: #f3f5f7;
  position: relative;
}

.cta-band p {
  color: #aab1bd;
  position: relative;
}

.cta-band .hero-ctas {
  position: relative;
}

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

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 48px 0;
  background: var(--panel);
}

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

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--faint);
  font-size: 0.85rem;
}

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

.legal-header {
  padding: 56px 0 8px;
}

.legal-header h1,
.legal-header .legal-updated {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.legal-updated {
  color: var(--faint);
  font-size: 0.88rem;
}

.legal-body h2 {
  margin-top: 2em;
  font-size: 1.25rem;
}

.legal-body h3 {
  margin-top: 1.4em;
  font-size: 1.02rem;
}

.legal-body p,
.legal-body li {
  color: var(--muted);
  font-size: 0.97rem;
}

.legal-body ul {
  padding-left: 1.2em;
}

.legal-body a {
  color: var(--blue-on-light);
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .legal-body a {
    color: var(--aurora-teal);
  }
}
:root[data-theme="dark"] .legal-body a {
  color: var(--aurora-teal);
}

.callout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 0.92rem;
  color: var(--text);
  margin: 1.6em 0;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* ---------- Simple contact page ---------- */

.contact-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg);
  padding: 28px;
}

.contact-card + .contact-card {
  margin-top: 16px;
}

.contact-card h3 {
  margin-bottom: 4px;
}

.contact-card a {
  color: var(--blue-on-light);
}

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

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--aurora-blue);
  outline-offset: 1px;
}

.form-status {
  font-size: 0.9rem;
  margin-top: 4px;
  min-height: 1.2em;
}

.form-status.is-error {
  color: #e5484d;
}

.form-status.is-success {
  color: var(--green-on-light);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status.is-success {
    color: var(--aurora-green);
  }
}
:root[data-theme="dark"] .form-status.is-success {
  color: var(--aurora-green);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contact-card a {
    color: var(--aurora-teal);
  }
}
:root[data-theme="dark"] .contact-card a {
  color: var(--aurora-teal);
}
