@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --bg: #ffffff;
  --fg: #111111;
  --muted: #4a4a4a;
  --line: rgba(17,17,17,.16);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --serif: "Times New Roman", Times, serif;
}

:root[data-theme="dark"]{
  --bg: #0b0c0f;
  --fg: #f2f2f2;
  --muted: rgba(242,242,242,.72);
  --line: rgba(242,242,242,.18);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:visited{ color: var(--fg); }
a:hover{ opacity: .72; }

.wrap{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 48px 18px;
}

.card{
  width: min(680px, 90vw);
  text-align: left;
  padding: 34px 22px 18px;
  margin-left: 12px; /* optical centering */
  opacity: 0;
  transform: translateY(10px);
  animation: enter .75s ease forwards;
}
@keyframes enter{ to{ opacity: 1; transform: translateY(0); } }

.stagger{ opacity: 0; transform: translateY(6px); animation: fadeUp .6s ease forwards; }
.d1{ animation-delay: .05s; } .d2{ animation-delay: .12s; } .d3{ animation-delay: .18s; } .d4{ animation-delay: .24s; } .d5{ animation-delay: .30s; }
@keyframes fadeUp{ to{ opacity: 1; transform: translateY(0); } }

.term{
  font-size: clamp(56px, 8vw, 88px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 14px;
}

.meta{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.pron{ font-style: italic; color: var(--fg); }
.pos{ font-style: italic; color: var(--muted); }

.rule{
  height: 1px;
  background: var(--line);
  width: 100%;
  margin: 18px 0;
  transform-origin: left;
  transform: scaleX(.92);
  animation: ruleGrow .7s ease forwards;
  animation-delay: .18s;
  opacity: 0;
}
@keyframes ruleGrow{ to{ transform: scaleX(1); opacity: 1; } }

.def{
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
}

.example{
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.7;
  font-style: italic;
  color: var(--muted);
  max-width: 60ch;
}
.example b{ font-weight: 700; color: var(--fg); font-style: italic; }

.links{ margin-top: 26px; display: grid; gap: 10px; justify-items: start; }
.linkrow{
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .02em;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* LEGAL */
body.legal .legal-container{
  width: min(860px, 92vw);
  margin: 0 auto;
  padding: 56px 18px 36px;
}
body.legal h1{
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 44px);
  letter-spacing: -0.02em;
  font-weight: 700;
  text-transform: lowercase;
}
body.legal .meta{
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
}
body.legal h2{
  margin: 26px 0 10px;
  font-size: 16px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--fg);
  text-transform: lowercase;
}
body.legal p, body.legal li{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}
body.legal hr{
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}

/* FOOTER */
.footer{
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.footer .row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
}
.footer .left, .footer .right{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.footer .legal, .footer .controls, .footer .meta2{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .01em;
}
.footer button{
  all: unset;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer .meta2{ margin-top: 10px; }

/* HEADER (Minecart LCD only here) */
@font-face{
  font-family: "Minecart LCD";
  src: url("/assets/fonts/Minecart%20LCD.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .inner{
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.site-header .brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-header .logo{
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  transform: none !important;
}
.site-header .title{
  font-family: "Minecart LCD", var(--mono);
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1;
}
.site-header .right{
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.site-header button{
  all: unset;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible, button:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--fg) 35%, transparent);
  outline-offset: 4px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce){
  .card, .stagger, .rule{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
