@font-face {
  font-family: Inter;
  src: url("./fonts/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --paper: #fafaf9;
  --fg: #22252a;
  --muted: #676f7e;
  --line: #e3e5e8;
  --brand-text: #474a50;
  --brand-tm: #9a9da2;
  --accent: #2563eb;
  --color-brand-text: #474a50;
  --color-mind: #6d28d9;
}

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

html {
  background: var(--paper);
  color: var(--fg);
  color-scheme: light;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .page {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .page {
    padding: 0 2rem;
  }
}

header .page,
footer .page {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

header .page {
  height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  height: 2.75rem;
  min-width: 0;
}

.brand svg {
  display: block;
  flex-shrink: 0;
}

.brand-encephlian {
  color: var(--brand-text);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-feature-settings: "ss01", "cv11";
  white-space: nowrap;
}

@media (min-width: 768px) {
  .brand-encephlian {
    font-size: 18px;
  }
}

.brand-encephlian [data-letter] {
  color: color-mix(in oklch, var(--color-brand-text), var(--color-mind) var(--heat, 0%));
}

.tm {
  margin-left: 0.02em;
  font-size: 0.38em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--brand-tm);
  vertical-align: 1.2em;
}

.mail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.5rem;
  padding: 0 0.875rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  transition: background-color 150ms, border-color 150ms;
}

.mail-btn:hover,
.mail-btn:focus-visible {
  background: #f4f5f7;
  border-color: #c5cbd3;
}

.mail-btn svg {
  display: block;
  flex-shrink: 0;
}

.mail-btn-lg {
  height: 2.75rem;
  margin-top: 1.75rem;
  padding: 0 1.125rem;
  font-size: 15px;
}

.mail {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  transition: color 150ms;
}

.mail:hover,
.mail:focus-visible {
  color: var(--fg);
}

main {
  flex: 1;
}

main .page {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

@media (min-width: 640px) {
  main .page {
    padding-top: 5.5rem;
    padding-bottom: 7rem;
  }
}

article {
  max-width: 28rem;
}

h1 {
  margin: 0;
  font-weight: 420;
  font-size: 32px;
  line-height: 38px;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

@media (min-width: 640px) {
  h1 {
    font-size: 40px;
    line-height: 46px;
  }
}

.lede {
  margin: 0.85rem 0 0;
  font-size: 17px;
  line-height: 26px;
  color: var(--muted);
  text-wrap: pretty;
}

@media (min-width: 640px) {
  .lede {
    margin-top: 1rem;
    font-size: 18px;
    line-height: 28px;
  }
}

.note {
  margin: 2.5rem 0 0;
  max-width: 24rem;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}

.note a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color 150ms, border-color 150ms;
}

.note a:hover,
.note a:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

footer .page {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
  justify-content: flex-start;
}

@media (min-width: 640px) {
  footer .page {
    padding-bottom: 2rem;
  }
}

footer p {
  margin: 0;
}

footer .mail {
  height: auto;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.enceph-logo .enceph-d1,
.enceph-logo .enceph-d2,
.enceph-logo .enceph-d3,
.enceph-logo .enceph-spark {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes enceph-ember-rise {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes enceph-dot-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes enceph-spark-shine {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(0.92) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.08) rotate(45deg);
  }
}

.enceph-logo-animated .enceph-ember {
  animation: enceph-ember-rise 3.6s ease-in-out infinite;
}

.enceph-logo-animated .enceph-d1 {
  animation: enceph-dot-pulse 2.4s ease-in-out infinite;
}

.enceph-logo-animated .enceph-d2 {
  animation: enceph-dot-pulse 2.4s ease-in-out infinite;
  animation-delay: 0.4s;
}

.enceph-logo-animated .enceph-d3 {
  animation: enceph-dot-pulse 2.4s ease-in-out infinite;
  animation-delay: 0.8s;
}

.enceph-logo-animated .enceph-spark {
  animation: enceph-spark-shine 3.2s ease-in-out infinite;
  animation-delay: 1.2s;
}

@media (prefers-reduced-motion: reduce) {
  .enceph-logo-animated .enceph-ember,
  .enceph-logo-animated .enceph-d1,
  .enceph-logo-animated .enceph-d2,
  .enceph-logo-animated .enceph-d3,
  .enceph-logo-animated .enceph-spark {
    animation: none;
  }
}
