:root {
  --bg: #0e0e11;
  --bg-2: #15151a;
  --line: rgba(255,255,255,.10);
  --ink: #f2f0ec;
  --dim: #8d8b93;
  --accent: #ff6b4a;
  --radius: 14px;

  /* the layer pane is a light sheet on the dark page; the drag clone leaves
     the pane, so these live here rather than on .panel */
  --p-bg: #efece6;
  --p-surface: #ffffff;
  --p-ink: #1b1b22;
  --p-ink-2: #56545e;
  --p-ink-3: #8a8892;
  --p-line: rgba(27,27,34,.15);
  --p-line-2: rgba(27,27,34,.34);
  --p-accent: #d64621;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(900px 600px at 22% -8%, #1d1d24 0%, transparent 62%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */

.top {
  padding: 26px 30px 6px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.mark {
  width: 17px; height: 17px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 26%, #fff 0 3px, transparent 3px),
    radial-gradient(circle at 50% 74%, #0e0e11 0 3px, transparent 3px),
    linear-gradient(90deg, #0e0e11 50%, #fff 50%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}

.tagline { margin: 0; color: var(--dim); font-size: 13.5px; }

/* ---------- layout ---------- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 510px;
  gap: 34px;
  align-items: start;
  padding: 22px 30px 60px;
  max-width: 1390px;
}

/* ---------- watch ---------- */

.stage { min-width: 0; }

.case {
  position: relative;
  width: min(440px, 100%);
  margin: 6px auto 0;
}

.case-ring {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 13px;
  background: linear-gradient(150deg, #6f6f77 0%, #2a2a30 38%, #55555d 62%, #1c1c21 100%);
  box-shadow:
    0 28px 60px rgba(0,0,0,.6),
    0 2px 0 rgba(255,255,255,.14) inset,
    0 -2px 0 rgba(0,0,0,.5) inset;
}

.watch {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  /* second line of defence: an acrylic layer must never blend with the page */
  isolation: isolate;
  box-shadow: 0 0 0 2px rgba(0,0,0,.7) inset;
}

.face-svg { display: block; width: 100%; height: 100%; }

/* the faint rings that hint at the stacked glass discs */
.disc-edge { color: transparent; transition: color .2s; }
.show-discs .disc-edge { color: rgba(255,255,255,.22); }

.crown {
  position: absolute;
  right: -13px; top: 50%;
  width: 15px; height: 34px;
  transform: translateY(-50%);
  border-radius: 4px;
  background: linear-gradient(90deg, #4a4a52, #86868e 40%, #33333a);
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}

/* ---------- readout ---------- */

.readout { text-align: center; margin: 26px 0 4px; }

.clock {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 34px;
  letter-spacing: .04em;
}

.clock em { font-style: normal; font-size: 14px; color: var(--dim); letter-spacing: .1em; }

body.is-scrubbing .clock { color: var(--accent); }

/* ---------- scrubber ---------- */

.scrub { max-width: 560px; margin: 12px auto 0; }

.track { position: relative; padding: 10px 0 2px; }

.track::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 6px; margin-top: -3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #101018 0%, #2b3f63 25%, #b9c6dd 50%, #2b3f63 75%, #101018 100%);
  box-shadow: 0 0 0 1px var(--line) inset;
  pointer-events: none;
}

.now {
  position: absolute;
  top: 50%;
  width: 2px; height: 22px;
  margin: -11px 0 0 -1px;
  background: var(--accent);
  border-radius: 2px;
  pointer-events: none;
  opacity: .0;
}
body.is-scrubbing .now { opacity: .9; }

#slider {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 0;
  height: 26px;
  cursor: ew-resize;
}
#slider:focus { outline: none; }
#slider::-webkit-slider-runnable-track { height: 26px; background: transparent; }
#slider::-moz-range-track { height: 26px; background: transparent; }

#slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 26px;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff, #cfcdd4);
  border: 1px solid rgba(0,0,0,.5);
  box-shadow: 0 2px 8px rgba(0,0,0,.55);
}
#slider::-moz-range-thumb {
  width: 18px; height: 26px;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff, #cfcdd4);
  border: 1px solid rgba(0,0,0,.5);
  box-shadow: 0 2px 8px rgba(0,0,0,.55);
}
#slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

.track-labels {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 2px;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: rgba(255,255,255,.3); }
.btn.is-on { background: var(--ink); color: #101014; border-color: var(--ink); }

.select, .check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: .04em;
}

.select select {
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

.check input { accent-color: var(--accent); }

/* the same controls, on the light pane */
.panel .select, .panel .check { color: var(--p-ink-3); }
.panel .select select {
  background: var(--p-surface);
  color: var(--p-ink);
  border-color: var(--p-line);
}

.hint { margin: 16px 0 0; color: #6f6d76; font-size: 11.5px; line-height: 1.8; }

kbd {
  font: inherit; font-size: 10.5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 1px;
  background: var(--bg-2);
  color: #a9a7b0;
}

/* ---------- panel ---------- */

.panel {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  background: var(--p-bg);
  color: var(--p-ink);
  padding: 22px;
  position: sticky;
  top: 22px;
  box-shadow: 0 18px 44px rgba(0,0,0,.45);
}

.panel h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.01em; }
.panel .note { color: var(--p-ink-2); }
.panel .note b { color: var(--p-ink); }

/* ---------- the layer stack ---------- */

.layers {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  position: relative;
}

.layer-item {
  display: grid;
  grid-template-columns: 12px 34px 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: 9px;
  cursor: grab;
  position: relative;
  /* the fade back after a drop: slow enough to follow with the eye */
  transition: background-color 1000ms ease-out, border-color 1000ms ease-out;
}
.layer-item:hover { border-color: var(--p-line-2); }
.layer-item.is-over { border-color: var(--p-accent); background: #ffeee9; }
.layer-item.is-empty .layer-file { color: var(--p-ink-3); font-style: italic; }

.layer-grip {
  color: #b7b4bd;
  font-size: 11px;
  letter-spacing: -2px;
  line-height: 1;
  user-select: none;
  cursor: grab;
  /* the one place a finger may start a drag, so it must not scroll the page */
  touch-action: none;
  align-self: stretch;
  display: grid;
  place-items: center;
}
.layer-item:hover .layer-grip { color: var(--p-ink-3); }

.layer-thumb {
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  /* a checker over the dial colour, so transparency reads without hiding
     pale artwork against a white pane */
  background-image:
    linear-gradient(45deg, var(--chk) 25%, transparent 25%, transparent 75%, var(--chk) 75%),
    linear-gradient(45deg, var(--chk) 25%, transparent 25%, transparent 75%, var(--chk) 75%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  box-shadow: 0 0 0 1px rgba(27,27,34,.22) inset;
  flex: none;
}
.layer-thumb.dial-ink { background-color: #101014; --chk: #1d1d24; }
.layer-thumb.dial-night { background-color: #0a0f1c; --chk: #16203a; }
.layer-thumb.dial-bone { background-color: #eae3d6; --chk: #d6cdbc; }
.layer-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.layer-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.layer-name { font-size: 12px; font-weight: 600; color: var(--p-ink); }
.layer-name i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #f5f3ef;
  background: var(--p-ink);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: 1px;
}
.layer-file {
  font-size: 10px;
  color: var(--p-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Always visible: it changes how the layer looks, so it is state, not a tool. */
.blend-pill {
  font: inherit;
  font-size: 9.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--p-line);
  background: transparent;
  color: var(--p-ink-3);
  transition: background .12s, color .12s, border-color .12s;
}
.blend-pill:hover { border-color: var(--p-line-2); color: var(--p-ink); }
.blend-pill.is-acrylic {
  background: #d9ecff;
  border-color: #7fb4e6;
  color: #17527f;
}
.blend-pill.is-acrylic:hover { background: #cbe4ff; color: #0f3d61; }

.layer-tools { display: none; gap: 1px; }
.layer-item:hover .layer-tools, .layer-item:focus-within .layer-tools { display: flex; }

.icon-btn {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 0; border-radius: 5px;
  background: transparent;
  color: var(--p-ink-3);
  font: inherit; font-size: 11px; line-height: 1;
  cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: rgba(27,27,34,.1); color: var(--p-ink); }
.icon-btn:disabled { opacity: .28; cursor: default; }

/* The gap a dragged row came out of: keeps its size so the list never jumps. */
.layer-item.is-origin {
  background: transparent;
  border: 1px dashed var(--p-accent);
}
.layer-item.is-origin > * { visibility: hidden; }

/* Where a dropped row landed: it starts lit and fades back, so the eye can
   follow it home. Set last so it wins while it lasts. */
.layer-item.is-landed {
  background: #ffe0d6;
  border-color: var(--p-accent);
  transition: none;
}

/* The row under the pointer while it is being dragged. */
.layer-drag {
  position: fixed;
  z-index: 50;
  display: grid;
  grid-template-columns: 12px 34px 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  background: var(--p-surface);
  color: var(--p-ink);
  border: 1px solid var(--p-accent);
  border-radius: 9px;
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
  cursor: grabbing;
  pointer-events: none;
  opacity: .97;
}
.layer-drag .layer-tools { display: none; }

/* Where it lands if the pointer is let go now. */
.drop-line {
  position: absolute;
  left: 0; right: 0;
  height: 0;
  border-top: 2px solid var(--p-accent);
  pointer-events: none;
  z-index: 5;
}
.drop-line::before, .drop-line::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--p-accent);
}
.drop-line::before { left: -1px; }
.drop-line::after { right: -1px; }

body.is-dragging { cursor: grabbing; user-select: none; }
body.is-dragging .layer-item, body.is-dragging .layer-grip { cursor: grabbing; }

/* Touch and pen: there is no hover, so the row tools would never appear, and
   the grip needs a target a finger can actually hit. */
@media (hover: none) {
  .layer-item, .layer-drag { grid-template-columns: 26px 34px 1fr auto auto; }
  .layer-tools { display: flex; }
  .layer-grip { font-size: 15px; letter-spacing: -3px; color: var(--p-ink-3); }
}

@media (prefers-reduced-motion: reduce) {
  .layer-item { transition: none; }
}

/* ---------- storage meter ---------- */

.storage { margin-top: 12px; display: grid; gap: 5px; }
.storage-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(27,27,34,.12);
  overflow: hidden;
}
.storage-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: #4a9a6a;
  transition: width .25s ease-out;
}
.storage-text {
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--p-ink-3);
}
.storage.is-full .storage-bar i { background: var(--p-accent); }
.storage.is-full .storage-text { color: var(--p-accent); }
.storage[hidden] { display: none; }

/* ---------- stack controls ---------- */

.panel .btn {
  background: var(--p-surface);
  color: var(--p-ink);
  border-color: var(--p-line);
}
.panel .btn:hover:not(:disabled) { border-color: var(--p-line-2); }

.btn-block {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-style: dashed;
  background: transparent;
  color: var(--p-ink-3);
}
.btn-block:hover:not(:disabled) { color: var(--p-ink); background: var(--p-surface); }
.btn-block:disabled { opacity: .4; cursor: default; }

.stack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.stack-row .btn { font-size: 12px; padding: 7px 13px; }

.err {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffe8e1;
  border: 1px solid rgba(214,70,33,.4);
  color: #9c3316;
  font-size: 11.5px;
}

.specs {
  margin-top: 16px;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  background: rgba(255,255,255,.6);
  padding: 10px 12px;
}
.specs summary {
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--p-ink-3);
  list-style: none;
}
.specs summary::-webkit-details-marker { display: none; }
.specs summary::before { content: "▸ "; }
.specs[open] summary::before { content: "▾ "; }
.specs ul { margin: 10px 0 2px; padding-left: 16px; }
.specs li { font-size: 11.5px; line-height: 1.65; color: var(--p-ink-2); margin-bottom: 7px; }
.specs b { color: var(--p-ink); font-weight: 600; }
.specs code {
  background: rgba(27,27,34,.08);
  color: var(--p-ink);
  padding: 1px 4px; border-radius: 4px;
  font-size: 10.5px;
}

.foot { margin: 18px 0 0; font-size: 11.5px; color: var(--p-ink-3); line-height: 1.7; }
.foot b { color: var(--p-ink-2); font-weight: 600; }

@media (max-width: 1080px) {
  main { grid-template-columns: 1fr; padding: 18px 18px 50px; gap: 26px; }
  .panel { position: static; }
  .top { padding: 20px 18px 4px; }
  .case { width: min(340px, 100%); }
  .clock { font-size: 27px; }
  .layer-tools { display: flex; }
}

/* ---------- header nav ---------- */

.nav { margin-left: auto; }
.nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

a.wordmark { color: inherit; text-decoration: none; }

/* ---------- about page ---------- */

.page {
  display: block;
  max-width: 760px;
  padding: 22px 30px 70px;
}

.sheet {
  background: var(--p-bg);
  color: var(--p-ink);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0,0,0,.45);
  padding: 40px 44px 44px;
}

.sheet h1 {
  margin: 0 0 18px;
  font-size: 30px;
  letter-spacing: -.02em;
}
.sheet h2 {
  margin: 38px 0 12px;
  font-size: 16px;
  letter-spacing: -.01em;
  padding-top: 20px;
  border-top: 1px solid var(--p-line);
}
.sheet p { margin: 0 0 14px; color: var(--p-ink-2); font-size: 14.5px; line-height: 1.65; }
.sheet p b, .sheet li b { color: var(--p-ink); font-weight: 600; }
.sheet .lede { font-size: 16px; line-height: 1.6; color: var(--p-ink); }

.sheet ul { margin: 0 0 14px; padding-left: 20px; }
.sheet li {
  color: var(--p-ink-2);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 9px;
}

/* the one claim a visitor came to this page to check */
.standout {
  margin: 0 0 16px !important;
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--p-line);
  font-size: 15px !important;
  color: var(--p-ink) !important;
  font-weight: 500;
}

.contact { margin: 0 0 8px !important; }
.contact a {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--p-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 9px 18px;
  transition: border-color .15s, background .15s;
}
.contact a:hover { border-color: var(--p-line-2); background: #fbfaf8; }

.colophon {
  margin: 34px 0 0 !important;
  padding-top: 18px;
  border-top: 1px solid var(--p-line);
  font-size: 11.5px !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--p-ink-3) !important;
}

@media (max-width: 640px) {
  .page { padding: 18px 18px 50px; }
  .sheet { padding: 26px 22px 30px; }
  .sheet h1 { font-size: 25px; }
  .top { flex-wrap: wrap; }
  .nav { margin-left: 0; width: 100%; }
}
