/* OMT (Old Man Tricks) landing page: what kdui's precompiled CSS doesn't cover. */

/* Fonts: self-hosted, latin subset. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap; src: url("fonts/bricolage-latin.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/instrument-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); }

/* Palette taken from the OMT portrait: navy ground, cream outline, mustard cap patch. */
:root {
  --background: #f4efdd;
  --foreground: #1d2040;
  --muted: #ebe4ca;
  --muted-foreground: #575a78;
  --secondary: #ebe4ca;
  --border: #d9d1b4;
  --primary: #1d2040;
  --primary-foreground: #f4efdd;
  --ring: #c98a1c;
  --omt-mark: #c98a1c;
  --omt-stage-a: #2e3152;
  --omt-stage-b: #0f1123;
  --omt-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --omt-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --omt-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  accent-color: var(--omt-mark);
  scrollbar-color: color-mix(in oklab, var(--omt-mark) 55%, var(--muted)) transparent;
}
.dark {
  --background: #14162a;
  --foreground: #f2ebcf;
  --muted: #1c1f3a;
  --muted-foreground: #a7aac6;
  --secondary: #1c1f3a;
  --border: #2a2e52;
  --primary: #e2ae47;
  --primary-foreground: #1a1630;
  --ring: #e2ae47;
  --omt-mark: #e2ae47;
}
::selection { background: var(--omt-mark); color: var(--background); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id], article[id], header[id] { scroll-margin-top: 4.5rem; }
body { font-family: var(--omt-body); line-height: 1.55; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-family: var(--omt-display); }
.btn { min-height: 44px; }
.btn[data-size="lg"] { min-height: 48px; }
.btn[data-size="sm"] { min-height: 44px; }
.btn[data-size="icon"] { min-width: 44px; }
.omt-wrap { max-width: 70rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 48rem) { .omt-wrap { padding-inline: 1.75rem; } }

/* ---- Nav ---- */
.omt-nav { position: sticky; top: 0; z-index: 50; background: var(--background); border-bottom: 1px solid var(--border); }
.omt-nav-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: .5rem; }
.omt-brand { display: flex; align-items: center; gap: .875rem; text-decoration: none; min-height: 44px; }
.omt-brand img { height: 3.4rem; width: auto; filter: drop-shadow(0 2px 5px rgba(0,0,0,.4)); }
.omt-brand b { font-family: var(--omt-display); font-weight: 800; font-size: 2.15rem; line-height: 1; letter-spacing: -.03em; }
.omt-nav-actions { display: flex; align-items: center; gap: .5rem; }

/* ---- Hero ---- */
.omt-hero { padding-block: 3rem 3.5rem; border-bottom: 1px solid var(--border); }
.omt-hero-grid { display: grid; gap: 2.75rem; align-items: center; }
@media (min-width: 56rem) {
  .omt-hero { padding-block: 4.5rem 5rem; }
  .omt-hero-grid { grid-template-columns: 5fr 7fr; gap: 3.5rem; }
}
.omt-hero h1 { font-weight: 800; font-size: clamp(2.7rem, 9vw, 4.75rem); line-height: .98; letter-spacing: -.035em; }
.omt-lede { margin-top: 1.1rem; max-width: 30ch; font-size: 1.2rem; color: var(--muted-foreground); }
.omt-cta { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1.75rem; }

/* ---- The reel: one big frame that flips through the real screens ---- */
.omt-reel { position: relative; }
.omt-reel-frame { position: relative; }
.omt-reel-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 1.1rem;
  background: radial-gradient(ellipse at 40% 40%, var(--omt-stage-a), var(--omt-stage-b) 80%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 44px -26px rgba(0,0,0,.65), 0 12px 20px -12px rgba(0,0,0,.45);
}
.omt-slide { position: absolute; opacity: 0; transition: opacity .6s ease; }
.omt-slide.is-on { opacity: 1; z-index: 1; }
.omt-slide.is-tv { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.omt-slide.is-cli { top: 6%; left: 0; right: 0; height: 88%; width: auto; margin-inline: auto; border-radius: .7rem; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 26px 36px -18px rgba(0,0,0,.8); }
.omt-slide.is-on.is-tv { animation: omt-push 6s cubic-bezier(.2,.6,.2,1) both; }
.omt-slide.is-on.is-cli { animation: omt-float 6s cubic-bezier(.2,.6,.2,1) both; }
@keyframes omt-push { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes omt-float { from { transform: translateY(6px) scale(.985); } to { transform: none; } }

.omt-reel-mascot { position: absolute; z-index: 2; right: -1.25rem; top: -1.75rem; width: clamp(4.25rem, 15%, 7rem); height: auto; transform: rotate(6deg); filter: drop-shadow(0 12px 12px rgba(0,0,0,.5)); }
@media (max-width: 40rem) {
  .omt-reel-mascot { right: -.25rem; top: -1.5rem; }
  .omt-slide.is-cli { top: 3%; height: 94%; }
}
.omt-reel-mascot.is-hop { animation: omt-hop .8s cubic-bezier(.34,1.56,.64,1); }
@keyframes omt-hop { 0% { transform: translateY(0) rotate(6deg); } 35% { transform: translateY(-14%) rotate(-6deg); } 100% { transform: translateY(0) rotate(6deg); } }

.omt-reel-ctl { display: flex; align-items: center; gap: .75rem 1rem; margin-top: 1rem; flex-wrap: wrap; }
.omt-reel-tag { margin-right: auto; font-family: var(--omt-mono); font-size: .8125rem; font-weight: 500; letter-spacing: .02em; color: var(--muted-foreground); min-width: 11rem; }
.omt-reel-dots { display: flex; gap: .25rem; }
.omt-dot { position: relative; width: 2.25rem; height: 2.75rem; padding: 0; border: 0; background: transparent; cursor: pointer; }
.omt-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--border); }
.omt-dot::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--omt-mark); transform: scaleX(0); transform-origin: left; }
.omt-dot[aria-current="true"]::after { animation: omt-fill var(--dur, 3.8s) linear forwards; }
.omt-reel.is-paused .omt-dot[aria-current="true"]::after { animation-play-state: paused; }
.omt-reel.is-static .omt-dot[aria-current="true"]::after { animation: none; transform: scaleX(1); }
@keyframes omt-fill { to { transform: scaleX(1); } }
:where(.omt-dot):focus-visible { outline: 2px solid var(--omt-mark); outline-offset: 2px; border-radius: 4px; }

/* ---- Sections ---- */
.omt-sec { padding-block: 3.5rem; border-bottom: 1px solid var(--border); }
.omt-sec h2 { font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -.03em; line-height: 1.05; }
.omt-sub { margin-top: .7rem; max-width: 52ch; color: var(--muted-foreground); }
.omt-fine { margin-top: 1.5rem; max-width: 62ch; font-size: .875rem; color: var(--muted-foreground); }

.omt-tricks { margin-top: 2rem; display: grid; }
.omt-trick { display: grid; gap: 1.1rem 1.5rem; padding-block: 1.75rem; border-top: 1px solid var(--border); align-items: start; }
.omt-trick:first-child { border-top: 0; padding-top: .25rem; }
@media (min-width: 48rem) { .omt-trick { grid-template-columns: 4.75rem 1fr auto; } .omt-acts { justify-content: flex-end; } }
.omt-tile { width: 4rem; height: 4rem; border-radius: 1rem; display: grid; place-items: center; overflow: hidden; background: var(--muted); border: 1px solid var(--border); }
.omt-tile img { width: 100%; height: 100%; object-fit: cover; }
.omt-tile-icon { width: 1.9rem; height: 1.9rem; color: var(--foreground); }
.omt-trick h3 { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.1; }
.omt-trick p { margin-top: .4rem; max-width: 46ch; color: var(--muted-foreground); }
.omt-stack { margin-top: .6rem !important; font-family: var(--omt-mono); font-size: .75rem; }
.omt-acts { display: flex; flex-wrap: wrap; gap: .625rem; }

details.omt-how { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: .75rem; background: var(--muted); }
details.omt-how summary { min-height: 2.875rem; display: flex; align-items: center; padding: 0 1rem; font-weight: 600; cursor: pointer; list-style: none; }
details.omt-how summary::-webkit-details-marker { display: none; }
details.omt-how summary::after { content: "+"; margin-left: auto; font-weight: 500; color: var(--muted-foreground); }
details.omt-how[open] summary::after { content: "\2212"; }
.omt-how-body { padding: .25rem 1rem 1.1rem; display: grid; gap: .75rem; }
.omt-how-body ol { padding-left: 1.4rem; display: grid; gap: .5rem; color: var(--muted-foreground); list-style: decimal; }
.omt-how-body ol li::marker { color: var(--omt-mark); font-weight: 600; }
.omt-how-body ol b { color: var(--foreground); font-weight: 600; }
.omt-how-note { font-size: .875rem; color: var(--muted-foreground); max-width: 62ch; }
.omt-how-note b { color: var(--foreground); font-weight: 600; }
.omt-addr { margin-top: .5rem; font-family: var(--omt-mono); font-weight: 700; font-size: clamp(.85rem, 3.9vw, 1.05rem); padding: .75rem .9rem; border-radius: .6rem; border: 1px solid var(--border); background: var(--background); color: var(--foreground); user-select: all; }
.omt-code { margin: 0; padding: .875rem 1rem; overflow-x: auto; border: 1px solid var(--border); border-radius: .6rem; background: var(--background); font-size: .8125rem; line-height: 1.6; }
.omt-code code { font-family: var(--omt-mono); }

.omt-parts { margin-top: 2rem; display: grid; }
.omt-parts > div { display: grid; gap: .25rem 1.5rem; padding-block: 1rem; border-top: 1px solid var(--border); }
@media (min-width: 48rem) { .omt-parts > div { grid-template-columns: 12.5rem 1fr; } }
.omt-parts dt { font-weight: 600; }
.omt-parts dd { font-family: var(--omt-mono); font-size: .8438rem; color: var(--muted-foreground); }
.omt-parts a, .omt-foot a { text-decoration: underline; text-underline-offset: 3px; }
.omt-parts a { display: inline-block; padding-block: .6rem; margin-block: -.6rem; }
.omt-parts a:hover, .omt-foot a:hover { color: var(--foreground); }

/* ---- Footer ---- */
.omt-foot { padding-block: 2rem 2.5rem; font-size: .875rem; color: var(--muted-foreground); }
.omt-foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.omt-who { display: flex; align-items: center; gap: .75rem; margin-right: auto; }
.omt-who img { height: 3rem; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.omt-foot a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  .omt-slide { transition: none; }
  .omt-slide.is-on.is-tv, .omt-slide.is-on.is-cli, .omt-reel-mascot.is-hop { animation: none; }
}
