/* tincture.mcodev.cloud. The page sits on neutral photographic grey, the backdrop colour work is judged against
   (Tincture's own preview uses it); colour comes only from the pictures and Tincture's orange, kept for actions.
   Type: Archivo expanded for display, Archivo for text, IBM Plex Mono for numbers and file names. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-100-900-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/IBMPlexMono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/IBMPlexMono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --grey: #d4d4d4;        /* neutral card: the page */
  --grey-deep: #c6c6c6;   /* bands and wells */
  --paper: #ececec;       /* cards */
  --ink: #121212;
  --ink-soft: #3d3d3d;    /* 7.6:1 on the grey */
  --booth: #181818;       /* the dark viewing booth */
  --booth-ink: #e8e8e8;
  --booth-soft: #a3a3a3;
  --orange: #e88834;      /* Tincture's accent, light appearance */
  --orange-deep: #c96d1d;
  --rule: rgba(0, 0, 0, 0.16);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--grey);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange-deep); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 20; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); font-stretch: 125%; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 750; line-height: 1.02; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0; }
.mono, .kicker, .mode-tag, code, pre { font-family: var(--mono); }
.section-lede { color: var(--ink-soft); margin: 14px 0 0; max-width: 46ch; }
.small { font-size: 0.92rem; color: var(--ink-soft); }
.path, .ui { font-weight: 600; white-space: nowrap; }

/* ---- Bar ---- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(212, 212, 212, 0.86);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-stretch: 125%; font-weight: 750; font-size: 1.15rem; }
.bar nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-size: 0.95rem; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar nav a.bar-download { background: var(--ink); color: #fff; padding: 7px 14px; border-radius: 999px; font-weight: 600; }
.bar nav a.bar-download:hover { text-decoration: none; background: #000; }
@media (max-width: 720px) { .bar nav a:not(.bar-download) { display: none; } }

/* ---- Buttons ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 650; text-decoration: none; font-size: 1rem;
  border: 1.5px solid transparent; transition: background-color .15s ease, transform .15s ease;
}
.button.primary { background: var(--orange); color: #111; }
.button.primary:hover { background: #f09a4c; }
.button.primary:active { transform: translateY(1px); }
.button.quiet { border-color: var(--ink); color: var(--ink); }
.button.quiet:hover { background: rgba(0, 0, 0, 0.06); }

/* ---- Hero ---- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(48px, 8vw, 104px) var(--gutter) clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px;
}
.kicker { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 22px; }
.hero h1 { font-size: clamp(2.7rem, 7.4vw, 6.6rem); font-weight: 800; line-height: 0.93; letter-spacing: -0.03em; max-width: 12ch; }
/* The one flourish: the word "colours" is cut from the harbour photo whose look the page opens with. */
.photo-ink { color: #8a4a1c; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .photo-ink {
    background: #8a4a1c url("img/colours.webp") 38% 62% / 150% auto no-repeat;
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}
.lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); max-width: 34em; margin: 30px 0 0; color: #1e1e1e; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: end; }
  .kicker { grid-column: 1 / -1; }
  .hero-side .lede { margin-top: 0; }
}

/* ---- The booth: looks, lattice, compare ---- */
.booth { background: var(--booth); color: var(--booth-ink); padding: clamp(40px, 6vw, 80px) var(--gutter); }
.booth-head, .booth-grid { max-width: var(--max); margin: 0 auto; }
.booth-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px 56px; align-items: end; margin-bottom: 36px; }
.booth-head p { color: var(--booth-soft); margin: 0; max-width: 54ch; }
.booth-grid { display: grid; grid-template-columns: 240px minmax(0, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }

.looks { display: flex; flex-direction: column; gap: 6px; }
.look {
  display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  width: 100%; padding: 8px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--booth-ink); text-align: left; font: inherit; cursor: pointer;
}
.look img { grid-row: 1 / 3; width: 64px; height: 44px; object-fit: cover; border-radius: 7px; }
.look img.crisp, img.crisp { image-rendering: pixelated; }
.look-name { font-weight: 600; font-size: 0.98rem; line-height: 1.2; }
.look .mode-tag { justify-self: start; }
.look:hover { background: rgba(255, 255, 255, 0.05); }
.look[aria-checked="true"] { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.18); }
.mode-tag { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange); }

.lattice { margin: 0; }
.lattice canvas { width: 100%; height: auto; aspect-ratio: 1; display: block; cursor: grab; touch-action: pan-y; }
.lattice canvas:active { cursor: grabbing; }
.lattice figcaption, .compare figcaption { display: flex; justify-content: space-between; gap: 4px 12px; margin-top: 12px; font-size: 0.85rem; color: var(--booth-soft); }
.lattice figcaption { flex-direction: column; align-items: center; text-align: center; }
.hint { font-size: 0.8rem; }

.compare { margin: 0; }
.compare-frame { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); --split: 45%; user-select: none; touch-action: pan-y; cursor: ew-resize; }
.compare-frame img { width: 100%; }
.compare-frame .before { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.handle { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); }
.handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: rgba(24, 24, 24, 0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 16px no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.handle:focus-visible { outline: none; }
.handle:focus-visible::after { outline: 3px solid var(--orange); outline-offset: 2px; }
.badge { position: absolute; top: 12px; font-size: 0.78rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: rgba(20, 20, 20, 0.7); color: #fff; pointer-events: none; }
.badge.left { left: 12px; }
.badge.right { right: 12px; }
.compare figcaption { justify-content: flex-start; align-items: baseline; }

/* ---- Modes ---- */
.modes, .app, .formats, .download { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter) 0; }
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.mode { background: var(--paper); border-radius: 16px; padding: 22px 20px 24px; border: 1px solid var(--rule); }
.mode .have { font-weight: 600; margin: 6px 0 16px; font-size: 0.97rem; }
.mode .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mode .pair img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 7px; }
.mode .pair img + img { position: relative; }
.mode p:last-child { margin: 16px 0 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---- App ---- */
.app-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.switch { display: inline-flex; background: var(--grey-deep); border-radius: 999px; padding: 3px; }
.switch button { font: inherit; font-size: 0.92rem; font-weight: 600; border: 0; background: transparent; color: var(--ink); padding: 7px 16px; border-radius: 999px; cursor: pointer; }
.switch button[aria-selected="true"] { background: var(--ink); color: #fff; }
.app-shot { margin: 32px 0 0; }
.app-shot img { width: 100%; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); }
.facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 28px; }
.facts li { border-top: 2px solid var(--ink); padding-top: 12px; color: var(--ink-soft); font-size: 0.96rem; }
.facts strong { color: var(--ink); display: block; }

/* ---- Formats ---- */
.formats { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: start; }
table { border-collapse: collapse; width: 100%; margin-top: 28px; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--rule); }
thead th { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
tbody th { font-family: var(--mono); font-weight: 500; white-space: nowrap; padding-right: 22px; }
.cube {
  margin: 0; background: var(--booth); color: #d9d9d9; border-radius: 14px; padding: 22px 24px; font-size: 0.86rem; line-height: 1.7;
  overflow-x: auto; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}
.cube .row { color: #fff; }
.cube .dim { color: #8f8f8f; }

/* ---- Download ---- */
.download { padding-bottom: clamp(64px, 9vw, 120px); }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.platform { background: var(--paper); border-radius: 18px; padding: 28px; border: 1px solid var(--rule); }
.platform.preferred { border: 2px solid var(--ink); }
.platform h3 { font-size: 1.7rem; font-weight: 780; }
.needs { margin: 4px 0 20px; color: var(--ink-soft); }
.file { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 22px 0 0; font-size: 0.86rem; }
.file dt { font-family: var(--mono); color: var(--ink-soft); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; padding-top: 2px; }
.file dd { margin: 0; }
.sha { overflow-wrap: anywhere; color: var(--ink-soft); }
.note { font-size: 0.93rem; color: var(--ink-soft); margin: 18px 0 0; }
.manual { margin: 18px 0 0; font-weight: 600; }
.manual .mono { font-weight: 400; font-size: 0.82rem; color: var(--ink-soft); margin-left: 6px; }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--rule); padding: 28px var(--gutter) 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: 0.88rem; color: var(--ink-soft); }
.foot p { margin: 0; }

/* ---- Narrower screens ---- */
@media (max-width: 1100px) {
  .booth-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
  .looks { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .look { min-width: 210px; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .booth-head, .formats, .platforms { grid-template-columns: minmax(0, 1fr); }
  .booth-grid { grid-template-columns: minmax(0, 1fr); }
  .lattice { max-width: 360px; width: 100%; justify-self: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .mode-grid, .facts { grid-template-columns: minmax(0, 1fr); }
  .platform { padding: 22px; }
  .cube { font-size: 0.78rem; padding: 18px; }
}
