/* Shared page styles (once the OpttiFlow case study, now used by Folio): the site's type and palette, a wider measure than an essay. */

.of-main {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 0 104px;
}

.of-title {
  font-size: clamp(52px, 8vw, 96px);
}

.of-deck {
  max-width: 30em;
  margin-top: 24px;
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.of-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.of-facts div { padding-top: 12px; border-top: 1px solid var(--rule); }
.of-facts dt {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.of-facts dd { margin-top: 4px; font-size: 16px; line-height: 1.45; color: var(--ink); }

/* A small pulse beside the launch date. */
.of-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  vertical-align: 2px;
  background: var(--accent);
  animation: of-pulse 2.4s ease-in-out infinite;
}
@keyframes of-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .of-live { animation: none; } }

/* The film */

.of-film { margin-top: 56px; }

.of-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #070707;
  border: 1px solid var(--rule);
}

.of-film figcaption {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.55;
}
.of-film-title {
  color: var(--ink);
  font-weight: 500;
}
.of-film-title span {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

.of-film-frame {
  position: relative;
  border: 1px solid var(--rule);
  background: #070707;
}
.of-film-frame img { display: block; width: 100%; height: auto; }

/* Sections: a label in the margin, like the home page. */

.of-section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.of-label {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.of-body { min-width: 0; }

.of-body h3 {
  color: var(--ink);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
}

.of-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.of-steps li { counter-increment: step; }
.of-steps h3::before {
  content: counter(step, decimal-leading-zero);
  margin-right: 10px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
.of-steps p,
.of-notes p { margin-top: 8px; font-size: 16px; line-height: 1.55; }

.of-own {
  max-width: 40em;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.of-own strong { color: var(--ink); font-weight: 500; }

.of-lead {
  max-width: 34em;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* The architecture, as boxes on a grid. */

.of-arch {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.arch-col { display: grid; align-content: start; gap: 10px; position: relative; }
.arch-col + .arch-col::before {
  content: "→";
  position: absolute;
  left: -20px;
  top: 34px;
  color: var(--accent);
}

.arch-tag { color: var(--muted); }

.arch-box {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.arch-box small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }

.arch-stamp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-color: var(--accent);
}
.arch-stamp span {
  padding: 8px 10px;
  border: 1px solid var(--rule);
}
.arch-stamp span:first-child { grid-column: 1 / -1; }

.arch-ghost { color: var(--muted); border-style: dashed; }
.arch-quiet { color: var(--ink-soft); }
.arch-dashed { border-style: dashed; }

.of-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
  margin-top: 40px;
}
.of-notes li { padding-top: 14px; border-top: 1px solid var(--rule); }

.of-body code {
  font-family: var(--mono);
  font-size: 0.88em;
}

/* AWS: a two-column definition list. */

.of-aws div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.of-aws div:first-child { padding-top: 0; }
.of-aws dt {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
}
.of-aws dd { font-size: 16px; line-height: 1.6; }

.of-stack { margin-top: 24px; }

/* Links that switch on at launch. */

.of-links li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.of-links li:first-child { padding-top: 0; }
.of-links a,
.of-soon { color: var(--ink); font-weight: 500; }
.of-soon { color: var(--muted); }
.of-links p { margin-top: 4px; font-size: 16px; }

@media (max-width: 860px) {
  .of-section { grid-template-columns: 1fr; gap: 16px; margin-top: 56px; padding-top: 32px; }
  .of-film figcaption { grid-template-columns: 1fr; gap: 8px; }
  .of-steps,
  .of-notes { grid-template-columns: 1fr; gap: 24px; }
  .of-arch { grid-template-columns: 1fr; gap: 28px; padding: 16px; }
  .arch-col + .arch-col::before { content: "↓"; left: 0; top: -24px; }
  .of-aws div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 760px) {
  .of-main { padding: 40px 0 72px; }
  .of-facts { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .of-film { margin-top: 40px; }
  .of-lead { font-size: 19px; }
}
