/* JOTLYO — the umbrella site.
 *
 * One stylesheet, no framework, no external font. The type is a system stack
 * on purpose: a webfont would mean a second origin on a page whose whole claim
 * is that it loads nothing, and the display face here is doing structural work
 * -- weight, width and letter-spacing -- that a system grotesk handles.
 *
 * The visual system is a lab notebook rather than a landing page: hairline
 * rules, monospaced index labels, rectangular cards with square corners, and
 * gold used as an instrument light rather than a brand wash.
 */

:root {
  /* Near-black with a navy cast, so the gold reads warm against it. */
  --ground: #06070d;
  --surface: #0a0c16;
  --surface-lift: #0e1120;

  --gold: #fdc211;
  --gold-hover: #ffd964;
  --gold-dim: #9c7605;

  --ink: #f4f3ef;
  --muted: #8c90a6;
  --faint: #575c72;

  /* The grid. Gold at very low alpha, so the rules read as ruled paper
     rather than as decoration competing with the accent. */
  --rule: rgba(253, 194, 17, 0.16);
  --rule-faint: rgba(253, 194, 17, 0.08);
  --edge: rgba(244, 243, 239, 0.1);

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    Helvetica, Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* No horizontal overflow at any width, enforced rather than hoped for. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  /* 17px floor: above the 16px minimum and comfortable on a phone. */
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A faint vertical rule down the page: the lab-notebook margin. It sits behind
   everything, never intercepts a pointer, and disappears on narrow screens
   where there is no room for a margin. */
body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 var(--gutter);
  width: 1px;
  background: var(--rule-faint);
  pointer-events: none;
}

@media (max-width: 52rem) {
  body::before { display: none; }
}

.frame {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

/* ---------- keyboard first ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ground);
  padding: 0.6rem 1rem;
  font: 600 0.85rem/1 var(--mono);
  letter-spacing: 0.08em;
  z-index: 10;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* One focus treatment for everything focusable, stated once. */
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- hero ---------- */

.hero {
  /* Light on the bottom: the first section already brings its own top padding,
     and stacking both left a dead band under the CTA that pushed the live
     experiment further down than it needs to be. */
  padding: clamp(3rem, 9vw, 5.5rem) 0 clamp(0.5rem, 2vw, 1rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.18em;
  color: var(--faint);
}

/* The status tick. Solid, not blinking -- a lab indicator, not a cursor. */
.tick {
  width: 7px;
  height: 7px;
  background: var(--gold);
  flex: none;
}

.wordmark {
  margin: 0;
  font-size: clamp(3.5rem, 16vw, 9rem);
  line-height: 0.86;
  font-weight: 800;
  letter-spacing: -0.03em;
  /* The one place gold is allowed to be large. */
  color: var(--gold);
}

.lede {
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.sub {
  margin: 0.85rem 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2.2vw, 1.2rem);
}

.hero-cta {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
}

/* ---------- the primary control ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.4rem;
  background: var(--gold);
  color: var(--ground);
  font: 700 0.82rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 1px solid var(--gold);
}

.btn:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}

.btn-arrow {
  transition: transform 160ms ease;
}

.btn:hover .btn-arrow,
.card-link:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- sections ---------- */

.section {
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
}

.section-title {
  margin: 0;
  font: 600 0.78rem/1 var(--mono);
  letter-spacing: 0.2em;
  color: var(--gold);
  flex: none;
}

.section-rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule);
}

.section-count {
  flex: none;
  font: 500 0.72rem/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------- experiment cards ---------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  /* The 1px gap over a ruled background is what makes two cards read as two
     cells of one instrument panel rather than two floating tiles. */
  background: var(--rule-faint);
  border: 1px solid var(--rule-faint);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.card {
  /* Square corners, deliberately. Rounded cards are the house style of every
     SaaS landing page and the brief asks for the opposite. */
  background: var(--surface);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 200ms ease;
}

.card:hover {
  background: var(--surface-lift);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.card-index {
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.14em;
  color: var(--faint);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  font: 600 0.65rem/1 var(--mono);
  letter-spacing: 0.14em;
  white-space: nowrap;
}

/* LIVE is filled; IN PROGRESS is outlined. The difference is legible without
   reading the words, and without relying on colour alone. */
.status-live {
  background: var(--gold);
  color: var(--ground);
}

.status-wip {
  border: 1px solid var(--gold-dim);
  color: var(--gold-dim);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ground);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.card-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-body {
  margin: 0;
  color: var(--muted);
  max-width: 38ch;
}

/* The in-progress card has no title, so its one line carries the weight. */
.card-body-lead {
  font-size: 1.15rem;
  color: var(--ink);
  padding-top: 0.35rem;
}

.card-link {
  margin-top: auto;
  padding-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  align-self: flex-start;
  color: var(--gold);
  font: 700 0.76rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.card-link:hover {
  color: var(--gold-hover);
  border-bottom-color: var(--gold-hover);
}

/* ---------- how we work ---------- */

.how-lead {
  margin: 0 0 clamp(1.5rem, 4vw, 2rem);
  font-size: clamp(1.35rem, 3.6vw, 1.9rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 24ch;
}

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  border-top: 1px solid var(--rule-faint);
}

.principles li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule-faint);
  font-size: 1.15rem;
  font-weight: 600;
}

/* On a wide screen the three sit side by side, so they need a divider between
   them rather than only under them. */
@media (min-width: 44rem) {
  .principles li + li {
    border-left: 1px solid var(--rule-faint);
    padding-left: 1.5rem;
  }
}

.principle-n {
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--gold);
  flex: none;
}

/* ---------- field notes ---------- */

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-faint);
}

.note {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-faint);
  color: var(--ink);
}

.note-n {
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--faint);
  flex: none;
  min-width: 2.5rem;
}

.notes-follow {
  margin: 1.5rem 0 0;
}

.inline-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

.inline-link:hover {
  color: var(--gold-hover);
  border-bottom-color: var(--gold-hover);
}

/* ---------- footer ---------- */

.footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-name {
  margin: 0;
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.16em;
  color: var(--muted);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--muted);
  font: 500 0.8rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* The contact address, in the same gold treatment the rest of the estate
   uses. Visited is pinned to the same colour deliberately: a contact address
   is not an article you read once, and a dimmed "already clicked" state is
   wrong for the only route to a person. */
.contact-email,
.contact-email:visited {
  color: var(--gold);
}

.contact-email:hover {
  color: var(--gold-hover);
}

/* SPECIFICITY, not a broader selector.
 *
 * `.footer-links a` is 0-1-1 and `.contact-email` is 0-1-0, so the footer rule
 * was quietly winning and the address rendered in --muted like its neighbours.
 * It had never actually been gold, on any deploy -- the bug was invisible
 * because muted grey against this ground still looks deliberate.
 *
 * Scoped to the footer list rather than fixed by raising `.contact-email`
 * globally: the shared class is used on other pages of the estate, and making
 * it heavier here would be reaching outside this site to win an argument it
 * only has in this one place. */
.footer-links .contact-email,
.footer-links .contact-email:visited {
  color: var(--gold);
}

.footer-links .contact-email:hover {
  color: var(--gold-hover);
}

.contact-email:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- motion, on request only ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* The LIVE dot stops pulsing and simply stays lit. It was signalling state,
     and the state is still true when the animation is gone. */
  .dot {
    animation: none;
    opacity: 1;
  }
}
