/* SKMB Software
   A short page: hero, the three apps side by side, one strip for
   about and contact. Each app keeps its own accent colour. */

:root {
  color-scheme: dark;
  --ink: #0b0d15;          /* matches the edge of the artwork */
  --ink-2: #10131d;
  --paper: #f1efe8;        /* warm off-white, not pure white */
  --paper-dim: #b3b6c2;
  --paper-faint: #7c8090;
  --rule: rgba(241, 239, 232, 0.12);
  --accent: #8ab4ff;       /* overridden per tile */

  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* 1.25 scale on an 18px base */
  --t-1: 1rem;        /* 18 */
  --t0: 1.125rem;     /* 20 */
  --t1: 1.25rem;      /* 22.5 */
  --t2: 1.563rem;     /* 28 */
  --t3: 1.953rem;     /* 35 */
  --t4: 2.441rem;     /* 44 */
  --t5: 3.052rem;     /* 55 */
  --t6: 3.815rem;     /* 69 */

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  font-size: 112.5%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--t-1);
  line-height: 1.55;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; max-width: 36em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  z-index: 200;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: transparent;
  transition: background-color 0.3s var(--ease);
}
.site-header.solid,
.site-header.menu-open {
  background: rgba(11, 13, 21, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header.solid::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t0);
  letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; }

.nav { display: flex; gap: 32px; }
.nav-link {
  position: relative;
  padding: 6px 0;
  text-decoration: none;
  color: var(--paper-dim);
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav-link:hover { color: var(--paper); }
.nav-link.current { color: var(--paper); }
.nav-link.current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--paper);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  cursor: pointer;
}

.menu-panel {
  display: none;
  flex-direction: column;
  padding: 8px var(--gutter) 24px;
  border-top: 1px solid var(--rule);
}
.menu-panel.open { display: flex; }
.menu-link {
  padding: 14px 0;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t2);
  border-bottom: 1px solid var(--rule);
}
.menu-link:last-child { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(78svh, 680px);
  display: flex;
  align-items: center;
  padding: 112px 0 64px;
  overflow: hidden;
}

/* The illustration sits in the right two thirds and ends at the content
   edge, fading out on every side so it never reads as a cut-off box. */
.hero-art {
  position: absolute;
  top: 0;
  bottom: 0;
  right: max(0px, calc((100% - var(--wrap)) / 2));
  width: min(64%, 900px);
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
  z-index: -1;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 28%, #000 90%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 28%, #000 90%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
  mask-composite: intersect;
  animation: hero-art-in 1.4s var(--ease) both;
}

.hero-inner { position: relative; z-index: 2; }

.hero-title {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(var(--t4), 6.4vw, var(--t6));
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 11ch;
  animation: rise 0.9s var(--ease) both;
}

.hero-lead {
  max-width: 30em;
  font-size: var(--t0);
  color: var(--paper-dim);
  animation: rise 0.9s var(--ease) 0.12s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-art-in {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: none; }
}

/* ---------- Apps, three across ---------- */
.apps { position: relative; z-index: 2; padding: 8px 0 clamp(64px, 8vw, 104px); }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.tile { position: relative; }

.tile-art {
  position: relative;
  display: block;
  margin-bottom: 22px;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
}
.tile-art::after {
  /* a soft wash of the product colour behind the subject */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 70% 60% at 50% 60%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.tile-art img { width: 100%; transition: transform 0.6s var(--ease); }
.tile-art:hover img { transform: scale(1.03); }

.tile-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--t2);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.tile-availability {
  margin: 6px 0 14px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.94rem;
}
.tile-tagline {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--t1);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.tile-desc { color: var(--paper-dim); font-size: 0.97rem; }
.tile-note { margin-top: 10px; font-size: 0.82rem; color: var(--paper-faint); }

.tile-link {
  display: inline-block;
  margin-top: 16px;
  padding-bottom: 2px;
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  transition: color 0.2s var(--ease);
}
.tile-link:hover { color: var(--accent); }

/* ---------- Studio: about and contact in one strip ---------- */
.studio {
  position: relative;
  z-index: 2;
  padding: clamp(56px, 7vw, 88px) 0;
  background: rgba(16, 19, 29, 0.6);
  border-top: 1px solid var(--rule);
}
.studio-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px clamp(40px, 6vw, 96px);
  align-items: start;
}
.section-title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--t3);
  line-height: 1;
  letter-spacing: -0.03em;
}
.studio p { color: var(--paper-dim); }
.studio-about p { max-width: 32em; }
.studio-contact p { margin-bottom: 22px; }

.button {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s var(--ease);
}
.button:hover { filter: brightness(0.92); }

/* ---------- Cursor light ----------
   A fixed canvas under the content: a faint dot grid that brightens
   near the pointer, and a neon glow that trails it. Screen blending
   means it only ever adds light, so it never muddies the artwork. */
.glow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}
@media (hover: none), (prefers-reduced-motion: reduce) {
  .glow { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 28px 0 36px;
  border-top: 1px solid var(--rule);
  font-size: 0.89rem;
  color: var(--paper-faint);
}
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0; max-width: none; }
.site-footer a { color: var(--paper-dim); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Secondary pages (privacy) ---------- */
.page { position: relative; z-index: 2; padding: 136px 0 96px; }
.page-inner { max-width: 680px; }
.page-updated { margin: 12px 0 40px; color: var(--paper-faint); font-size: 0.89rem; }
.page .section-title { font-size: var(--t4); }
.page h2 {
  margin: 40px 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t1);
  letter-spacing: -0.015em;
}
.page p { color: var(--paper-dim); }
.page p:first-of-type { color: var(--paper); font-size: var(--t0); }
.page a { color: var(--paper); text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; place-items: center; }
  .studio-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

@media (max-width: 720px) {
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .tile {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas:
      "art name"
      "art availability"
      "tagline tagline"
      "desc desc"
      "note note"
      "link link";
    column-gap: 18px;
    align-items: center;
  }
  .tile-art { grid-area: art; margin: 0; border-radius: 16px; align-self: start; }
  .tile-name { grid-area: name; align-self: end; }
  .tile-availability { grid-area: availability; align-self: start; margin: 4px 0 0; }
  .tile-tagline { grid-area: tagline; margin-top: 18px; }
  .tile-desc { grid-area: desc; }
  .tile-note { grid-area: note; }
  .tile-link { grid-area: link; justify-self: start; }
}

@media (max-width: 640px) {
  html { font-size: 106%; }
  .hero { min-height: auto; padding: 104px 0 48px; }
  .hero-art { right: 0; width: 100%; object-position: 70% 50%; opacity: 0.35; }
  .hero-title { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art, .hero-title, .hero-lead { animation: none; }
  * { transition: none !important; }
}
