/* aFinder website – the same Luna tokens as the app (src/renderer/src/styles/xp.css). */

:root {
  --font: Tahoma, Verdana, 'DejaVu Sans', 'Segoe UI', sans-serif;
  --display: 'Libre Franklin', 'Franklin Gothic Medium', 'Trebuchet MS', sans-serif;
  --mono: 'Lucida Console', Consolas, 'DejaVu Sans Mono', monospace;

  --face: #ece9d8;
  --face-light: #f7f6f0;
  --face-dark: #aca899;
  --border-dark: #716f64;
  --text: #000;
  --ink: #1c1c1a;
  --muted: #6f6d64;
  --link: #215dc6;
  --link-hover: #428eff;

  --window-border: #0831d9;
  --title-gradient: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  --title-btn: linear-gradient(180deg, #4b8bf5 0%, #2a64e8 60%, #1f50d0 100%);
  --title-btn-close: linear-gradient(180deg, #f08b65 0%, #e0441b 55%, #c4320f 100%);

  --taskpane-bg: linear-gradient(180deg, #7ba2e7 0%, #6375d6 100%);
  --task-header: linear-gradient(90deg, #ffffff 0%, #c6d3f7 100%);
  --task-body: #d6dff7;
  --task-header-text: #215dc6;

  --list-bg: #ffffff;
  --header-bg: linear-gradient(180deg, #ffffff 0%, #ebeadb 85%, #d6d2c2 100%);
  --selection: #316ac5;
  --selection-text: #ffffff;
  --luna-orange: #f9b119;

  --pane-w: 236px;
  --gutter: clamp(16px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: #1d4fc4;
  color: var(--text);
  font: 13px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

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

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

code {
  font: 0.92em var(--mono);
  padding: 0 3px;
  background: var(--face-light);
  border: 1px solid #e3e0cf;
}

kbd {
  display: inline-block;
  min-width: 20px;
  margin: 0 1px;
  padding: 0 5px;
  font: 11px/18px var(--font);
  text-align: center;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #ecebe3);
  border: 1px solid var(--face-dark);
  border-bottom-color: var(--border-dark);
  border-radius: 3px;
  box-shadow: 0 1px 0 var(--face-dark);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 6px 12px;
  background: #fff;
}

:focus-visible {
  outline: 1px dotted var(--text);
  outline-offset: 2px;
}

/* ---- desktop & window ------------------------------------------------------------------- */

.desktop {
  min-height: 100vh;
  padding: 28px var(--gutter) 40px;
  /* Luna desktop blue, a soft sky glow and fine grain – no stock wallpaper. */
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(165, 205, 255, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 110%, rgba(10, 40, 140, 0.6), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #3a7be6 0%, #245edb 45%, #1a49b8 100%);
}

.window {
  max-width: 1320px;
  margin: 0 auto;
  border: 3px solid var(--window-border);
  border-top: 0;
  border-radius: 8px 8px 0 0;
  background: var(--face);
  box-shadow:
    0 24px 60px rgba(0, 18, 80, 0.45),
    0 2px 6px rgba(0, 18, 80, 0.3);
}

.titlebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 4px 0 7px;
  margin: 0 -3px;
  border-radius: 8px 8px 0 0;
  background: var(--title-gradient);
  color: #fff;
}

.titlebar-text {
  flex: 1;
  font: bold 13px/1 'Trebuchet MS', var(--font);
  text-shadow: 1px 1px #0a1883;
}

.titlebar-buttons {
  display: flex;
  gap: 2px;
}

.tb-btn {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: var(--title-btn);
  font: bold 12px/1 var(--font);
}

.tb-close {
  background: var(--title-btn-close);
}

.g-min {
  width: 7px;
  height: 3px;
  margin-top: 8px;
  background: #fff;
}

.g-max {
  width: 9px;
  height: 9px;
  border: 1px solid #fff;
  border-top-width: 3px;
}

/* ---- toolbar & address bar --------------------------------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-bottom: 1px solid var(--face-dark);
  overflow-x: auto;
  scrollbar-width: none;
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.tool:hover {
  color: var(--text);
  border-color: var(--face-dark);
  background: linear-gradient(180deg, #fff 0%, #f1efe2 60%, #e3dfcc 100%);
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.05);
}

.tool:active {
  background: #e3dfcc;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.tool-sep {
  flex: 1;
}

.tool-primary {
  font-weight: bold;
}

.addressbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 4px;
  border-bottom: 1px solid var(--face-dark);
}

.address-label {
  color: var(--muted);
}

.address-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid #7f9db9;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
}

.crumb-sep {
  color: var(--muted);
}

/* ---- body: task pane + content ------------------------------------------------------------ */

.body {
  display: grid;
  grid-template-columns: var(--pane-w) minmax(0, 1fr);
  background: var(--list-bg);
}

.taskpane {
  padding: 14px 12px;
  background: var(--taskpane-bg);
}

.taskpane > :first-child {
  position: sticky;
  top: 44px;
}

.task-section {
  margin-bottom: 14px;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.task-header {
  margin: 0;
  padding: 6px 10px;
  background: var(--task-header);
  color: var(--task-header-text);
  font: bold 12px/1.3 var(--font);
}

.task-body {
  margin: 0;
  padding: 8px 10px;
  list-style: none;
  background: var(--task-body);
  border: 1px solid #fff;
  border-top: 0;
}

.task-body a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  text-decoration: none;
}

.task-body a:hover {
  text-decoration: underline;
}

.task-body a.current {
  font-weight: bold;
}

.details {
  display: grid;
  gap: 2px;
  font-size: 12px;
}

.details span {
  color: #3d3b35;
}

.content {
  min-width: 0;
}

/* ---- hero ----------------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 64px var(--gutter) 0;
  color: #fff;
  /* The XP welcome screen: deep blue, a light band on top, an orange rule below. */
  background:
    linear-gradient(180deg, transparent 0 calc(100% - 180px), var(--list-bg) calc(100% - 180px)),
    radial-gradient(ellipse 70% 90% at 15% 0%, #6d93e4 0%, transparent 60%),
    linear-gradient(180deg, #5a7edc 0%, #3260cc 40%, #0d3eb2 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.85) 70%, transparent);
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 180px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--luna-orange) 25%, #fad27a 50%, var(--luna-orange) 75%, transparent);
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 44px;
}

.eyebrow {
  margin: 0 0 14px;
  font: 600 12px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfe0ff;
}

h1 {
  margin: 0;
  font: 800 clamp(34px, 5vw, 60px) / 1.02 var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgba(8, 24, 110, 0.35);
}

h1 em {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  font-style: italic;
  color: #d8e6ff;
}

.lede {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #eef3ff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* XP push buttons: rounded, light, with the blue-and-orange focus glow on the default one. */
.btn {
  display: inline-grid;
  place-items: center;
  min-width: 128px;
  height: 32px;
  padding: 0 18px;
  border: 1px solid #003c74;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f2ec 70%, #d6d0c5 100%);
  color: var(--text);
  font: 13px var(--font);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.btn:hover {
  color: var(--text);
  box-shadow:
    inset 0 -2px 0 #e5a01a,
    inset 0 2px 0 #fbd77b,
    inset 2px 0 0 #f6c552,
    inset -2px 0 0 #f6c552;
}

.btn:active {
  background: linear-gradient(180deg, #e3e2da, #f3f2ec);
}

.btn-default {
  font-weight: bold;
  box-shadow:
    inset 0 -2px 0 #3d6bd9,
    inset 0 2px 0 #cee7ff,
    inset 2px 0 0 #98b8ea,
    inset -2px 0 0 #98b8ea;
}

/* ---- screenshots ---------------------------------------------------------------------------- */

.shot {
  margin: 0;
}

.shot img {
  border-radius: 7px 7px 0 0;
  box-shadow:
    0 0 0 1px rgba(0, 20, 90, 0.25),
    0 18px 40px -12px rgba(0, 20, 90, 0.45);
}

.shot-hero {
  position: relative;
  z-index: 1;
}

.shot-hero img {
  box-shadow:
    0 0 0 1px rgba(0, 20, 90, 0.35),
    0 30px 70px -20px rgba(0, 10, 60, 0.7);
}

.shot-small img {
  border-radius: 0;
}

/* ---- facts strip --------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 48px var(--gutter) 0;
  border: 1px solid var(--face-dark);
  background: var(--face-dark);
}

.facts div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: var(--face-light);
}

.facts strong {
  font: 800 28px/1 var(--display);
  color: var(--task-header-text);
}

.facts span {
  color: #3d3b35;
  font-size: 12px;
}

/* ---- sections ------------------------------------------------------------------------------ */

.features,
.themes,
.shortcuts,
.platforms {
  padding: 0 var(--gutter);
}

.feature,
.themes,
.shortcuts,
.platforms {
  padding-top: 64px;
}

/* Section headings are the app's own group rows: chevron, folder, blue label, meta and a rule. */
.group-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}

.group-row h2 {
  margin: 0;
  font: bold 19px/1.2 var(--font);
  color: var(--task-header-text);
}

.chev {
  font-size: 10px;
  color: var(--task-header-text);
}

.group-meta {
  color: var(--muted);
  white-space: nowrap;
}

.group-meta::before {
  content: '· ';
}

.group-line {
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, #8ea8e0, rgba(142, 168, 224, 0.15));
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(260px, 5fr) 8fr;
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.feature.flip .feature-copy {
  order: 2;
}

.feature-copy p {
  margin: 0 0 12px;
  max-width: 54ch;
  color: var(--ink);
}

.feature-copy .feature-lead {
  font: 600 19px/1.35 var(--display);
  letter-spacing: -0.01em;
  color: var(--text);
}

.keys {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  list-style: none;
  border-top: 1px dotted var(--face-dark);
  color: #3d3b35;
}

.console-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(24px, 4vw, 52px);
}

.spec {
  margin: 0;
  border: 1px solid var(--face-dark);
  background: var(--face-light);
}

.spec div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #e3e0cf;
}

.spec div:first-child {
  border-top: 0;
}

.spec dt {
  color: var(--muted);
}

.spec dd {
  margin: 0;
}

.everyday {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.details-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.details-list li {
  padding-left: 14px;
  border-left: 2px solid #c6d3f7;
  color: var(--ink);
}

.details-list b {
  color: var(--text);
}

.section-lead {
  max-width: 70ch;
  margin: -10px 0 22px;
  color: var(--ink);
}

/* ---- themes: an XP property sheet ---------------------------------------------------------- */

.propsheet {
  padding: 10px;
  background: var(--face);
  border: 1px solid var(--face-dark);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding-left: 4px;
  position: relative;
  z-index: 1;
}

.tabs button {
  position: relative;
  margin: 2px -1px -1px 0;
  padding: 3px 10px 4px;
  border: 1px solid #919b9c;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #fff 0%, #f0efe8 80%, #e4e2d6 100%);
  font: 12px var(--font);
  color: var(--text);
  cursor: pointer;
}

.tabs button:hover {
  box-shadow: inset 0 2px 0 var(--luna-orange);
}

.tabs button[aria-selected='true'] {
  z-index: 1;
  margin-top: 0;
  padding-bottom: 6px;
  background: #fcfcfe;
  box-shadow: inset 0 3px 0 var(--luna-orange), inset 0 4px 0 #ffc842;
}

.sheet {
  padding: 18px;
  border: 1px solid #919b9c;
  background: #fcfcfe;
}

.sheet .shot img {
  transition: opacity 0.18s;
}

.sheet .shot img.swapping {
  opacity: 0.25;
}

.sheet-note {
  margin: 14px 0 0;
  color: var(--ink);
}

/* ---- list views (tables) ------------------------------------------------------------------- */

.listview {
  border: 1px solid #7f9db9;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 4px 10px;
  text-align: left;
  font-weight: normal;
  background: var(--header-bg);
  border-right: 1px solid #d6d2c2;
  border-bottom: 1px solid #d6d2c2;
  white-space: nowrap;
}

td {
  padding: 6px 10px;
  vertical-align: top;
  border-bottom: 1px solid #f1efe6;
}

tbody tr:hover td {
  background: #e8eefb;
}

.shortcuts td:first-child,
.platforms td:first-child {
  color: var(--ink);
  white-space: nowrap;
}

/* ---- get: a dialog --------------------------------------------------------------------------- */

.get {
  padding: 72px var(--gutter) 64px;
}

.dialog {
  max-width: 720px;
  margin: 0 auto;
  border: 3px solid var(--window-border);
  border-top: 0;
  border-radius: 8px 8px 0 0;
  background: var(--face);
  box-shadow: 0 18px 44px -14px rgba(0, 20, 90, 0.45);
}

.dialog-title {
  margin: 0 -3px;
  padding: 7px 10px;
  border-radius: 8px 8px 0 0;
  background: var(--title-gradient);
  color: #fff;
  font: bold 13px 'Trebuchet MS', var(--font);
  text-shadow: 1px 1px #0a1883;
}

.dialog-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 22px 24px 20px;
}

.dialog-body > div {
  min-width: 0;
}

.dialog-body h2 {
  margin: 2px 0 8px;
  font: 800 24px/1.1 var(--display);
  letter-spacing: -0.015em;
}

.dialog-body p {
  margin: 0 0 12px;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.cmd {
  margin: 14px 0;
  padding: 12px 14px;
  overflow-x: auto;
  background: #000;
  color: #c0c0c0;
  font: 13px/1.6 var(--mono);
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}

.cmd .prompt {
  color: #fff;
}

.cmd .c {
  color: #6f9b6f;
}

.muted {
  color: var(--muted);
}

.footer {
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid #ebeadb;
  color: var(--muted);
  font-size: 11px;
}

.footer p {
  margin: 0 0 4px;
}

/* ---- status bar ---------------------------------------------------------------------------- */

.statusbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 2px;
  height: 24px;
  padding: 2px;
  border-top: 1px solid #fff;
  background: var(--face);
  font-size: 11px;
}

.status-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid;
  border-color: var(--face-dark) #fff #fff var(--face-dark);
  white-space: nowrap;
  overflow: hidden;
}

.status-field.grow {
  flex: 1;
}

.status-clock {
  font-variant-numeric: tabular-nums;
}

/* ---- entrance ----------------------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.hero-copy > * {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 0.06s;
}

.hero-copy > :nth-child(3) {
  animation-delay: 0.12s;
}

.hero-copy > :nth-child(4) {
  animation-delay: 0.18s;
}

.shot-hero {
  animation: rise 0.8s 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* ---- narrow screens ------------------------------------------------------------------------ */

@media (max-width: 1080px) {
  .feature-grid,
  .console-grid,
  .everyday {
    grid-template-columns: 1fr;
  }
  .feature.flip .feature-copy {
    order: 0;
  }
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .body {
    grid-template-columns: 1fr;
  }
  .taskpane,
  .addressbar {
    display: none;
  }
  .desktop {
    padding: 0;
  }
  .window {
    border-radius: 0;
    border-width: 0;
  }
  .titlebar {
    margin: 0;
    border-radius: 0;
  }
  .hero {
    padding-top: 40px;
    background:
      linear-gradient(180deg, transparent 0 calc(100% - 90px), var(--list-bg) calc(100% - 90px)),
      linear-gradient(180deg, #5a7edc 0%, #3260cc 40%, #0d3eb2 100%);
  }
  .hero::after {
    bottom: 90px;
  }
  .tool-primary {
    margin-left: 8px;
  }
  .statusbar .status-field:nth-child(2) {
    display: none;
  }
  .dialog-body {
    grid-template-columns: 1fr;
  }
  .dialog-body img {
    width: 48px;
  }
  .group-meta {
    display: none;
  }
}

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

.console-grid + .console-grid {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dotted var(--face-dark);
}
