:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #0e2a47;
  --muted: #5b6b7a;
  --brand: #3ea8ff;
  --brand-2: #1f8df2;
  --accent: #ffdd00;
  --ring: 3px solid rgba(63, 139, 255, .45);
  --radius: 14px;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111213;
    --panel: #1a1b1e;
    --text: #e9eef6;
    --muted: #b8c0cc;
    --brand: #66bfff;
    --brand-2: #7cc6ff;
    --accent: #ffdd00;
    --shadow: 0 10px 24px rgba(0,0,0,.45);
  }
}

/* Base */
html { scroll-behavior: smooth; }
/* Fluid, accessible base font-size — scales between 15px and 18px */
:root { font-size: clamp(15px, 1.5vw + 0.5rem, 18px); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, Noto Sans, 'Apple Color Emoji', 'Segoe UI Emoji';
  background: var(--bg);
  color: var(--text);
  line-height: 1.65; /* slightly more breathing room on mobile */
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1100px, 96vw);
  margin: 0 auto;
  padding: 0 0 2rem;
  box-sizing: border-box;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--panel); padding: .5rem .75rem; border-radius: 8px; box-shadow: var(--shadow); }

header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(6px);
  background: color-mix(in oklab, var(--panel) 85%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--muted) 12%, transparent);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .6rem 0; flex-wrap: wrap;
}
.brand { display: flex; gap: .6rem; align-items: center; font-weight: 700; letter-spacing: .2px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }

.nav a.navlink { font-size: 1rem; padding: .6rem .9rem; border-radius: 10px; }
.nav a.navlink:focus-visible { outline: var(--ring); outline-offset: 2px; }

/* Make nav more finger-friendly on small screens */
.nav nav { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Hero */
.hero-container{ margin-top: 1rem; }
.hero { padding-top: 1rem; text-align: center; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(1.6rem, 4vw + .6rem, 1rem); line-height: 1.12; margin: 0 0 .6rem; }
.lead { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.15rem); margin: 0 auto 1rem; max-width: 56ch; padding: 0 1rem; }
#tagline { margin-top: 15.8px;margin-bottom: 15.8px; }

.cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; margin-bottom: 1rem; }
.btn {
  --bg-btn: var(--brand);
  background: var(--bg-btn);
  color: #08223e;
  border: 0; border-radius: 12px;
  padding: .9rem 1.25rem; font-size: 1rem; font-weight: 700;
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: .6rem;
  transition: transform .12s ease, background .12s ease;
  min-height: 44px; /* meet touch target guidelines */
}
.btn:hover { transform: translateY(-1px); text-decoration: none; background: var(--brand-2); }
.btn:active { transform: translateY(0); }
.btn-secondary { --bg-btn: #e9eff7; color: #0e2a47;  }
@media (prefers-color-scheme: dark) { .btn-secondary { --bg-btn: #2a3441; color: #e9eef6; } }
.btn:focus-visible { outline: var(--ring); outline-offset: 2px; }

/* Media */
.hero-media { margin: 1.5rem auto 0; display: grid; place-items: center; }
.banner {
  width: 100%;
  max-width: 920px;
  border-radius: clamp(10px, 2vw, var(--radius));
  box-shadow: var(--shadow);
  height: auto;
  object-fit: cover;
  display: block;
}

/* Sections */
section { padding: 1rem 0; }
.grid { display: grid; gap: 2rem; }
.features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: .2rem 0 .4rem; font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; }

/* Screenshots (wider, no cropping) */
.shots { 
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  justify-items: center;
  gap: 2rem;
}
figure { margin: 0; }
.shot {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: #0003;
}
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; text-align: center; }

/* About */
.about p { color: var(--muted); }

/* Links */
.link-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Coffee/Support */
.coffee {
  background: var(--accent); color: #1a1a1a; font-weight: 700;
  border-radius: 10px; padding: .85rem 1.1rem; display: inline-flex; gap: .6rem; align-items: center;
  box-shadow: var(--shadow);
}
.support-note { color: var(--muted); max-width: 62ch; margin: .8rem auto 0; }

/* Footer */
footer { border-top: 1px solid color-mix(in oklab, var(--muted) 12%, transparent); padding: 1rem 0; color: var(--muted); font-size: .95rem; text-align: center; }

/* Responsive navigation */
@media (max-width: 800px) {
  /* Hide less important nav items first */
  .nav a.navlink[href="#screenshots"],
  .nav a.navlink[href="#links"] {
    display: none;
  }
}

@media (max-width: 640px) {
  /* Hide more nav items */
  .nav a.navlink[href="#support"],
  .nav a.navlink[href="#about"] {
    display: none;
  }
  
  /* Basic mobile tweaks */
  .container { width: 96vw; padding-left: 0.5rem; padding-right: 0.5rem; }
  header { padding-left: .25rem; padding-right: .25rem; }
  .nav { gap: .5rem; }
  .lead { max-width: 60ch; }
  .brand span { display: none; } /* hide text brand to save space */
  .hero { padding-top: 2rem; }
  .grid.features { gap: 1.5rem; }
  .shots { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; }
  
  /* Make remaining nav items more prominent */
  .nav a.navlink {
    font-size: 1.05rem;
    padding: .7rem 1rem;
  }
}

/* Motion reduce */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
