:root {
  --reveal: 0;
  --effect-reveal: 0;
  --final-reveal: 0;
  --ink: #050505;
  --paper: #f7f6f0;
  --warm-shadow: rgba(44, 34, 18, 0.22);
  --panel: rgba(255, 255, 255, 0.54);
  --bg-dim: 0;
  --pointer-x: 0;
  --pointer-y: 0;
  --tagline-x: 64.5%;
  --tagline-y: 57.6%;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #ffffff;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

body {
  color: var(--ink);
}

.intro-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.66) 68%, #ffffff 100%),
    url("./assets/lineform-backgound.jpg") center top / 100% auto no-repeat,
    #ffffff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.intro-shell::before {
  content: none;
}

.intro-shell::before {
  opacity: calc(0.23 + var(--bg-dim) * 0.17);
}

.intro-shell .wordmark-clean {
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, calc(0.68 - var(--bg-dim) * 0.34)))
    drop-shadow(0 18px 38px rgba(255, 255, 255, calc(var(--bg-dim) * 0.12)));
}

.intro-shell .tuning-panel {
  background: rgba(255, 255, 255, calc(0.36 - var(--bg-dim) * 0.08));
  color: color-mix(in srgb, #141310 calc((1 - var(--bg-dim)) * 100%), #f4f0e5 calc(var(--bg-dim) * 100%));
}

.intro-shell .tuning-panel label {
  color: color-mix(in srgb, rgba(20, 19, 16, 0.74) calc((1 - var(--bg-dim)) * 100%), rgba(244, 240, 229, 0.76) calc(var(--bg-dim) * 100%));
}

#glass-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100vw;
  height: 100vh;
  opacity: var(--effect-reveal);
  pointer-events: none;
}

.wordmark-stage {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  height: 100%;
  padding: 7vh 4vw;
  animation: hero-stage-load 900ms 120ms cubic-bezier(.18, .82, .24, 1) both;
}

.wordmark-wrap {
  position: relative;
  width: min(80vw, 1120px);
  aspect-ratio: 639 / 255;
  transform:
    translate3d(calc(var(--pointer-x) * 4px), calc(-5vh + var(--pointer-y) * 4px), 0);
  animation: mark-settle 1100ms cubic-bezier(.18, .86, .28, 1) both;
}

.wordmark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wordmark-clean {
  z-index: 4;
  opacity: calc(0.92 * var(--final-reveal));
  filter:
    blur(calc((1 - var(--final-reveal)) * 2px))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.68));
  transform: scale(calc(0.998 + var(--final-reveal) * 0.002));
  -webkit-mask-image: radial-gradient(
    ellipse 15% 38% at 70% 47%,
    transparent 0%,
    transparent 34%,
    rgba(0, 0, 0, 0.34) 48%,
    rgba(0, 0, 0, 0.86) 66%,
    #000 82%
  );
  mask-image: radial-gradient(
    ellipse 15% 38% at 70% 47%,
    transparent 0%,
    transparent 34%,
    rgba(0, 0, 0, 0.34) 48%,
    rgba(0, 0, 0, 0.86) 66%,
    #000 82%
  );
}

.wordmark-write {
  z-index: 6;
  opacity: calc(1 - var(--final-reveal) * 0.94);
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.68))
    drop-shadow(0 12px 22px rgba(5, 5, 5, 0.08));
}

.write-stroke {
  fill: none;
  stroke: white;
  stroke-width: 36;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark-shadow {
  z-index: 1;
  opacity: calc(var(--effect-reveal) * 0.34);
  transform: translate(0.9%, 2.2%);
  filter: blur(14px);
}

.intro-tagline {
  position: absolute;
  z-index: 7;
  left: var(--tagline-x);
  top: var(--tagline-y);
  margin: 0;
  color: rgba(0, 0, 0, 0.82);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  opacity: calc(var(--reveal) * 0.96);
  text-align: left;
  white-space: nowrap;
  transition: color 260ms ease;
}

.start-button {
  position: relative;
  z-index: 7;
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-width: 214px;
  height: 62px;
  padding: 0 24px 0 30px;
  margin-top: clamp(12px, 1vh, 24px);
  color: #10100e;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 244, 237, 0.78)),
    rgba(255, 255, 255, 0.7);
  box-shadow:
    0 22px 50px var(--warm-shadow),
    0 3px 12px rgba(255, 255, 255, 0.66) inset,
    0 -10px 22px rgba(0, 0, 0, 0.05) inset;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 480ms ease, transform 520ms cubic-bezier(.2, .85, .22, 1), box-shadow 220ms ease;
}

.intro-shell.is-complete .start-button {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.intro-shell.is-exiting {
  pointer-events: none;
}

.tuning-panel {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  display: grid;
  gap: 12px;
  width: min(310px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: 0 18px 50px rgba(35, 31, 24, 0.16);
  backdrop-filter: blur(24px) saturate(1.25);
}

.tuning-panel[hidden] {
  display: none;
}

.tuning-panel label {
  display: grid;
  grid-template-columns: 86px 1fr 42px;
  align-items: center;
  gap: 12px;
  color: rgba(20, 19, 16, 0.74);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tuning-panel input {
  accent-color: #161615;
}

.tuning-panel output {
  color: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tuning-panel button {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #f7f5ee;
  background: #151512;
  font-weight: 700;
  cursor: pointer;
}

@keyframes mark-settle {
  from {
    opacity: 0;
    filter: blur(8px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@media (max-width: 760px) {
  .intro-shell {
    min-height: 560px;
  }

  .wordmark-wrap {
    width: 94vw;
    transform:
      translate3d(calc(var(--pointer-x) * 2px), calc(-14vh + var(--pointer-y) * 2px), 0);
  }

  .intro-tagline {
    left: min(var(--tagline-x), 54%);
    top: min(var(--tagline-y), 47%);
    font-size: 18px;
  }

  .start-button {
    height: 58px;
    min-width: 198px;
    padding: 0 22px 0 28px;
  }

  .tuning-panel {
    left: 18px;
    right: 18px;
    width: auto;
  }

  .tuning-panel label {
    grid-template-columns: 82px 1fr 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --reveal: 1;
  }

  .start-button {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .wordmark-wrap {
    animation: none;
    transform: none;
    transition: none;
  }

  .marketing-nav {
    animation: none;
    opacity: 1;
    transform: translateX(-50%);
    filter: none;
  }

  .wordmark-stage,
  .marketing-footer {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .app-window {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

html {
  background: #ffffff;
}

body {
  overflow-x: hidden;
}

body {
  background: #ffffff;
}

.intro-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.66) 68%, #ffffff 100%),
    url("./assets/lineform-backgound.jpg") center top / 100% auto no-repeat,
    #ffffff;
}

.editor-section,
.marketing-footer {
  position: relative;
}

.editor-section {
  isolation: isolate;
}

.editor-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 0;
  width: 100vw;
  height: calc(100% + 160px);
  transform: translateX(-50%);
  background: #ffffff;
}

.marketing-nav {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 20;
  width: min(1120px, calc(100% - 32px));
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(247, 245, 238, 0.72);
  box-shadow: 0 20px 60px rgba(40, 34, 24, 0.12);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  transform: translateX(-50%);
  animation: nav-load 760ms 80ms cubic-bezier(.18, .82, .24, 1) both;
}

.marketing-brand {
  display: inline-flex;
  align-items: center;
  width: 116px;
  height: 34px;
}

.marketing-brand img {
  width: 100%;
  height: auto;
  display: block;
}

.marketing-nav nav,
.marketing-footer nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.marketing-nav a {
  color: rgba(17, 17, 17, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
}

.marketing-nav nav a,
.marketing-footer nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}

.marketing-nav nav a svg,
.marketing-footer nav a svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}

.marketing-nav nav a:hover,
.marketing-footer nav a:hover {
  color: #101010;
  background: rgba(255, 255, 255, 0.72);
}

.marketing-nav .github-link,
.marketing-footer .github-link {
  color: #101010;
  background: rgba(255, 255, 255, 0.9);
}

.marketing-nav .github-link:hover,
.marketing-footer .github-link:hover {
  color: #101010;
  background: #ecebea;
}

.marketing-nav .marketing-nav-cta,
.marketing-footer .marketing-nav-cta {
  color: #f9f6ed;
  background: #111;
}

.marketing-nav .marketing-nav-cta:hover,
.marketing-footer .marketing-nav-cta:hover {
  color: #fff;
  background: #272727;
}

.marketing-section,
.marketing-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #111;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.editor-section {
  margin-top: calc(-42.4vh + 73px);
  padding: 0 0 42px;
}

.app-window {
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1000px;
  min-height: 720px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 24px;
  background: #f2f3f2;
  box-shadow:
    0 34px 90px rgba(32, 28, 20, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
  animation: app-window-load 900ms 240ms cubic-bezier(.18, .82, .24, 1) both;
}

@keyframes app-window-load {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.992);
    filter: blur(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.titlebar {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 86px;
  padding: 0 24px;
  background:
    radial-gradient(circle at 52% 0%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 46%),
    rgba(247, 248, 248, 0.94);
}

.traffic {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 78px;
}

.traffic span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.traffic .red { background: #ee695e; }
.traffic .yellow { background: #f4bf4f; }
.traffic .green { background: #62c554; }

.sidebar-button,
.mode-switch button,
.toolbar button {
  appearance: none;
  border: 0;
}

.sidebar-button {
  justify-self: center;
  width: 44px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 42px rgba(32, 28, 20, 0.08);
  pointer-events: none;
}

.sidebar-button span {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
  border: 2px solid #555957;
  border-radius: 4px;
}

.sidebar-button span::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  border-left: 2px solid #555957;
}

.sidebar-button span::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #555957;
  box-shadow: 0 5px 0 #555957;
}

.document-title {
  display: grid;
  gap: 2px;
  width: 160px;
  color: #4d4d49;
  font-size: 1.1rem;
  line-height: 1;
}

.document-title strong,
.document-title span {
  font-weight: 400;
}

.document-title span {
  color: rgba(77, 77, 73, 0.72);
  font-size: 0.86rem;
}

.mode-switch {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 304px;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 42px rgba(32, 28, 20, 0.1);
}

.mode-switch button {
  min-height: 36px;
  border-radius: 999px;
  color: #454541;
  background: transparent;
  cursor: pointer;
  font-size: 0.98rem;
}

.mode-switch button + button {
  border-left: 1px solid rgba(55, 55, 52, 0.08);
}

.mode-switch .is-active {
  color: #232321;
  background: #e8e7e4;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset;
  border-left-color: transparent;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin-left: auto;
  min-width: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 42px rgba(32, 28, 20, 0.08);
}

.toolbar button {
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(17, 17, 17, 0.56);
  background: transparent;
  pointer-events: none;
  font-size: 1.12rem;
}

.toolbar svg,
.search-button svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: #5a5d5b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar button:first-child svg {
  fill: #5a5d5b;
  stroke: none;
}

.text-size-button {
  color: #5a5d5b;
  font-size: 1.24rem;
}

.search-button {
  appearance: none;
  border: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 42px rgba(32, 28, 20, 0.08);
  pointer-events: none;
}

.editor-body {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: stretch center;
  padding: 60px 44px 28px;
  background: #f2f3f2;
}

.document-page {
  position: relative;
  width: min(680px, 100%);
  height: 540px;
  min-height: 0;
}

.markdown-source,
.markdown-rendered {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #242420;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.15rem;
  line-height: 1.75;
  background: transparent;
  caret-color: #246fe8;
  resize: none;
  white-space: pre-wrap;
  overflow: auto;
}

.markdown-source {
  display: block;
}

.markdown-rendered {
  display: none;
}

.markdown-rendered h1,
.markdown-rendered h2,
.markdown-rendered h3 {
  margin: 0 0 30px;
  color: #2f3a46;
  font-size: 1.22rem;
  line-height: 1.25;
}

.markdown-rendered h2 {
  margin-top: 48px;
}

.markdown-rendered p {
  margin: 0 0 36px;
}

.markdown-rendered ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.markdown-rendered li {
  margin: 0 0 8px;
}

.markdown-rendered li::before {
  content: "- ";
}

.split-divider {
  display: none;
  background: rgba(34, 34, 34, 0.12);
}

.app-window[data-mode="read"] .markdown-source,
.app-window[data-mode="read"] .split-divider {
  display: none;
}

.app-window[data-mode="read"] .markdown-rendered,
.app-window[data-mode="preview"] .markdown-rendered {
  display: block;
}

.app-window[data-mode="read"] .markdown-rendered {
  max-width: 610px;
  margin-inline: auto;
  font-size: 1.18rem;
  line-height: 1.82;
}

.app-window[data-mode="preview"] .markdown-rendered h1 {
  font-size: 2rem;
}

.app-window[data-mode="preview"] .markdown-rendered h2 {
  font-size: 1.4rem;
}

.app-window[data-mode="preview"] .editor-body {
  padding-inline: 0;
}

.app-window[data-mode="preview"] .document-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  width: 100%;
  height: 540px;
  min-height: 0;
}

.app-window[data-mode="preview"] .markdown-source,
.app-window[data-mode="preview"] .markdown-rendered {
  position: static;
  display: block;
  height: 100%;
  min-height: 0;
  padding: 0 38px;
  overflow: auto;
}

.app-window[data-mode="preview"] .split-divider {
  display: block;
}

.statusbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 24px;
  color: #7a7a74;
  font-size: 0.78rem;
}

.status-spacer {
  flex: 1;
}

.ai-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #2d8a4d;
}

.marketing-footer {
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 28px 0 40px;
  color: #000;
  font-size: 0.9rem;
  font-weight: 650;
  animation: content-load 820ms 360ms cubic-bezier(.18, .82, .24, 1) both;
}

@keyframes nav-load {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
    filter: blur(7px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
    filter: blur(0);
  }
}

@keyframes hero-stage-load {
  from {
    opacity: 0;
    filter: blur(6px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes content-load {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.marketing-nav,
.marketing-nav *,
.marketing-section,
.marketing-section *,
.marketing-footer,
.marketing-footer * {
  font-weight: 400;
}

@media (max-width: 1020px) {
  .intro-tagline {
    display: none;
  }

  .app-window {
    max-width: 1000px;
  }

  .titlebar {
    justify-content: center;
    min-height: 72px;
    padding-block: 12px;
  }

  .mode-switch {
    position: static;
    transform: none;
    width: min(318px, 100%);
    justify-self: center;
    margin-inline: auto;
  }

  .traffic,
  .sidebar-button,
  .document-title,
  .toolbar {
    display: none;
  }

  .search-button {
    display: none;
  }

  .marketing-footer {
    padding: 22px 0 20px;
  }
}

@media (max-width: 760px) {
  .marketing-nav {
    top: 10px;
    width: calc(100% - 20px);
    padding-left: 14px;
  }

  .marketing-brand {
    width: 104px;
  }

  .marketing-nav nav a:not(.marketing-nav-cta):not(.github-link) {
    display: none;
  }

  .editor-section {
    margin-top: calc(-53vh + 84px);
    padding-top: 0;
  }

  .app-window {
    min-height: 0;
    border-radius: 22px;
  }

  .titlebar {
    display: grid;
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .mode-switch {
    grid-template-columns: repeat(2, 1fr);
    width: min(240px, 100%);
  }

  .mode-switch [data-mode-button="preview"] {
    display: none;
  }

  .editor-body {
    padding: 34px 24px 24px;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .document-page,
  .markdown-source,
  .markdown-rendered {
    height: 430px;
    min-height: 0;
    font-size: 1.05rem;
    line-height: 1.75;
  }

  .statusbar {
    flex-wrap: wrap;
    padding-block: 10px;
  }

  .marketing-footer {
    justify-content: center;
    align-items: center;
    padding-bottom: 16px;
  }
}
