/* CognitoBit — Sixteen Bits. Plain CSS, no build step. */

:root {
  --paper: #F7F5F0;
  --white: #FFFFFF;
  --ink: #141414;
  --muted: #5C5A55;
  --line: #D9D5CC;
  --grey: #C9C5BC;       /* known bits */
  --off: #E6E3DC;        /* off cells in the founder glyphs */
  --navy: #123456;       /* CognitoBit */
  --kura: #0E6B5C;       /* KuraDrive */
  --violet: #5A47B8;     /* WorkCalibrate */
  --steel: #2F6FA8;      /* AssetCalibrate */
  --moss: #5F7A1F;       /* Cesium for Blender */
  --pulse: #C2472F;      /* netpulse */
  --amber: #B5730F;      /* TableSnip */
  --batu: #FF6B35;       /* Batuara's own orange */
  --batu-ink: #2D1B0E;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --doto: 'Doto', 'Courier New', monospace;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --rond: 30;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
img { display: block; }

.wrap { width: min(1248px, 100% - 48px); margin-inline: auto; }
.display {
  font-family: var(--doto);
  font-weight: 800;
  font-variation-settings: 'ROND' var(--rond);
  line-height: 1;
}
.mono { font-family: var(--mono); }
.skip {
  position: absolute; left: 24px; top: -60px;
  padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: 4px;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  height: 88px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark .k { fill: var(--grey); }
.brand-mark .c { fill: var(--navy); }
.brand-name { font-size: 21px; }
.site-nav { display: flex; gap: 40px; font-size: 18px; }
.nav-mail { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Hero */
.hero { padding: 40px 0 80px; display: flex; flex-direction: column; gap: 56px; }
.hero-title {
  font-size: clamp(46px, 8.3vw, 120px);
  letter-spacing: -0.01em;
  hyphens: manual;
}
.hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
.hero-copy { grid-column: 1 / span 2; display: flex; flex-direction: column; gap: 32px; padding-top: 8px; }
.hero-copy p { font-size: clamp(19px, 1.75vw, 25px); line-height: 1.4; text-wrap: pretty; }
.link-italic {
  align-self: flex-start;
  font-size: 20px; font-style: italic; color: var(--navy);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.hero-mark { grid-column: 3 / span 2; display: flex; flex-direction: column; gap: 16px; align-items: flex-end; }
.bits {
  width: min(516px, 100%);
  aspect-ratio: 1;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.3%;
}
.bit {
  padding: 0; border: 0; cursor: pointer;
  border-radius: calc(6px + var(--rond) * 0.54px);
  background: var(--grey);
  transition: background .25s, transform .25s;
  animation: boot .7s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: calc(var(--i) * 40ms);
}
.bit.s1 { background: var(--navy); }
.bit.missing { background: transparent; cursor: default; }
.bit:not(:disabled):hover { transform: scale(.94); }
@keyframes boot { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.caption { max-width: 516px; font-size: 16px; line-height: 1.45; font-style: italic; color: var(--muted); text-align: right; text-wrap: pretty; }
.caption.match { color: var(--ink); }

/* Sections */
.label { font-size: 18px; font-style: italic; color: var(--navy); }
.section-title { font-size: clamp(30px, 2.8vw, 40px); line-height: 1.15; margin: 18px 0 28px; text-wrap: pretty; }
.work, .founders { padding-top: 96px; }
.founders .label { margin-bottom: 24px; }
.rows { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 96px 464px minmax(0, 1fr); column-gap: 40px; align-items: start;
  padding: 40px 0; border-top: 1px solid var(--line);
}
.row .display { transition: color .2s; }
.row:hover .display { color: var(--navy); }
.row h3 { font-size: clamp(30px, 3.3vw, 48px); }
.pmark { width: 96px; height: 96px; }
.pmark-img { object-fit: contain; }
.row-text { display: flex; flex-direction: column; gap: 14px; }
.row-text > p { font-size: 18px; line-height: 1.45; }
.specs { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.4; }
.specs > div { display: flex; gap: 12px; }
.specs dt { width: 96px; flex: none; font-style: italic; color: var(--muted); }
.specs dd { margin: 0; }
.specs code { font-family: var(--mono); font-size: 13px; }
.meta { font-size: 15px; font-style: italic; color: var(--muted); }
.meta a, .specs a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Visual panels */
.visual { height: 260px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }

.term {
  background: #1B1A21; border: 0; color: #C9C7D1; padding: 20px 24px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  display: flex; flex-direction: column; gap: 6px;
}
.term-dots { display: flex; gap: 6px; margin-bottom: 6px; }
.term-dots span { width: 9px; height: 9px; border-radius: 50%; background: #28C840; }
.term-dots span:first-child { background: #FF5F57; }
.term-dots span:nth-child(2) { background: #FEBC2E; }
.term-title { color: #67D37F; font-weight: 500; }
.term-dim { color: #8B899A; }
.term-bar { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.term-track { flex-grow: 1; height: 10px; background: repeating-linear-gradient(90deg, #3A3946 0 2px, transparent 2px 4px); }
.term-fill { width: 13%; height: 100%; background: #67D37F; }
.term-row { display: grid; grid-template-columns: 64px 40px 40px 44px 56px 56px 52px 60px 56px; column-gap: 4px; }
.term-row span:not(:first-child) { text-align: right; }
.term-head { color: #9AA7FF; text-decoration: underline; }
.term-loss { color: #E5484D; }
.term-foot { margin-top: 10px; }

.cesium { display: flex; align-items: center; justify-content: center; padding: 4px; }
.cesium svg { height: 100%; width: auto; max-width: 100%; }
.cesium .mono-label { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; fill: var(--moss); }
.cesium .mono-small { font-family: var(--mono); font-size: 9px; fill: var(--moss); }
.cesium .ridge { fill: rgba(95,122,31,.10); stroke: var(--moss); stroke-width: 1; }
.cesium .l32 { stroke: rgba(95,122,31,.32); stroke-width: 1; fill: none; }
.cesium .l38 { stroke: rgba(95,122,31,.38); stroke-width: 1; fill: none; }
.cesium .l26 { stroke: rgba(95,122,31,.26); stroke-width: 1; fill: none; }
.cesium .l18 { stroke: rgba(95,122,31,.18); stroke-width: 1; fill: none; }
.cesium .tile-near { fill: rgba(95,122,31,.22); }
.cesium .tile-far { fill: rgba(95,122,31,.28); }
.cesium .frustum { stroke: var(--moss); stroke-width: 1; stroke-dasharray: 3 4; opacity: .5; fill: none; }

.snip { padding: 20px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.snip-doc, .snip-sheet { width: 170px; height: 214px; border: 1px solid var(--line); border-radius: 4px; }
.snip-doc { background: var(--paper); padding: 14px; display: flex; flex-direction: column; gap: 7px; }
.snip .ln { display: block; height: 5px; width: 100%; background: #E6E3DC; border-radius: 2px; }
.snip .ln.dark { height: 8px; background: #CFCBC2; }
.snip .w60 { width: 60%; } .snip .w92 { width: 92%; } .snip .w76 { width: 76%; } .snip .w84 { width: 84%; }
.snip-table { position: relative; margin: 16px 0 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.snip-table .cell { display: block; height: 13px; background: #ECE9E2; }
.snip-table .cell.head { background: var(--line); }
.snip-key { position: absolute; left: -2px; top: -18px; font-family: var(--mono); font-size: 8px; letter-spacing: .12em; color: var(--amber); }
.snip-marquee { position: absolute; inset: -6px; border: 1.5px dashed var(--amber); border-radius: 2px; }
.snip-table .h { position: absolute; width: 6px; height: 6px; background: var(--amber); }
.snip-table .tl { left: -9px; top: -9px; } .snip-table .tr { right: -9px; top: -9px; }
.snip-table .bl { left: -9px; bottom: -9px; } .snip-table .br { right: -9px; bottom: -9px; }
.snip-arrow { width: 44px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--amber); }
.snip-sheet { background: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.sheet-grid { display: grid; grid-template-columns: 18px repeat(3, minmax(0, 1fr)); font-family: var(--mono); font-size: 9px; line-height: 21px; }
.sheet-grid span { padding: 0 6px; border-top: 1px solid #ECE9E2; }
.sheet-grid span:nth-child(-n+8) { border-top: 0; }
.sheet-grid .sh { padding: 0; text-align: center; background: #F3F1EC; color: #8A8880; border-top: 0; }
.sheet-grid span:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
.sheet-grid .r { text-align: right; }
.sheet-grid .b { font-weight: 500; }
.sheet-grid .tot { border-top: 1px solid var(--line); }
.sheet-badge { margin-top: auto; padding: 10px; display: flex; justify-content: center; }
.sheet-badge span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--amber); border-radius: 999px; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--amber); }

.gantt { position: relative; padding: 28px 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.gantt-head { display: grid; grid-template-columns: 110px repeat(6, minmax(0, 1fr)); height: 20px; align-items: center; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: #8A8880; }
.gantt-label { color: var(--violet); }
.gantt-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; height: 36px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.av { width: 22px; height: 22px; border-radius: 50%; color: var(--white); font-family: var(--mono); font-style: normal; font-size: 7px; display: inline-flex; align-items: center; justify-content: center; }
.a1 { background: var(--violet); } .a2 { background: #8C7CE3; } .a3 { background: var(--muted); } .a4 { background: #8A8880; }
.bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.bar { height: 24px; border-radius: 4px; font-weight: 400; font-size: 12px; line-height: 24px; padding-left: 8px; overflow: hidden; white-space: nowrap; color: var(--white); }
.b1 { background: var(--violet); } .b2 { background: #8C7CE3; } .b3 { background: #DCD6F5; color: #3E2F8F; }
.c1s3 { grid-column: 1 / span 3; } .c5s2 { grid-column: 5 / span 2; } .c2s4 { grid-column: 2 / span 4; }
.c1s2 { grid-column: 1 / span 2; } .c4s3 { grid-column: 4 / span 3; } .c3s4 { grid-column: 3 / span 4; }
.gantt-today { position: absolute; left: 296px; top: 22px; bottom: 22px; border-left: 1px dashed var(--violet); }
.gantt-today span { position: absolute; left: 4px; top: -4px; font-family: var(--mono); font-size: 7px; letter-spacing: .12em; color: var(--violet); }

.batu { padding: 22px; display: flex; gap: 16px; }
.batu-panel { flex: 1 1 0; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.batu-settle { gap: 11px; }
.batu-top { display: flex; justify-content: space-between; align-items: baseline; }
.batu-title { font-size: 20px; }
.batu-tag { font-family: var(--mono); font-size: 8px; letter-spacing: .12em; color: #8A8880; }
.batu-foot { margin-top: auto; }
.batu-line { display: flex; justify-content: space-between; align-items: center; font-size: 13px; border-top: 1px solid #E6E3DC; padding-top: 8px; }
.batu-settle .batu-line:first-of-type { border-top: 0; padding-top: 0; }
.batu-line em { font-style: normal; color: #8A8880; }
.batu-line .mono, .batu-owed .mono { font-size: 12px; color: var(--batu-ink); }
.batu-owed { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--batu-ink); }
.pill { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--batu); color: var(--batu); font-size: 11px; font-weight: 600; }
.pill.fill { background: var(--batu); color: var(--white); }

/* How we build */
.how { padding-top: 96px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
.how .label { grid-column: 1; }
.statement { grid-column: 2 / span 3; font-size: clamp(25px, 2.65vw, 38px); line-height: 1.25; text-wrap: pretty; }

/* Founders */
.row-founder { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; padding: 32px 0; }
.row-founder h3 { grid-column: 1 / span 2; font-size: clamp(30px, 3.9vw, 56px); }
.row-founder .row-text { grid-column: 3; }
.glyph { grid-column: 4; justify-self: end; display: grid; grid-template-columns: repeat(12, 10px); gap: 3px; }
.glyph i { display: block; width: 10px; height: 10px; border-radius: calc(1px + var(--rond) * 0.04px); background: var(--off); }
.glyph i.on { background: var(--navy); }

/* Contact and footer */
.contact { margin-top: 96px; padding: 96px 0 48px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 96px; }
.contact-top { display: flex; flex-direction: column; gap: 28px; }
.email { font-size: clamp(30px, 5vw, 72px); color: var(--navy); overflow-wrap: anywhere; }
.contact-top p { max-width: 608px; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; text-wrap: pretty; }
.site-footer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; font-size: 15px; color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-end { display: flex; gap: 20px; justify-content: flex-end; }

/* Flood: a solid disc of the matched product's colour fills the screen, holds, and recedes */
.flood-wrap { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 50; pointer-events: none; }
.flood {
  position: absolute; left: 0; top: 0; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
}
.flood-wrap.on .flood { animation: flood 2.6s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes flood {
  0% { transform: translate(-50%, -50%) scale(0); }
  28% { transform: translate(-50%, -50%) scale(1); }
  68% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(0); }
}
.flood-label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-size: clamp(36px, 5vw, 72px); color: var(--paper); white-space: nowrap; opacity: 0;
}
.flood-wrap.on .flood-label { animation: floodLabel 2.6s linear both; }
@keyframes floodLabel { 0%, 22% { opacity: 0; } 34%, 62% { opacity: 1; } 74%, 100% { opacity: 0; } }

/* Phone and tablet */
@media (max-width: 1099px) {
  .site-nav { gap: 24px; font-size: 16px; }
  .hero-grid { display: flex; flex-direction: column; gap: 36px; }
  .hero-mark { align-items: flex-start; }
  .bits { width: min(516px, 100%); }
  .caption { text-align: left; }
  .row { grid-template-columns: 1fr; row-gap: 14px; padding: 24px 0; }
  .pmark { width: 56px; height: 56px; }
  .row-text > p { font-size: 16px; }
  .visual { height: auto; min-height: 190px; }
  .term { font-size: 10px; padding: 14px; }
  .term-row { grid-template-columns: 64px 44px 56px 60px 60px; column-gap: 3px; }
  .term-row span:nth-child(2), .term-row span:nth-child(3), .term-row span:nth-child(5), .term-row span:nth-child(7) { display: none; }
  .cesium { height: 206px; }
  .snip { padding: 8px; gap: 7px; }
  .snip-doc, .snip-sheet { width: 126px; height: 170px; padding: 10px; }
  .snip .ln { height: 4px; } .snip .ln.dark { height: 7px; }
  .snip-table { margin: 14px 0 10px; }
  .snip-table .cell { height: 11px; }
  .snip-arrow { width: 28px; font-size: 7px; }
  .snip-arrow svg { width: 24px; }
  .sheet-grid { grid-template-columns: 14px repeat(3, minmax(0, 1fr)); font-size: 7.5px; line-height: 17px; }
  .sheet-grid span { padding: 0 4px; }
  .gantt { padding: 12px; gap: 6px; }
  .gantt-head { grid-template-columns: 70px repeat(6, minmax(0, 1fr)); font-size: 8px; }
  .gantt-row { grid-template-columns: 70px minmax(0, 1fr); height: 30px; }
  .who { font-size: 11px; gap: 6px; }
  .av { width: 18px; height: 18px; font-size: 6.5px; }
  .bar { height: 20px; line-height: 20px; font-size: 10px; padding-left: 6px; }
  .gantt-today { left: 48%; top: 10px; bottom: 10px; }
  .batu { flex-direction: column; padding: 12px; gap: 12px; }
  .how { display: flex; flex-direction: column; gap: 14px; padding-top: 64px; }
  .work, .founders { padding-top: 64px; }
  .row-founder { display: flex; flex-direction: column; gap: 12px; }
  .row-founder h3 { font-size: 30px; }
  .glyph { grid-template-columns: repeat(12, 7px); gap: 2px; }
  .glyph i { width: 7px; height: 7px; }
  .contact { margin-top: 64px; padding: 64px 0 40px; gap: 48px; }
  .site-footer { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
  .footer-end { justify-content: flex-start; gap: 16px; }
}
@media (max-width: 640px) {
  .site-header { height: 72px; }
  .brand-name { font-size: 19px; }
  .site-nav a:not(.nav-mail) { display: none; }
  .nav-mail { font-size: 16px; }
  .hero { padding: 32px 0 56px; gap: 28px; }
  .hero-copy { gap: 20px; }
  .link-italic { font-size: 18px; }
  .caption { font-size: 15px; }
  .row h3 { font-size: 30px; }
  .specs > div { flex-direction: column; gap: 2px; }
  .specs dt { width: auto; font-size: 14px; }
  .statement { font-size: 25px; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bit { animation: none; transition: none; }
  .flood-wrap.on .flood, .flood-wrap.on .flood-label { animation-duration: .01s; }
}
