/* Layout study for rainbowfactory.uk: tokens and components shared by the variants in this folder.
   The live site does not load this file. Each variant sets its own --accent and its own page layout.
   Shape rule: buttons and platform links are pills, panels are 20px, screenshots are 12px. */

:root {
  color-scheme: light dark;
  --bg: light-dark(oklch(0.965 0.004 90), oklch(0.17 0.006 90));
  --surface: light-dark(oklch(0.99 0.004 90), oklch(0.215 0.006 90));
  --sunken: light-dark(oklch(0.94 0.005 90), oklch(0.14 0.006 90));
  --line: light-dark(oklch(0.9 0.005 90), oklch(0.3 0.006 90));
  --ink: light-dark(oklch(0.2 0.01 90), oklch(0.96 0.004 90));
  --body: light-dark(oklch(0.42 0.01 90), oklch(0.8 0.008 90));
  --muted: light-dark(oklch(0.5 0.01 90), oklch(0.7 0.008 90));
  --accent: light-dark(oklch(0.49 0.16 250), oklch(0.78 0.11 250));
  --shadow: light-dark(oklch(0.4 0.02 90 / 0.3), oklch(0 0 0 / 0.55));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --page: 1320px;
  --gutter: 32px;
  --nav-h: 68px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: oklch(0.82 0.14 90); color: oklch(0.2 0.01 90); }

h1, h2, h3 { font-family: "Space Grotesk", sans-serif; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(42px, 4.6vw, 68px); line-height: 1; letter-spacing: -0.035em; }
h2 { font-weight: 700; font-size: clamp(32px, 3.2vw, 46px); line-height: 1.04; letter-spacing: -0.028em; }
h3 { font-weight: 600; font-size: 22px; line-height: 1.15; letter-spacing: -0.015em; }
p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--body); text-wrap: pretty; }

.wrap { max-width: var(--page); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.skip:focus { left: 16px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: color-mix(in oklch, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--page); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo-mark { display: inline-grid; grid-template-columns: repeat(3, 1fr); gap: 2px; width: 30px; height: 30px; padding: 4px; border-radius: 8px; background: oklch(0.22 0.01 90); }
.logo-mark i { border-radius: 2px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav-links a { color: var(--body); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 16px; white-space: nowrap; transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease); }
.btn:hover { text-decoration: none; border-color: var(--muted); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 14.5px; }
.nav-links a.btn.primary, .nav-links a.btn.primary:hover { color: var(--bg); }
.more { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 16px; }

/* Platform links under each app */
.platforms { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.platforms a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 600; transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.platforms a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.app-icon { border-radius: 22.5%; box-shadow: 0 12px 26px -14px var(--shadow); }

/* Official store badges */
.badges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badges a { display: inline-flex; height: 44px; border-radius: 8px; transition: transform 0.25s var(--ease); }
.badges a:hover { transform: translateY(-1px); }
.badges img { height: 44px; width: auto; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 96px; }
.footer-inner { max-width: var(--page); margin: 0 auto; padding: 40px var(--gutter) 48px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px; }
.footer .brand { font-size: 17px; }
.footer-links { display: flex; gap: 12px 26px; font-size: 15px; flex-wrap: wrap; }
.footer-links a { color: var(--body); }
.footer-links a:hover { color: var(--ink); }
.copyright { font-size: 13.5px; color: var(--muted); }

/* Motion: entry cascade on load, reveal on scroll where the browser supports view timelines */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .cascade > * { animation: rise 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media (max-width: 767px) {
  :root { --gutter: 20px; --nav-h: 60px; }
  .nav-inner { gap: 12px; }
  .nav-links { gap: 16px; }
  .nav-links a[href="#apps"] { display: none; }
  .nav-links .btn.small { min-height: 36px; padding: 0 14px; }
  .brand { font-size: 17px; gap: 9px; }
  .footer { margin-top: 64px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* "Notify me of new versions" button: notify.js un-hides it only where the browser supports push */
.notify-btn { cursor: pointer; font: inherit; font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.notify-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
