/* Shared styles for the static app pages: /penfont, /sticktop, /windowcase
   and the privacy pages (public/<app>.html and
   public/<app>-privacy.html). They are plain HTML, outside the React app, so
   they answer with their content even without JavaScript: App Store Connect
   links to them.

   They follow the rest of insanialabs.com: the same tokens as
   tailwind.config.ts (change both together), Inter for reading, Fragment Mono
   for labels. Each page sets its app's colour on <body>:
     style="--tint: #7c83ff; --on-tint: #fff"
   and that colour appears only on the buy button and the glow behind the
   icon. */

:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --text: #ededed;
  --body: #a3a3a3;
  --muted: #8c8c8c;
  --line: rgba(255, 255, 255, 0.1);
  --tint: #ededed;
  --on-tint: #0a0a0a;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Condensed, like the INSANIA LABS wordmark: headings and buttons. */
  --display: "Big Shoulders", Impact, var(--sans);
  --gutter: 20px;
  --width: 1200px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}

a {
  color: var(--text);
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

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

img {
  max-width: 100%;
}

/* Small uppercase mono label, as in the React app's .label. */
.label,
.eyebrow,
.site-header__nav a,
.app-nav a,
.buy__note,
.site-footer {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* A link whose underline draws in from the left on hover. */
.site-header__nav a,
.app-nav a,
.site-footer a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition:
    background-size 0.35s ease,
    color 0.2s ease;
}

.site-header__nav a:hover,
.app-nav a:hover,
.site-footer a:hover {
  background-size: 100% 1px;
  color: var(--text);
}

/* Header: the same as src/components/SiteHeader.tsx. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--width);
  height: 64px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header__brand img {
  display: block;
  height: 36px;
  width: auto;
}

.site-header__nav {
  display: flex;
  gap: 20px;
}

.site-header__nav a {
  color: var(--body);
}

@media (min-width: 768px) {
  .site-header__nav {
    gap: 32px;
  }
}

main {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
}

/* Top of an app page: icon, name, tagline, button. */
.top {
  display: flex;
  gap: clamp(20px, 3.5vw, 48px);
  align-items: flex-start;
  padding: clamp(48px, 9vh, 112px) 0 48px;
}

.top__icon-wrap {
  position: relative;
  flex: none;
  isolation: isolate;
}

.top__icon-wrap::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tint), transparent);
  opacity: 0.35;
  filter: blur(24px);
}

.top__icon {
  display: block;
  width: clamp(80px, 11vw, 144px);
  height: auto;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(60px, 10vw, 136px);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.lead {
  margin: 20px 0 0;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.35;
  color: var(--body);
}

.updated {
  margin: 20px 0 0;
  color: var(--muted);
}

.buy {
  margin: 32px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.button {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--on-tint);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: filter 0.2s ease;
}

.button:hover {
  filter: brightness(1.12);
}

/* Not a button: shown while an app is not in its store yet, so there is
   nothing to click. */
.soon {
  display: inline-block;
  padding: 10px 23px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--body);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

/* Links within the app's own page: support, privacy, questions. */
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 28px 0 0;
}

.app-nav a {
  color: var(--body);
}

/* One large screenshot under the top. */
.hero-shot {
  margin: 0;
  padding-top: 8px;
}

.hero-shot img,
.shot img,
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.hero-shot figcaption,
.shots figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.shot {
  margin: 48px 0 0;
}

/* "What it does" next to "Features". */
.intro {
  display: grid;
  gap: 40px;
  padding: 64px 0 16px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
  .intro {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.intro h2 {
  margin: 0 0 16px;
  color: var(--muted);
}

.intro p,
.intro li {
  color: var(--body);
}

.intro > div > p:first-of-type {
  color: var(--text);
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.intro p {
  margin: 0;
}

.intro p + p {
  margin-top: 14px;
}

.intro ul,
.body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro li,
.body li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-top: 1px solid var(--line);
}

.intro li::before,
.body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 8px;
  height: 1px;
  background: var(--tint);
}

.body {
  max-width: 68ch;
  padding-top: 16px;
}

.body h2 {
  margin: 56px 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.body h3 {
  margin: 32px 0 8px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.body p,
.body li,
.body dd {
  color: var(--body);
}

.body p {
  margin: 0;
}

.body p + p {
  margin-top: 14px;
}

.body ul {
  margin-top: 14px;
}

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

.body code {
  background: var(--panel);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.short {
  font-size: 20px;
  color: var(--text) !important;
}

.faq {
  margin: 0;
}

.faq dt {
  margin-top: 24px;
  color: var(--text);
  font-weight: 500;
}

.faq dd {
  margin: 6px 0 0;
}

/* Screenshots: a row that scrolls sideways and snaps. */
.shots-section {
  margin-top: 64px;
}

.shots-section h2 {
  margin: 0 0 20px;
  color: var(--muted);
}

.shots {
  display: flex;
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  list-style: none;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar {
  display: none;
}

.shots li {
  flex: 0 0 min(820px, 86%);
  scroll-snap-align: start;
}

.shots figure {
  margin: 0;
}

/* Footer: the same as src/components/SiteFooter.tsx. */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 32px;
  max-width: var(--width);
  margin: 0 auto;
  padding: 48px var(--gutter);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-footer p,
.site-footer ul,
.site-footer address {
  margin: 0;
  padding: 0;
  font-style: normal;
  list-style: none;
}

.site-footer li + li,
.site-footer p + p {
  margin-top: 10px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer .strong {
  color: var(--body);
}

.site-footer .email {
  text-transform: none;
}

@media (max-width: 560px) {
  .top {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
