/* Gruuvr Dark theme — derived from gruuvr_themes.json (gruuvr-dark) */

@font-face {
  font-family: "Cutive Mono";
  src: url("../fonts/CutiveMono-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --scroll-progress: 0;
  --bg-1-opacity: 1;
  --bg-2-opacity: 0;
  --bg-3-opacity: 0;

  /* Panel */
  --bg-app: #16181a;
  --bg-panel: #1e2124;
  --bg-panel-secondary: #25292d;
  --border-panel: #3a3f44;

  /* Text */
  --text-primary: #e8e6e2;
  --text-secondary: #a8aaa4;
  --text-muted: #7a7d80;

  /* Brand & accents */
  --kinkajou-pink: #faacbf;
  --neon-cyan: #00dfff;
  --neon-cyan-low: #84b4ce;
  --active-cyan: #00cfff;
  --groove-blue: #35cde5;
  --graphite: #20272a;
  --graphite-surface: #24282b;
  --override-purple: #8f63d9;
  --new-pink: #f0a6bc;

  /* Controls */
  --button-fill: #20272a;
  --button-text: #f7f5f0;
  --active-button-fill: #00cfff;
  --active-button-text: #111417;

  /* Layout */
  --radius-panel: 14px;
  --radius-control: 10px;
  --shadow-glow-cyan: 0 0 24px rgba(0, 207, 255, 0.18);
  --shadow-glow-pink: 0 0 20px rgba(250, 172, 191, 0.22);

  font-family: "Cutive Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain — echoes app panel texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Ambient cyan glow */
body::after {
  content: "";
  position: fixed;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(0, 223, 255, 0.07) 0%, transparent 68%);
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1140px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.container-wide {
  width: min(1240px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header — mirrors app header row */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(58, 63, 68, 0.65);
  backdrop-filter: blur(8px);
  background: rgba(22, 24, 26, 0.82);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  flex-wrap: wrap;
}

.brand-row a.brand-link:hover .brand-wordmark {
  color: var(--text-primary);
}

.brand-logo {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 8px rgba(250, 172, 191, 0.35));
}

.brand-wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.15s;
}

.brand-byline {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kinkajou-pink);
  opacity: 0.88;
  padding-left: 0.15rem;
}

@media (max-width: 640px) {
  .brand-byline {
    display: none;
  }
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-control);
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-panel-secondary);
  border-color: var(--border-panel);
}

.nav-link.is-active {
  color: var(--active-button-text);
  background: var(--active-cyan);
  border-color: transparent;
}

/* Panels */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.panel-accent {
  position: relative;
  overflow: hidden;
}

.panel-accent::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan-low), var(--neon-cyan));
  opacity: 0.85;
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

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

  .app-showcase {
    order: -1;
    max-width: 36rem;
    margin-inline: auto;
  }
}

.hero-eyebrow,
.section-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-cyan-low);
  margin: 0 0 0.85rem;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 4.8vw, 3rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.hero-lead {
  margin: 0 0 1.85rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 30rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.15rem;
  margin-bottom: 1.35rem;
}

.text-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.text-link:hover {
  color: var(--neon-cyan);
  text-decoration: none;
}

.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-chips li {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-panel);
  border-radius: 999px;
  background: rgba(30, 33, 36, 0.65);
}

/* App screenshot showcase */
.app-showcase {
  margin: 0;
}

.app-showcase-frame {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border-panel);
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04) inset,
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 48px rgba(0, 207, 255, 0.12);
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(180deg, #25292d 0%, #1e2124 100%);
  border-bottom: 1px solid var(--border-panel);
}

.window-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3f44;
}

.window-chrome span:nth-child(1) { background: #5c6066; }
.window-chrome span:nth-child(2) { background: #4a4f55; }
.window-chrome span:nth-child(3) { background: #3a3f44; }

.app-showcase-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Feature cards */
.features {
  padding: 0 0 4rem;
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

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

.feature-card {
  padding: 1.35rem 1.25rem 1.45rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(0, 223, 255, 0.28);
  box-shadow: 0 0 24px rgba(0, 207, 255, 0.06);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  color: var(--active-cyan);
  border: 1px solid rgba(0, 207, 255, 0.35);
  border-radius: 6px;
  background: rgba(0, 207, 255, 0.08);
}

.feature-card h3 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.feature-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Download page */
.download-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2rem 0 3.5rem;
}

.download-card {
  max-width: 34rem;
  margin-inline: auto;
  padding: 2rem 1.75rem 1.75rem;
}

.download-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.version-line {
  margin: 0 0 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.download-card .lead {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.steps {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.75rem;
  border-top: 1px solid var(--border-panel);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.steps li:first-child {
  border-top: none;
}

.steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kinkajou-pink);
  box-shadow: 0 0 8px rgba(250, 172, 191, 0.45);
}

.steps strong {
  color: var(--text-primary);
}

.support-line {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

a {
  color: var(--neon-cyan-low);
  text-decoration: none;
}

a:hover {
  color: var(--neon-cyan);
  text-decoration: underline;
}

/* Apple-style macOS download button */
.mac-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 1.35rem 0.72rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mac-download-btn:hover {
  background: #252525;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 12px 28px rgba(0, 0, 0, 0.4);
}

.mac-download-btn:active {
  transform: translateY(0);
}

.mac-download-btn:focus-visible {
  outline: 2px solid var(--active-cyan);
  outline-offset: 3px;
}

.mac-download-btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.mac-download-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.mac-download-btn .apple-mark {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.mac-download-btn .btn-label {
  line-height: 1.2;
}

.mac-download-btn .btn-sublabel {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 0.1rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border-panel);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.site-footer a {
  color: var(--kinkajou-pink);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Homepage — scroll-driven night/day transition */
html.page-home-root {
  scroll-behavior: smooth;
}

body.page-home {
  overflow-x: hidden;
}

body.page-home::before,
body.page-home::after {
  display: none;
}

body.page-home .home-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.page-home .hero-background {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 0.05s linear;
}

body.page-home .hero-background--1 {
  background-image: url("../img/hero-background-1.png");
  opacity: var(--bg-1-opacity);
}

body.page-home .hero-background--2 {
  background-image: url("../img/hero-background-2.png");
  opacity: var(--bg-2-opacity);
}

body.page-home .hero-background--3 {
  background-image: url("../img/hero-background-3.png");
  opacity: var(--bg-3-opacity);
}

body.page-home .hero-scrim {
  position: absolute;
  inset: 0;
  opacity: 0.92;
  background: linear-gradient(
    105deg,
    rgba(8, 10, 14, 0.88) 0%,
    rgba(8, 10, 14, 0.55) 42%,
    rgba(8, 10, 14, 0.18) 100%
  );
}

body.page-home .hero-scrim::after {
  display: none;
}

/* App showcase — fixed on right */
body.page-home .app-showcase-anchor {
  position: fixed;
  top: 50%;
  right: max(1.25rem, calc((100vw - 1140px) / 2));
  transform: translateY(-50%);
  z-index: 2;
  width: min(48vw, 520px);
  margin: 0;
}

body.page-home .app-showcase-frame {
  border-radius: 12px;
  border: 1px solid var(--border-panel);
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04) inset,
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(0, 207, 255, calc(0.12 * (1 - var(--scroll-progress))));
}

body.page-home .app-showcase-images {
  position: relative;
  line-height: 0;
}

body.page-home .app-showcase-img {
  display: block;
  width: 100%;
  height: auto;
}

body.page-home .app-showcase-img--light {
  position: absolute;
  inset: 0;
  opacity: var(--scroll-progress);
}

body.page-home .app-showcase-img--dark {
  opacity: calc(1 - var(--scroll-progress));
}

body.page-home .page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
}

body.page-home .site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 10, 14, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

body.page-home .brand-logo-wrap .brand-logo--dark {
  display: none;
}

body.page-home .brand-logo--light {
  opacity: 1;
  position: static;
  filter: drop-shadow(0 0 8px rgba(250, 172, 191, 0.35));
}

body.page-home .brand-wordmark {
  color: var(--text-primary);
}

body.page-home .brand-byline {
  color: var(--kinkajou-pink);
}

body.page-home .nav-link {
  color: var(--text-secondary);
}

body.page-home .nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-panel-secondary);
  border-color: var(--border-panel);
}

body.page-home .home-scroll-track {
  min-height: 200vh;
}

body.page-home .home-scroll-content {
  width: min(32rem, calc(42vw - 1.5rem));
  max-width: min(32rem, calc(42vw - 1.5rem));
  margin-left: max(1.25rem, calc((100vw - 1140px) / 2));
  margin-right: auto;
  padding-top: clamp(2rem, 8vh, 4rem);
  padding-bottom: 4rem;
  padding-right: 1rem;
  text-align: left;
}

body.page-home .home-features .section-header h2 {
  color: var(--text-primary);
}

body.page-home .hero-copy {
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 2rem;
}

body.page-home .hero-copy,
body.page-home .home-features,
body.page-home .site-footer-home {
  color: var(--text-primary);
}

body.page-home .hero-lead,
body.page-home .feature-card p {
  color: var(--text-secondary);
}

body.page-home .hero-eyebrow,
body.page-home .section-eyebrow {
  color: var(--neon-cyan-low);
}

body.page-home .text-link {
  color: var(--text-muted);
}

body.page-home .spec-chips li {
  color: var(--text-muted);
  border-color: var(--border-panel);
  background: rgba(30, 33, 36, 0.65);
}

body.page-home .home-features .feature-card {
  background: color-mix(in srgb, var(--bg-panel) calc((1 - var(--scroll-progress)) * 100%), rgba(255, 255, 255, 0.82));
  border-color: color-mix(in srgb, var(--border-panel) calc((1 - var(--scroll-progress)) * 100%), rgba(0, 0, 0, 0.1));
}

body.page-home .home-features .feature-card h3 {
  color: color-mix(in srgb, var(--text-primary) calc((1 - var(--scroll-progress)) * 100%), #2a2d28);
}

body.page-home .home-features {
  padding: 2rem 0 3rem;
}

body.page-home .home-features .features-grid {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

body.page-home .site-footer-home {
  border-top: none;
  text-align: left;
  padding-bottom: 2rem;
  opacity: 0.9;
}

body.page-home .site-footer-home a {
  color: var(--kinkajou-pink);
}

@media (max-width: 900px) {
  body.page-home .app-showcase-anchor {
    display: none;
  }

  body.page-home .app-showcase-mobile {
    display: block;
    width: 100%;
    max-width: 28rem;
    margin: 0 0 2rem;
  }

  body.page-home .home-scroll-track {
    min-height: 150vh;
  }

  body.page-home .home-scroll-content {
    width: 100%;
    max-width: 100%;
    margin-left: max(1.25rem, calc((100vw - 1140px) / 2));
    padding-top: 1rem;
    padding-right: 1.25rem;
  }

  body.page-home .hero-copy {
    min-height: auto;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
  }
}

body.page-home .app-showcase-mobile {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  body.page-home .hero-background,
  body.page-home .app-showcase-img {
    transition: none;
  }
}
