/* Sleepy (sleepy.page) */

:root {
  color-scheme: light dark;

  --bg: #f9f7f3;
  --surface: #fffdfc;
  --surface-muted: #f0ede6;
  --border: #e0dbd2;
  --border-strong: #cfc9be;

  --text: #21242c;
  --text-secondary: #565a64;
  --text-muted: #6a6d76;

  --action: #21242c;
  --action-hover: #343946;
  --action-text: #fffdfc;

  --link: #3d4d8f;
  --link-hover: #21242c;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --measure: 640px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13161d;
    --surface: #1d212b;
    --surface-muted: #282d3a;
    --border: #2a303e;
    --border-strong: #383f50;

    --text: #eae8e3;
    --text-secondary: #a2a8b6;
    --text-muted: #828999;

    --action: #eae8e3;
    --action-hover: #d5d2ca;
    --action-text: #13161d;

    --link: #8e9fe6;
    --link-hover: #eae8e3;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--action);
  color: var(--action-text);
  padding: 8px 12px;
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 20px;
}

main {
  flex: 1;
}

/* Header */

.site-header {
  padding: 28px 0 20px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
}

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

.brand__icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: block;
}

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

.site-nav a {
  color: var(--text-secondary);
  font-size: 14.5px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* Intro (Home) */

.intro {
  padding: 40px 0 36px;
}

.intro h1 {
  margin: 0 0 18px;
  font-size: clamp(1.65rem, 4vw, 2.05rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.intro p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 16.5px;
}

.intro__status {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Screenshots (Home) */

.screenshots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 0 40px;
}

.screenshot {
  margin: 0;
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.screenshot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .screenshots {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 32px;
  }

  .screenshot {
    flex: 0 0 68%;
    scroll-snap-align: start;
  }
}

/* Feature List (Home) */

.feature-list {
  margin: 0;
  padding: 0 0 48px;
  list-style: none;
  border-top: 1px solid var(--border);
}

.feature-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.feature-list h2 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature-list p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Page Header & Prose (Privacy, Terms, Support) */

.page-header {
  padding: 36px 0 24px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.page-header__meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.prose {
  padding-bottom: 56px;
}

.prose h2 {
  margin: 34px 0 10px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 14px;
  color: var(--text-secondary);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 8px;
}

.note {
  margin: 8px 0 28px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--border-strong);
}

.note p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.note p + p {
  margin-top: 8px;
}

/* Support FAQ */

.faq-list {
  margin: 12px 0 28px;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-weight: 500;
  font-size: 15.5px;
  color: var(--text);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 16px;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
  color: var(--text);
}

.faq-item__body {
  padding: 0 0 18px;
  font-size: 15px;
  color: var(--text-secondary);
}

.faq-item__body p:last-child,
.faq-item__body ul:last-child {
  margin-bottom: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--action);
  color: var(--action-text);
}

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

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  background: var(--surface-muted);
  color: var(--text);
}

/* Join page */

.join-section {
  padding: 36px 0 56px;
}

.join-section h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.join-section__lead {
  margin: 0 0 24px;
  color: var(--text-secondary);
}

.code-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.code-box__label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.code-box__value {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.copy-status {
  min-height: 22px;
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.join-steps {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.join-steps h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.join-steps ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 15px;
}

.join-steps li {
  margin-bottom: 6px;
}

.privacy-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* Footer */

.site-footer {
  padding: 0 0 36px;
}

.site-footer__inner {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}
