/* funesvault.com: one stylesheet, system fonts only, light and dark in one
   palette taken from the app icon (scripts/app_icon.swift): orange #FF7A26
   to #F04C08, eye white #FFFDF9, black #121110. Nothing is loaded from
   other hosts. */

:root {
  color-scheme: light dark;
  --bg: #fffdf9;              /* eye white */
  --surface: #ffffff;
  --surface-2: #f6efe6;       /* the eye white's shade */
  --text: #121110;            /* black */
  --muted: #5a524a;
  --line: #ece3d8;
  --accent: #f04c08;          /* the ground's deep orange */
  --accent-text: #121110;
  --orange: #ad3600;          /* orange, darkened for text contrast on white (6.3:1) */
  --orange-fill: #f04c08;
  --code-bg: #121110;
  --code-text: #fffdf9;
  --shadow: 0 1px 2px rgba(18, 17, 16, 0.06), 0 8px 24px rgba(18, 17, 16, 0.08);
  --radius: 14px;
  --measure: 68ch;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e0d;            /* black, deepened */
    --surface: #1a1816;
    --surface-2: #24211e;
    --text: #fffdf9;
    --muted: #bdb4aa;
    --line: #332e29;
    --accent: #ff7a26;        /* the ground's light orange */
    --accent-text: #121110;
    --orange: #ff8a3d;
    --orange-fill: #ff6312;
    --code-bg: #000000;
    --code-text: #fffdf9;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: var(--measure); }
/* A prose column inside .wrap keeps the page's left edge. */
.wrap.prose { max-width: 1040px; }
.wrap.prose > * { max-width: var(--measure); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.05rem; }
.brand img { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.hero-icon { width: 220px; height: 220px; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange); margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 16px; font-weight: 750; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--accent-text); border: 1px solid transparent;
}
.button:hover { filter: brightness(1.08); text-decoration: none; }
.button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.meta { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }

/* Install command */
.install { margin-top: 24px; }
.install-label { font-size: 0.9rem; color: var(--muted); margin: 0 0 6px; }
.command {
  display: flex; align-items: stretch; max-width: 100%;
  background: var(--code-bg); color: var(--code-text); border-radius: 10px; overflow: hidden;
}
.command code { flex: 1; min-width: 0; padding: 12px 14px; background: none; color: inherit; border-radius: 0; font: 0.92rem/1.5 var(--font-mono); overflow-x: auto; white-space: nowrap; }
.command button {
  flex: none; border: 0; border-left: 1px solid rgba(255, 253, 249, 0.15); background: transparent; color: var(--code-text);
  font: 600 0.85rem var(--font); padding: 0 14px; cursor: pointer;
}
.command button:hover { background: rgba(255, 253, 249, 0.08); }

/* Sections */
section { padding: 40px 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
.section-intro { color: var(--muted); max-width: 40em; margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card .mark { display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--orange-fill); margin-bottom: 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 46em; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 0.9rem;
}

/* Screenshots: a captioned frame; if an image is missing it's removed and the frame
   shows its caption, so the page never shows a broken image. */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.shot { margin: 0; }
.shot .frame {
  display: grid; place-items: center; min-height: 180px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
}
.shot .frame:empty::after, .shot .frame picture:empty::after { content: "Screenshot coming soon"; color: var(--muted); font-size: 0.9rem; }
.shot img { display: block; width: 100%; }
.shot figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 8px; }

/* Prose pages (privacy, support) */
.page { padding: 48px 0 0; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page h2 { font-size: 1.4rem; margin-top: 40px; }
.page .updated { color: var(--muted); margin-top: -6px; }
.page li { margin: 6px 0; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); color: var(--code-text); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }

.table-wrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; background: var(--surface-2); }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--orange-fill); border-radius: 10px; padding: 14px 16px; }

.not-found { text-align: center; padding: 96px 0 40px; }
.not-found img { width: 120px; height: 120px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 24px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-icon { width: 112px; height: 112px; order: -1; }
  .lede { font-size: 1.08rem; }
  .button { flex: 1 1 auto; justify-content: center; }
  .shots { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: filter 0.15s ease; }
}
